Skip to content

resource_link content blocks are silently dropped from tool output #89

Description

@dhruvkej9

Problem

_extract_content_parts only reads text/data attributes from content blocks. A resource_link block carries neither — only uri/name — so it is dropped silently from non---json output.

Reproduction

Minimal stdio MCP server with a tool returning:

{"content": [
  {"type": "text", "text": "see:"},
  {"type": "resource_link", "uri": "probe://linked", "name": "linked-doc", "mimeType": "text/plain"}
]}
$ mcp2cli --mcp-stdio "python server.py" with-link
see:

The link is gone. Verified against v3.5.0 (commit 6b8ae5f).

Expected

see:
linked-doc: probe://linked

(--json is unaffected — it dumps the full envelope.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions