Skip to content

Fix MCP tool name to match server instructions and README - #1

Open
prateekbhujel wants to merge 1 commit into
NativePHP:mainfrom
prateekbhujel:fix/mcp-app-info-tool-name
Open

Fix MCP tool name to match server instructions and README#1
prateekbhujel wants to merge 1 commit into
NativePHP:mainfrom
prateekbhujel:fix/mcp-app-info-tool-name

Conversation

@prateekbhujel

Copy link
Copy Markdown

SuperStackServer instructs clients to use app-info:

"Super Stack MCP server. Use app-info to learn about this starter kit and its installed packages."

And README.md documents:

"Starter tool: app-info (App\Mcp\Tools\AppInfoTool) — returns app + package versions."

Without an explicit #[Name] attribute, Primitive::name() defaults to Str::kebab(class_basename($this)), registering the tool as app-info-tool and causing MCP clients following the instructions/docs to receive:

{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"Tool [app-info] not found."}}

Changes

  • Added #[Name('app-info')] to AppInfoTool so the tool name matches the server instructions and README.
  • Synced nativephp/web-ui into the package list returned by AppInfoTool to match Home.php.
  • Added Pest feature tests in tests/Feature/McpServerTest.php covering tools/list, tools/call, and unknown tool error handling.

Add explicit #[Name('app-info')] attribute on AppInfoTool so JSON-RPC
tools/list and tools/call resolve the tool as advertised in the
SuperStackServer instructions and README. Also sync nativephp/web-ui into
package versions and add MCP feature tests.
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