Skip to main content
Glama

Typebar (formerly SuperDocs)

request_upload_url

Returns a short-lived (5-minute) PUT URL plus a ready-to-run curl_example. An agent with shell access can run the curl_example directly to push the file to cloud storage, so the bytes never pass through its context window (a client without a shell can hand the command to its user). After the upload, pass upload_id and filename to chat to load the file and edit it in the same call (or call process_uploaded_document to load it alone). For files <100KB where token cost is trivial, upload_document_base64 still works inline. Max file size: 100 MB. Supported formats: .pdf, .docx, .txt, .rtf, .md, .html, .htm, .tex (plus .zip LaTeX project archives).

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>",
      "content_type": "<content_type>"
    },
    "name": "request_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
purposeNoWhat this file will be used for. 'document' = the active editable doc; 'attachment' = read-only AI-searchable reference; 'export-html' = HTML payload destined for /v1/documents/export (large-export upload flow, for documents above ~25 MB).document
filenameYesOriginal filename including extension (e.g. 'contract.docx'). Used downstream for file-type detection.
size_bytesNoOptional file size in bytes, checked early when given. Must be > 0 and <= 104857600 (100 MB).
content_typeYesMIME type the agent will PUT with (e.g. 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' for .docx).

Output Schema

NameRequiredDescriptionDefault
upload_idYes
expires_atYes
upload_urlYes
curl_exampleYes
max_size_bytesYes
expires_in_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/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 well: 5-minute URL lifetime, 100 MB max, supported format list, and the no-bytes-in-context behavior. It omits whether the URL is single-use, what happens on expiry or failed PUT, and any auth/quota requirements, which keeps it below a 5.

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 return value and the shell-execution trick, then progressively details alternatives and limits. Dense but nearly every clause carries actionable information; the parenthetical about clients without a shell is the only mild digression.

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

Completeness5/5

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

An output schema exists, so return-shape explanation isn't needed. Given a 4-param, 2-required upload tool with no annotations, the description covers lifetime, size limits, formats, and the full follow-up workflow — nothing essential is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters (including the purpose enum) are already documented. The description adds only the downstream handoff of upload_id/filename to chat, which is return-value guidance rather than parameter meaning — baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource: returns a short-lived (5-minute) PUT URL plus a ready-to-run `curl_example`. It also names the sibling it replaces for large files (upload_document_base64), so an agent can distinguish it without opening a schema.

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 routing: use this to avoid passing bytes through context, hand the command to the user when there's no shell, then pass upload_id/filename to chat or call process_uploaded_document. It also names the exclusion condition — files <100KB should use upload_document_base64 inline.

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.