MCP raw vs FastMCP demo with policy, logging, and inspector. Demonstrates secure agent patterns with trusted and untrusted MCP servers, including sanitization, policy enforcement, and human approval workflows.
Server has 5 tools with basic schemas and descriptions, but significant gaps limit production readiness. All tools have descriptions (10-100+ chars) and input schemas with type definitions, meeting minimum requirements. However, descriptions are generic and lack actionable context for LLM selection. Tool naming follows verb_noun convention (read_, send_, update_, lookup_) but lacks clarity on distinctions. No output schemas documented. Error handling is minimal, tools raise exceptions without recovery guidance. Security concerns: sensitive data handling is mentioned but not validated in code. Rate limiting and approval context are present but undocumented in tool descriptions. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk profiles.
Read customer strategy data by customer_id from an untrusted external source.
Temporary demo tool that raises an exception to test middleware error logging.
Read customer data by customer_id. Sensitive fields are sanitized.
Send an internal email. External recipients and sensitive content are blocked.
Tool that enriches the secure db by updating the account strategy from the data exposed by the unsecure mcp server
No output schemas documented. Tools return structured objects (CustomerLookupResult, str) but LLMs cannot see field definitions, forcing them to infer response structure and risking downstream tool chaining failures.
Tool descriptions lack actionable context. 'Read customer data by customer_id. Sensitive fields are sanitized.' does not explain WHEN to use this vs lookup_customer_strategy, what fields are returned, or what 'sanitized' means to the LLM.
No tool annotations despite clear risk profiles. read_customer_data and lookup_customer_strategy are READ_ONLY; send_email_tool and update_customer_strategy_tool are WRITE operations. Missing readOnlyHint and destructiveHint annotations prevent LLMs from reasoning about side effects and retry safety.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | <=2025-11-25 | v2 |
Error handling does not guide recovery. Tools raise RuntimeError or return generic failure messages without suggesting next steps. 'Customer not found' should suggest 'Try search_customers() with a partial name' per recovery-guide pattern.
Approval context and rate limiting are undocumented in tool descriptions. LLMs cannot see that update_customer_strategy_tool checks approval_required or that rate limits apply. This hidden behavior causes unpredictable failures.