Summary
Rename the reflection attribute classes to shorter, cleaner names. The current McpPlugin* prefix is verbose and adds friction when decorating methods and classes throughout the codebase.
Current → Proposed Names
Primary attributes (applied to methods)
| Current |
Proposed |
[McpPluginTool] |
[AiTool] |
[McpPluginPrompt] |
[AiPrompt] |
[McpPluginResource] |
[AiResource] |
Type container attributes (applied to classes)
| Current |
Proposed |
[McpPluginToolType] |
[AiToolType] |
[McpPluginPromptType] |
[AiPromptType] |
[McpPluginResourceType] |
[AiResourceType] |
Argument attributes (applied to fields/properties)
| Current |
Proposed |
[McpPluginToolArgument] |
[AiToolArgument] |
[McpPluginPromptArgument] |
[AiPromptArgument] |
Other
| Current |
Proposed |
[McpPluginSkill] |
[AiSkill] |
Motivation
- Brevity:
[AiTool] is much easier to type and read than [McpPluginTool]
- Protocol-agnostic: The
Ai prefix decouples the public API from the MCP protocol name, making it more intuitive for users who may not know what "MCP" stands for
- Consistency: All attributes share the same short
Ai prefix
Scope
The rename must start in MCP-Plugin-dotnet since that's where the attribute classes are defined. Downstream consumers (Unity-MCP-Plugin, extensions) will need to update their usages afterward.
Files to change in MCP-Plugin-dotnet
McpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolTypeAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolArgumentAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptTypeAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptArgumentAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Resources/McpPluginResourceAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Resources/McpPluginResourceTypeAttribute.cs
McpPlugin/src/McpPlugin/Attribute/Skill/McpPluginSkillAttribute.cs
- All reflection/scanner code that discovers these attributes by type
- Tests and samples that reference the old names
Breaking Change
This is a breaking change for any downstream code using the current attribute names. Consider whether to:
- Rename directly (clean break), or
- Keep old names as
[Obsolete] aliases during a transition period
Summary
Rename the reflection attribute classes to shorter, cleaner names. The current
McpPlugin*prefix is verbose and adds friction when decorating methods and classes throughout the codebase.Current → Proposed Names
Primary attributes (applied to methods)
[McpPluginTool][AiTool][McpPluginPrompt][AiPrompt][McpPluginResource][AiResource]Type container attributes (applied to classes)
[McpPluginToolType][AiToolType][McpPluginPromptType][AiPromptType][McpPluginResourceType][AiResourceType]Argument attributes (applied to fields/properties)
[McpPluginToolArgument][AiToolArgument][McpPluginPromptArgument][AiPromptArgument]Other
[McpPluginSkill][AiSkill]Motivation
[AiTool]is much easier to type and read than[McpPluginTool]Aiprefix decouples the public API from the MCP protocol name, making it more intuitive for users who may not know what "MCP" stands forAiprefixScope
The rename must start in MCP-Plugin-dotnet since that's where the attribute classes are defined. Downstream consumers (Unity-MCP-Plugin, extensions) will need to update their usages afterward.
Files to change in MCP-Plugin-dotnet
McpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolAttribute.csMcpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolTypeAttribute.csMcpPlugin/src/McpPlugin/Attribute/Tool/McpPluginToolArgumentAttribute.csMcpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptAttribute.csMcpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptTypeAttribute.csMcpPlugin/src/McpPlugin/Attribute/Prompt/McpPluginPromptArgumentAttribute.csMcpPlugin/src/McpPlugin/Attribute/Resources/McpPluginResourceAttribute.csMcpPlugin/src/McpPlugin/Attribute/Resources/McpPluginResourceTypeAttribute.csMcpPlugin/src/McpPlugin/Attribute/Skill/McpPluginSkillAttribute.csBreaking Change
This is a breaking change for any downstream code using the current attribute names. Consider whether to:
[Obsolete]aliases during a transition period