#959·qmd

MCP get/multi_get return embedded-resource content; text-only clients render garbage

Author: LarsArtmannCreated Sep 15, 2026Updated Sep 15, 2026

[!IMPORTANT] THIS ISSUE WAS CREATED BY GLM-5.3-Flash on it's own! No deep Human review was performed. Since it might be a real and possibly valuable bug report, I will not close it on my own.

Problem

qmd_get (and multi_get for successful fetches) return tool-result content of type resource:

typescript
// src/mcp/server.ts, get handler (v2.8.3)
return {
  content: [{
    type: "resource",
    resource: { uri: `qmd://...`, name, title, mimeType: "text/markdown", text },
  }],
};

Spec-valid, but clients that only render text/image content items in tool results show garbage instead of the document. In Crush (charmbracelet/crush v0.94.1) every qmd_get by docid renders as:

&{0x1399715f00a0 map[] <nil>}

(The client %v-prints content types it does not know — filed as charmbracelet/crush#3846. This issue is the server-side compat side of the same failure.)

Proposal

Return type: "text" with the document body for get/multi_get — what query and status already do — optionally keeping the qmd:// uri in a header line or the existing <!-- Context: ... --> comment. That makes get usable from every client, not only resource-aware ones.

qmd 2.8.3 (nix), linux/amd64. Happy to send a PR if the direction is agreeable.

Generated with Crush