Skip to main content
Glama

Typebar (formerly SuperDocs)

upload_document_base64

Parses the file into structured HTML where every paragraph, heading, table, row, and cell has a unique chunk ID, enabling the AI to make targeted structural edits via chat ("remove row 3 of the pricing table" works). Tables, borders, shading, alternating row colors, fonts, and inline styling are preserved on edit and export. Also works for AI-generated content: if you've drafted an outline or partial document in your context, upload it here as the working doc, then use chat to fill in the rest. This is also the reliable way to REPLACE a session's document with exact content you already hold — the upload is a verbatim load, so it can never come back paraphrased or placeholder-shaped the way asking chat to re-type it can. When you pass a session_id the response is compact by default (metadata only — pass return_html=true for the full parsed HTML); the document is loaded into the session and you edit it via chat. For files >100KB, prefer request_upload_url (pre-signed URL flow) to avoid token bloat from base64 through the agent context. Supported formats: .pdf, .docx, .txt, .rtf, .md, .html, .htm, .tex (plus .zip LaTeX project archives). Max 50 MB validated; note the hosted transport layer caps any REQUEST BODY at ~32 MB and rejects larger ones at the gateway with an HTML (not JSON) error — base64 inflates content ~33%, so inline uploads are reliable up to ~20 MB of file bytes; beyond that use request_upload_url (pre-signed flow, up to 100 MB).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filename": "<filename>",
      "file_base64": "<file_base64>"
    },
    "name": "upload_document_base64"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesOriginal filename with extension (e.g. 'contract.pdf'). Used for file type detection.
session_idNoSession ID. Auto-generated if not provided.
file_base64YesBase64-encoded file content.
return_htmlNoWith a session_id: false (default) returns compact metadata only (chunks_count, version_id, page_setup) — the document is loaded into the session and you edit it via chat, keeping your context small; true returns the full parsed HTML inline. Ignored on the convert-only path (no session_id), which always returns the converted html.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the verbatim (non-paraphrasing) load semantics, that a session_id yields compact metadata by default, and the actual transport limits — 50 MB validation, ~32 MB gateway body cap rejected with an HTML (not JSON) error, ~33% base64 inflation, and ~20 MB practical ceiling for inline upload. These are non-obvious failure modes an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core effect and edit affordance, then use cases, then hard limits — a sound order. It is long for a tool description and repeats the size story (50 MB, 32 MB, ~20 MB, 100 MB) and the 'replace content verbatim' point twice, so a sentence or two could be cut without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter, unannotated, no-output-schema tool, nearly everything an agent needs is present: formats supported, size ceilings and their failure mode, response shape toggle, and escalation path. The one soft spot is the no-session_id convert-only path, whose behavior is only hinted at rather than stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it clarifies session_id's effect on the response shape and explains that return_html is ignored on the convert-only path, and it reconciles the schema's maxLength of 50,000,000 base64 chars against the practical ~20 MB inline limit. It does not explain filename-driven type detection beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description makes clear this loads a file (base64) into a working session as structured HTML with chunk IDs for targeted edits, and it names the sibling alternative request_upload_url for large files. It leads with the parsing/editing outcome rather than the upload verb, and it never distinguishes itself from the other upload siblings (upload_attachment_base64, upload_template_base64, upload_image_base64), which an agent must guess between by name alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use cases are given (targeted structural edits, uploading AI-drafted content as a working doc, verbatim replacement of a session document) plus an explicit when-not with the alternative: '>100KB, prefer request_upload_url (pre-signed URL flow) to avoid token bloat'. The size threshold for switching is quantified rather than left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.