[BUG] Slack connector slack_read_file returns -32602 Invalid tools/call result for binary documents (PDF)

Open 💬 3 comments Opened Jun 30, 2026 by gakselrod

Summary

The Slack connector's slack_read_file tool successfully fetches a file from Slack but fails to return it to the model when the file is a binary document (e.g. application/pdf). The call dies at the MCP result-validation layer with MCP error -32602: Invalid tools/call result. Text files, canvases, and images return fine — only non-image binary content blocks fail.

This is distinct from the (now closed) feature request #33965 "support downloading file attachments": the tool now exists and is authorized (files:read is granted, the fetch succeeds server-side), but its result cannot be serialized into the allowed MCP content-block union for binary documents.

Repro

  1. In a Slack DM/channel, locate a message with a PDF attachment; get its file ID via slack_read_channel / slack_read_thread (metadata comes back fine: name, application/pdf, size).
  2. Call slack_read_file with that file_id.

Actual result

The call fails with -32602. The validation error shows the returned content block did not match any allowed content[*] type — the union accepts text, image (data+mimeType), audio (data+mimeType), resource_link, and resource (text/blob), but the PDF block matched none of them:

MCP error -32602: Invalid tools/call result: [
  {
    "code": "invalid_union",
    "errors": [ ["type" must be "text" ...], ["type" must be "image" ...],
                ["type" must be "audio" ...], ["type" must be "resource_link" ...],
                ["resource" text/blob ...] ],
    "path": [ "content", 1 ],
    "message": "Invalid input"
  }
]

Expected result

slack_read_file should return binary document content in a schema-valid form — e.g. wrapped as an embedded resource with a base64 blob + mimeType, the same way images are returned — so the model receives the bytes. Today, PDFs/docx/xlsx/zip etc. are unreachable through the connector even though the fetch itself works.

Impact

Any workflow that needs the content of a Slack attachment (contracts, reports, signed PDFs) is blocked. Metadata is visible but the document is not. Affects DMs and channels alike. Current workaround is to download the file out-of-band and read it locally.

Environment

  • Claude Code, Slack connector (hosted MCP)
  • macOS (Darwin 25.5.0)
  • File observed: application/pdf, ~218 KB; files:read confirmed granted (server-side fetch succeeds)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗