Build your own LLM tools inside your symfony project by adding to it a Model Context Protocol Server
This Symfony MCP server provides 2 tools with basic schemas and descriptions, but falls significantly short of production quality. Tool naming is generic and action-ambiguous ('hello-world' vs 'code-analyzer'). The 'hello-world' tool is trivial and does not reflect typical agent workloads. The 'code-analyzer' tool has a reasonable schema with an enum constraint on analysis_type, but descriptions are terse and lack actionable context for LLM selection. Neither tool documents output structure, making it impossible for agents to plan downstream operations. Error handling is not visible in the code provided. The server is structured as a Symfony bundle with tool registration via config, which is reasonable, but the actual tool implementations in the examples are minimal. Code quality and static analysis are evidenced by phpstan configuration, but this does not compensate for weak tool design.
Analyzes code and provides insights using LLM assistance
Say HelloWorld developer.
Tool 'hello-world' lacks meaningful semantics. Name does not start with a verb indicating an action. Tool is a greeting utility, not a task the LLM would invoke in a real workflow. Violates pattern:tool (single clear responsibility and verb-based naming).
Tool descriptions are extremely short (19 and 46 characters respectively). Baseline for A+ tools is 34-392 chars. Descriptions lack WHEN to use the tool, what it returns, or prerequisites. 'Say HelloWorld developer' does not explain intent for LLM selection.
No output schema is documented for either tool. LLMs cannot infer what fields to expect or plan downstream operations. Violates pattern:tool and pattern:response-shaper.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 47 | 2025-06-18+ | v2 |
Parameter 'name' in hello-world lacks type validation guidance. Parameter 'code' in code-analyzer is unconstrained (no min/max length, no format hint). Baseline tooling enforces min/max for numeric and string params.
code-analyzer parameter 'analysis_type' has an enum with a 'default' field set to 'general'. While this provides a sensible default, the tool lacks documentation of what each analysis type reveals or when to use each variant.
No evidence of error handling, recovery guidance, or error classification. Tools do not declare what can go wrong or how agents should respond to failures. Violates pattern:recovery-guide and pattern:error-classification.
Tool naming does not follow verb_noun convention clearly. 'hello-world' is a noun phrase. 'code-analyzer' is passive. Better names: 'analyze_code' (verb first), 'greet_developer'. Violates pattern:tool naming guidance.