Skip to main content
Glama

Upload a PDF

upload_document

Uploads a base64 PDF of 1 to 20 pages, up to 5 MB. Pages in Letter, A4, Legal and other common sizes are fitted onto US Letter, and landscape pages are turned to portrait. Returns a document ID and a private document token. Remote URLs are not fetched.

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>",
      "pdf_base64": "<pdf_base64>"
    },
    "name": "upload_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYes
pdf_base64Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations, the description discloses page-count and size limits, page-size fitting to US Letter, landscape-to-portrait rotation, and the return values of document ID and private document token. It does not cover error behavior or permission requirements, but it adds substantial operational context for a write-oriented upload tool.

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

Conciseness5/5

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

The description is front-loaded with the action and is composed of short, information-dense sentences. Every sentence contributes either a constraint, transformation behavior, return value, or usage boundary, with no wasted wording.

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 two-parameter upload tool with annotations and no output schema, the description covers purpose, input constraints, transformation behavior, return values, and one important exclusion. It is nearly complete, with the main omission being any explanation of the required filename parameter.

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?

The schema has no parameter descriptions, so the description must compensate. It explains the pdf_base64 payload well by describing base64 PDF content, page limits, size limits, and page transformations, but it does not explain the required filename parameter at all.

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 gives a specific verb and resource: it uploads a base64 PDF, returns a document ID and token, and notes that remote URLs are not fetched. This clearly identifies the operation, though it does not explicitly differentiate it from siblings such as quote_document or send_letter.

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

Usage Guidelines4/5

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

It gives clear input-context guidance: the PDF must be base64, 1 to 20 pages, up to 5 MB, and remote URLs are not fetched. It does not name alternatives or say when another tool should be used instead, so it falls short of full when-to-use/when-not guidance.

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.

Resources