refactor: migrate tool outputs to use EmbeddedResource with typed JSON for assistant-facing data
CI/CD Pipeline / Lint & Check (push) Successful in 9s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m20s

This commit is contained in:
2026-05-12 23:23:23 +02:00
parent 3805ca3274
commit c69e362635
3 changed files with 39 additions and 23 deletions
+5 -5
View File
@@ -21,12 +21,12 @@ This document records key architectural and design decisions made during the dev
- Initial authentication is handled via a separate `auth` script or integrated OAuth flow.
## 3. Data Representation & MCP Annotations
**Decision**: Use dual-content outputs with audience-specific annotations.
**Context**: To provide a clean user experience while giving the LLM detailed data, we split tool results into two parts.
**Decision**: Use dual-content outputs with audience-specific annotations and native MIME typing.
**Context**: To provide a clean user experience while giving the LLM detailed data, we split tool results into two parts and use protocol-level typing.
**Implementation**:
- **User Facing**: Markdown summaries annotated with `audience=["user"]`.
- **Assistant Facing**: Raw JSON data annotated with `audience=["assistant"]`.
- This allows MCP clients to intelligently decide what to display to the user while ensuring the assistant receives full technical context.
- **User Facing**: Markdown summaries annotated with `audience=["user"]` using `TextContent`.
- **Assistant Facing**: Raw JSON data provided as an `EmbeddedResource` with `mimeType="application/json"` and annotated with `audience=["assistant"]`.
- This ensures the LLM explicitly knows the data format while allowing clients to optimize the user-facing UI.
## 4. Internationalization
**Decision**: Use metric units (meters, km, m/s) internally and provide clear conversion instructions to the LLM.