PHP SDK for building Model Context Protocol (MCP) servers - Create MCP tools, resources, and prompts
This PHP MCP SDK demonstrates a framework for building MCP servers but exhibits critical quality gaps in tool definition. Of 9 tools evaluated, 5 lack descriptions entirely (hidden_subdir_tool, echo_text, manualGreeter, and partial descriptions missing on repeatAction, InvokableCalculator, calculator, schedule_event). Multiple tools have incomplete parameter descriptions (InvokableCalculator and calculator both show null descriptions for numeric params). While the framework supports tool annotations and proper naming conventions (process_data_by_mode, greet_user follow verb_noun pattern), the actual tools defined in examples and tests lack the rigor needed for LLM selection and execution. No documented output schemas visible. The framework is sound, but the tools as demonstrated do not meet production quality standards.
An invokable calculator tool.
Perform basic math operations (add, subtract, multiply, divide)
Greets a user by name.
Performs an action that can be modified by an environment variable. The MCP client should set 'APP_MODE' in its 'env' config for this server.
5 of 9 tools have no description or insufficient description (<20 chars). hidden_subdir_tool, echo_text, manualGreeter provide zero context for LLM selection. repeatAction lacks description entirely. LLMs cannot determine when/why to call these tools.
Parameter descriptions contain null values instead of strings. InvokableCalculator and calculator both define parameters 'a' and 'b' with null descriptions. This violates the requirement that every parameter have a non-empty description explaining what it controls.
No output schemas documented for any tool. The source code shows RegisteredTool.formatResult() converts results to Content[], but no tool documentation describes what structure or fields the agent should expect from the response. This forces LLMs to guess downstream field names and types.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | <=2025-11-25 | v2 |
schedule_event parameter 'attendees' has type ['array', 'null'] but no item type defined. Unclear if it expects array of strings (emails), objects (names + emails), or IDs. Type ambiguity forces LLMs to guess.
calculator parameter 'operation' defaults to 'add' with no clear documentation that this is the fallback if omitted. The schema shows default='add' but parameter description is null, preventing LLMs from understanding the behavior.
Tool naming could be more explicit. 'repeatAction' uses camelCase instead of snake_case convention; lacks action verb at the start. Better: 'repeat_action'. Same issue with 'InvokableCalculator', should be 'invoke_calculator' or just 'calculator'.
greet_user and echo_text are too generic without context. When would an agent call 'greet_user' in a real workflow? When would 'echo_text' be useful vs other text processing tools? Descriptions should answer 'when to use this instead of a similar tool.'
No error handling guidance visible in any tool description. If schedule_event fails due to conflicting attendee availability, what should the LLM do? If calculator receives non-numeric input, what's the recovery path? Error descriptions must guide the agent's next step.