A FastMCP server example demonstrating OAuth 2.0 authentication with Keycloak identity provider, including protected tools that access authenticated user claims.
Two tools with minimal definitions. Both have descriptions (10-20 chars, below the 34-char p10 baseline), no parameter descriptions, and no documented output schemas. 'echo' is trivial; 'get_access_token_claims' has empty input schema but no output schema documented. No error handling guidance, no parameter constraints, no composition hints. Naming is acceptable (verb_noun pattern), but descriptions are too terse to guide LLM selection. This is a reference/example server, not production-grade.
Echo the provided message.
Get the authenticated user's access token claims.
Tool descriptions are under 20 characters ('Echo the provided message.' = 28 chars, 'Get the authenticated user's access token claims.' = 50 chars). Both descriptions lack context for LLM selection (WHEN to use, WHAT it returns, prerequisites).
No parameter descriptions. 'echo' has a 'message' parameter with type string but no description explaining what kind of message, constraints, or examples. 'get_access_token_claims' has empty input schema, no parameters documented at all.
No output schemas documented. 'echo' returns a string (inferred from code), 'get_access_token_claims' returns a dict with 9 fields (sub, scope, azp, name, etc.), but neither tool's definition includes a documented return type or field descriptions. LLMs cannot plan downstream calls without knowing output structure.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 40 | <=2025-11-25 | v2 |
No error handling guidance. If Keycloak is unreachable, if the token is invalid, or if claims are missing, the tools provide no recovery hints. Error responses should tell the LLM what to do next (e.g., 'Token expired. Re-authenticate and retry.').
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Both tools are read-only (Risk: READ_ONLY declared in metadata), but this is not reflected in the tool definitions themselves. Modern MCP servers should include tool annotations for clarity.