Skip to content

Add typed MCP transcript outputs - #422

Closed
Lauritz-Timm wants to merge 4 commits into
rtk-ai:developfrom
Lauritz-Timm:feat/mcp-transcript-output
Closed

Add typed MCP transcript outputs#422
Lauritz-Timm wants to merge 4 commits into
rtk-ai:developfrom
Lauritz-Timm:feat/mcp-transcript-output

Conversation

@Lauritz-Timm

@Lauritz-Timm Lauritz-Timm commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Add direct typed MCP output for the transcript tool family.

Motivation

All five transcript tools encode machine data inside MCP text. Modern clients must decode JSON-RPC and then parse another string, while generic structured wrappers duplicate large transcript payloads.

Changes

  • define transcript DTOs, typed tool markers, conversions, and schema ownership in the dedicated output/transcript.rs domain module
  • derive precise output schemas for start-session, record, search, show, and stats from those Rust types
  • return direct typed values with stable session and message IDs
  • map sessions, messages, hits, and statistics to explicit camelCase fields
  • replace tuple-based statistics with named count objects
  • use concise modern text without duplicating transcript bodies
  • preserve the exact legacy JSON text

Compatibility and safety

MCP 2024-11-05 receives the existing text and no structured fields. Only negotiated modern clients receive typed values. Schemas are closed at every described object boundary.

Validation

cargo test -p icm-mcp --locked --offline transcript_
cargo test -p icm-mcp --locked --offline
cargo clippy -p icm-mcp --all-targets --locked --offline -- -D warnings
cargo fmt --all -- --check

Focused tests chain session creation, message recording, search, replay, and statistics. They validate the real emitted values against the generated schemas and verify stable IDs, nested values, named counts, closed schemas, timestamp compatibility, and exact legacy output preservation.

The evaluation measured a 31.3% reduction in estimated wire tokens for modern transcript statistics.

@Lauritz-Timm
Lauritz-Timm force-pushed the feat/mcp-transcript-output branch from 0f3f47b to 498f1ad Compare August 4, 2026 19:01
@Lauritz-Timm
Lauritz-Timm deleted the feat/mcp-transcript-output branch August 4, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant