using System.Collections.Generic;
namespace MCPForUnity.Editor.Services
{
/// <summary>
/// Metadata for a discovered tool
/// </summary>
public class ToolMetadata
public string Name { get; set; }
public string Description { get; set; }
public bool StructuredOutput { get; set; }
public List<ParameterMetadata> 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 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<ToolMetadata> DiscoverAllTools();
/// Gets metadata for a specific tool
ToolMetadata GetToolMetadata(string toolName);
/// Returns only the tools currently enabled for registration
List<ToolMetadata> 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();