Skip to main content
Glama

Upload PDF

upload_pdf

Upload a PDF from a ChatGPT file attachment.

MANDATORY WORKFLOW — follow EVERY step in order:

  1. ALWAYS call check_upload_status FIRST — even if you think the file is new.

  2. If a job with the same filename already exists, reuse its job_id — do NOT call upload_pdf.

  3. Only call upload_pdf if the file is confirmed absent from check_upload_status. Skipping step 1 and calling upload_pdf directly is FORBIDDEN.

Use this when the user provides a file attachment in ChatGPT. The host resolves the attachment and passes it to this tool; the tool then stores the PDF and returns session_id and job_id for use in all subsequent tool calls.

Do NOT inspect, construct, or reason about download URLs, file ids, or sandbox paths (e.g. '/mnt/data/...') — just pass the attachment straight through. NEVER invent, guess, or synthesise a download_url or file_id. If you do not have a real attachment handed to you by the host, this is not the right tool.

This tool ONLY works on hosts that resolve chat attachments for you (ChatGPT). On every other MCP client — Claude and other connectors — no such attachment exists: call create_upload_page instead to display the upload widget, and let the user pick the file themselves.

Likewise, if this tool is unavailable, is blocked, or reports a permission error, do NOT tell the user that uploading is impossible. Fall back to create_upload_page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_fileYesThe file attachment, supplied by the host.
session_idNoExisting session ID to group this file with previous uploads. If omitted, a new session is created. Always pass the same session_id throughout the entire conversation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes
job_idYes
reusedYes
filenameYes
page_countYes
reply_noteYes
session_idYes
instructionsYes

TDQS

A4.9/5.0
Behavior5/5

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

The description adds critical behavioral context beyond empty annotations: it mandates a pre-check, forbids direct invocation if job exists, prohibits inventing download URLs, and clarifies that it only works on ChatGPT hosts. It also provides fallback behavior for when the tool is unavailable, which is not visible from annotations.

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 longer than average, but every sentence earns its place: front-loaded core action, numbered mandatory workflow, explicit prohibitions, and fallback notes. The structured layout with bolded steps aids comprehension and makes the complexity manageable.

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?

The tool's complexity (host attachment resolution, mandatory pre-check, alternative tools) is fully covered. It explains the relationship with check_upload_status and create_upload_page, and notes return values (session_id, job_id). Since an output schema exists, lack of detailed return descriptions is acceptable.

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?

With 100% schema coverage, the baseline is 3, but the description adds meaning by explaining that pdf_file comes from the host-resolved attachment and instructing the agent to pass it straight through without constructing or inspecting download URLs or file_ids. This goes beyond the schema's basic field definitions.

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?

The description opens with 'Upload a PDF from a ChatGPT file attachment,' a specific verb+resource. It further distinguishes from siblings by noting it only works on ChatGPT hosts and mentioning create_upload_page as an alternative for other clients, and check_upload_status for existing jobs. Its purpose is unmistakable.

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 and when-not-to: 'Use this when the user provides a file attachment in ChatGPT'; 'If you do not have a real attachment... this is not the right tool'; 'On every other MCP client... call create_upload_page instead.' It also mandates calling check_upload_status first and reusing existing job_id, avoiding redundant uploads.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: uploads are split by context (single, batch, widget), content inspection is split by method (text, images, redaction lines), and password operations are split by state (set vs change). Descriptions explicitly cross-reference to prevent confusion.

Naming Consistency4/5

All tools start with a verb (upload, check, compare, compress, create, delete, get, list, redact, set, change, view), but the position of 'pdf' varies (suffix in compress_pdf, middle in get_pdf_info) and some names are compound like 'batch_upload_pdf' and 'get_latest_comparison'. Pattern is readable but not perfectly uniform.

Tool Count4/5

16 tools is slightly above the ideal 3-15 range, but each tool maps to a distinct operation or workflow step in PDF handling. The count feels justified given the breadth of features (upload, compress, delete, password, redact, compare).

Completeness4/5

The surface covers the core PDF lifecycle: upload, view, compress, delete pages, password protection, redaction, and comparison. Minor gaps exist (no merge, split, or rotate), but the primary workflows are fully supported with mandatory pre/post checks.