Skip to content

docs: document the inline-upload practical limit + sourceUrl design#89

Merged
arapov merged 1 commit into
masterfrom
docs-inline-upload-limit
Jun 11, 2026
Merged

docs: document the inline-upload practical limit + sourceUrl design#89
arapov merged 1 commit into
masterfrom
docs-inline-upload-limit

Conversation

@arapov

@arapov arapov commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Documents reported issue #2 (large attachments can't route through a chat client) — it was documented nowhere, and the existing docs were actively misleading: the dataBase64 description and DESIGN L9 advertised the 25 MB cap, which is the wire limit for programmatic clients, while the real constraint for LLM callers is that inline base64 transits the model as tool-call output (~660K chars for a 500 KB PDF; practical ceiling is a few tens of KB).

  • upload_attachment.dataBase64 description — states the practical limit where the LLM reads it, and instructs the model not to attempt inlining large files.
  • DESIGN.md L9 — the structural explanation (model-output path vs wire limit; chunking doesn't help).
  • EXAMPLES.md — caveat on the upload example + the "chat-composer attachments are not visible to MCP connectors" fact.
  • IDEAS.md — the full sourceUrl remedy design (SSRF guard list, streaming cap, reachability constraint), so the thinking is durably captured until it's built.

Docs + one description string; no behavioral change. 579 tests green.

🤖 Generated with Claude Code

The attachment-upload limitation reported in production (a ~500 KB
signed PDF can't be routed through the connector from a chat client)
was documented nowhere — worse, the existing docs were misleading:
DESIGN L9 and the dataBase64 description advertised the 25 MB cap,
which is the server-side wire limit, while the real constraint for
LLM callers is that inline base64 must transit the model as tool-call
output (~660K characters for 500 KB — beyond any chat model's output
budget at a few tens of KB practical).

- upload_attachment.dataBase64 description: states the practical
  limit where the LLM actually reads it, and tells the model not to
  attempt inlining large files.
- DESIGN.md L9: explains the structural bottleneck and which callers
  the 25 MB cap is real for (programmatic MCP clients).
- EXAMPLES.md: the upload example carries the caveat + notes that
  chat-composer file attachments are not visible to MCP connectors.
- IDEAS.md: full design for the planned remedy — URL-sourced upload
  (sourceUrl, mutually exclusive with dataBase64; server fetches the
  file) with the SSRF guard list (https-only, private/link-local IP
  rejection incl. metadata server, streaming 25 MB cap, no auth
  forwarding, 60s timeout) and the deployment-reachability constraint.

Docs + one tool-description string; no behavioral change. 579 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arapov arapov merged commit 6dde835 into master Jun 11, 2026
1 check passed
@arapov arapov deleted the docs-inline-upload-limit branch June 11, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant