using System;
namespace MCPForUnity.Editor.Tools
{
///
/// Marks a class as an MCP tool handler for auto-discovery.
/// The class must have a public static HandleCommand(JObject) method.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class McpForUnityToolAttribute : Attribute
{
///
/// The command name used to route requests to this tool.
/// If not specified, defaults to the PascalCase class name converted to snake_case.
///
public string CommandName { get; }
///
/// Create an MCP tool attribute with auto-generated command name.
/// The command name will be derived from the class name (PascalCase → snake_case).
/// Example: ManageAsset → manage_asset
///
public McpForUnityToolAttribute()
{
CommandName = null; // Will be auto-generated
}
///
/// Create an MCP tool attribute with explicit command name.
///
/// The command name (e.g., "manage_asset")
public McpForUnityToolAttribute(string commandName)
{
CommandName = commandName;
}
}
}