using System.Collections.Generic;
namespace MCPForUnity.Editor.Services
{
///
/// Metadata for a discovered tool
///
public class ToolMetadata
{
public string Name { get; set; }
public string Description { get; set; }
public bool StructuredOutput { get; set; }
public List Parameters { get; set; }
public string ClassName { get; set; }
public string Namespace { get; set; }
public string AssemblyName { get; set; }
public string AssetPath { get; set; }
public bool AutoRegister { get; set; } = true;
public bool RequiresPolling { get; set; } = false;
public string PollAction { get; set; } = "status";
public bool IsBuiltIn { get; set; }
}
///
/// Metadata for a tool parameter
///
public class ParameterMetadata
{
public string Name { get; set; }
public string Description { get; set; }
public string Type { get; set; } // "string", "int", "bool", "float", etc.
public bool Required { get; set; }
public string DefaultValue { get; set; }
}
///
/// Service for discovering MCP tools via reflection
///
public interface IToolDiscoveryService
{
///
/// Discovers all tools marked with [McpForUnityTool]
///
List DiscoverAllTools();
///
/// Gets metadata for a specific tool
///
ToolMetadata GetToolMetadata(string toolName);
///
/// Returns only the tools currently enabled for registration
///
List GetEnabledTools();
///
/// Checks whether a tool is currently enabled for registration
///
bool IsToolEnabled(string toolName);
///
/// Updates the enabled state for a tool
///
void SetToolEnabled(string toolName, bool enabled);
///
/// Invalidates the tool discovery cache
///
void InvalidateCache();
}
}