Skip to content

Add MCP tool alias support for agent-visible names and descriptions#47

Merged
jormeijer merged 1 commit intomasterfrom
feature/alternate-tool-names
Feb 19, 2026
Merged

Add MCP tool alias support for agent-visible names and descriptions#47
jormeijer merged 1 commit intomasterfrom
feature/alternate-tool-names

Conversation

@jormeijer
Copy link
Member

Why

Agents may need cleaner or domain-specific tool naming/wording without requiring MCP server-side tool renames. Also, there could be conflicts in tool names when using multiple MCP servers. This keeps agent UX flexible while maintaining protocol correctness.

Summary

This PR adds support for exposing MCP tools to the agent under alternate names and descriptions, while preserving calls to the original MCP tool names.

What changed

  • Added McpConnection::withAlternateToolNames(array $map)
    • Map format: ['mcp_tool_name' => 'agent_visible_name']
  • Added McpConnection::withAlternateToolDescriptions(array $map)
    • Map format: ['mcp_tool_name' => 'agent_visible_description']
  • Updated MCP tool construction to support:
    • agent-visible tool name override
    • agent-visible tool description override
  • Updated README usage examples for both name and description overrides.

@jormeijer jormeijer merged commit 127cafc into master Feb 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant