Skip to main content
Glama

Start PDF upload

start_pdf_upload

Starts a PDF upload. Returns upload_id, a one-time upload_url, its expiry (one hour), and a ready curl PUT command to run from the file's folder. Nothing is sent. Then call create_draft_from_upload.

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": {
      "file_name": "<file_name>",
      "byte_size": "<byte_size>"
    },
    "name": "start_pdf_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
byte_sizeYesThe exact size of the file you will upload, in bytes.
file_nameYesThe PDF's file name, ending in .pdf. The upload command reads this file from the folder it runs in.

Output Schema

NameRequiredDescriptionDefault
curlYes
upload_idYes
expires_atYesOne hour after the upload was created.
upload_urlYes`PUT` the PDF here. The URL is its own credential, so send no API key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / file_name / description
      Previous value: -"Must end in `.pdf`."New value: +"The PDF's file name, ending in .pdf. The upload command reads this file from the folder it runs in."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "curl": {
      +      "type": "string"
      +    },
      +    "expires_at": {
      +      "description": "One hour after the upload was created.",
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +      "type": "string"
      +    },
      +    "upload_id": {
      +      "format": "uuid",
      +      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +      "type": "string"
      +    },
      +    "upload_url": {
      +      "description": "`PUT` the PDF here. The URL is its own credential, so send no API key.",
      +      "format": "uri",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "upload_id",
      +    "upload_url",
      +    "expires_at",
      +    "curl"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses key behavior: 'Nothing is sent' at this stage, the returned upload_url is one-time, it expires in one hour, and a ready curl PUT command is provided. These details materially clarify what happens during invocation and what the caller must do afterward.

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?

Three short sentences, front-loaded with the core action and then the return details and next step. No sentence is wasted or redundant.

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?

For a two-step upload flow, the description covers the immediate action, the returned artifacts, the expiry window, and the required follow-up call. With an output schema present and annotations covering safety, 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 both file_name and byte_size are already documented. The description reinforces that the curl command runs from the file's folder, but adds little semantic detail beyond the schema's own explanation.

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 states a specific verb and resource ('Starts a PDF upload') and immediately distinguishes the tool's role from the downstream create_draft_from_upload step. An agent can understand exactly what this tool initiates without opening the schema.

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 explicitly directs the agent to call create_draft_from_upload next, clarifying the two-step flow. It does not discuss when to avoid this tool or compare it to other upload paths, but the sequencing guidance is clear and actionable.

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.