Problem
Astron Agent's MCP tool-call adapter currently rebuilds only text and image content blocks. This silently drops newer/other MCP content types and top-level structured results:
audio;
- embedded
resource contents;
resource_link blocks;
- unknown forward-compatible content blocks;
structuredContent returned by a tool.
The image adapter also reads mineType instead of the MCP field mimeType, so a standard SDK image block can lose its MIME type or expose a misspelled public field.
Silent loss is especially risky for agent workflows: a transport call can be reported as successful while part of the authoritative tool result has disappeared.
Proposed solution
- Preserve MCP SDK content blocks by serializing their full protocol shape instead of rebuilding a two-type subset.
- Add typed public models for known block types while allowing unknown forward-compatible fields/types to pass through explicitly.
- Expose top-level
structuredContent without coercing it to text.
- Correct
mimeType and retain a documented compatibility alias for existing clients that consumed mineType; do not perform a silent breaking rename.
- Preserve
isError, _meta/annotations where supported, and protocol errors separately from content.
- Apply bounded response-size/content-count limits and explicit truncation metadata rather than unbounded buffering or silent drops.
- Add tests with standard MCP SDK result models, not hand-shaped dictionaries only.
Acceptance criteria
Pinned baseline: iflytek/astron-agent@aaef2a286b9fb8396d42d5d4f6bb7af9b19afa22
Current implementation evidence
Related
Problem
Astron Agent's MCP tool-call adapter currently rebuilds only
textandimagecontent blocks. This silently drops newer/other MCP content types and top-level structured results:audio;resourcecontents;resource_linkblocks;structuredContentreturned by a tool.The image adapter also reads
mineTypeinstead of the MCP fieldmimeType, so a standard SDK image block can lose its MIME type or expose a misspelled public field.Silent loss is especially risky for agent workflows: a transport call can be reported as successful while part of the authoritative tool result has disappeared.
Proposed solution
structuredContentwithout coercing it to text.mimeTypeand retain a documented compatibility alias for existing clients that consumedmineType; do not perform a silent breaking rename.isError,_meta/annotations where supported, and protocol errors separately from content.Acceptance criteria
Pinned baseline:
iflytek/astron-agent@aaef2a286b9fb8396d42d5d4f6bb7af9b19afa22mimeTypeis returned for image/audio; the legacy misspelling is handled explicitly during a deprecation window.structuredContentsurvives as structured JSON.isError: trueremains distinguishable from transport/session failures.Current implementation evidence
mineType: https://github.com/iflytek/astron-agent/blob/aaef2a286b9fb8396d42d5d4f6bb7af9b19afa22/core/plugin/link/api/schemas/community/tools/mcp/mcp_tools_schema.py_execute_tool_callhandles onlytextandimage, rebuilding the output list: https://github.com/iflytek/astron-agent/blob/aaef2a286b9fb8396d42d5d4f6bb7af9b19afa22/core/plugin/link/service/community/tools/mcp/mcp_server.pyRelated