A bridge library for decoding MCP tool results into Go structs and protobuf messages, with support for JSON extraction, field aliasing, validation, and operational observability
This is a Go library for bridging MCP tool responses to Protocol Buffer messages, not an MCP server itself. The 7 tools are defined in Python MCP servers (FastMCP), not in the Go codebase. Tool definitions are visible in integration/python_mcp/server.py and examples/practical_microservice_flow/service1_mcp_provider/server.py. All tools have descriptions (10 - 100 chars, below the 194-char baseline). Input schemas are present with type and description for each parameter. However, output schemas are NOT documented, tools return CallToolResult with TextContent but no structured schema declaration. Error handling is minimal: only isError flag, no recovery guidance. Tool names follow verb_noun pattern (recommend_*, create_*) but lack clarity on variants (e.g., recommend_discount_text vs recommend_discount_structured differ only in output format, not intent). No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels (READ_ONLY vs WRITE). Parameter descriptions are adequate but generic ('The amount for which to recommend a discount' appears verbatim in 2 tools). No pagination, no batch operations, no idempotency guarantees documented.
Create an order with JSON embedded in markdown text.
Create an order with malformed JSON-like text followed by valid JSON.
Create an order with JSON directly in text content.
Return a tool-level error payload.
Return payload with an extra field to test strict-mode unknown handling.
Return discount recommendation in structuredContent.
Return discount recommendation as JSON in TextContent.text.
Output schemas not documented. Tools return CallToolResult with TextContent but no structured schema declaration. LLMs cannot plan downstream operations or validate response structure.
Tool naming lacks clarity on intent. recommend_discount_text vs recommend_discount_structured differ only in output format (TextContent.text vs structuredContent), not in what the tool does. This forces LLMs to reason about implementation details rather than intent.
No tool annotations despite explicit risk levels. create_order_* tools are marked WRITE (destructive) but lack destructiveHint annotation. recommend_discount_* tools are READ_ONLY but lack readOnlyHint. Agents cannot distinguish safe from unsafe operations.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 47 | 2025-06-18+ | v2 |
Error handling is minimal. create_order_tool_error returns isError=true with plain text 'permission denied for order creation' but no recovery guidance. No categorization (retryable vs fatal). LLM cannot determine next action.
Duplicate parameter descriptions. 'The amount for which to recommend a discount' appears verbatim in recommend_discount_text and recommend_discount_structured. Generic descriptions waste opportunity to clarify tool differences.