Skip to main content
Glama

Request File Upload

request-file-upload

Step 1 of attaching a file to a memo. Returns a short-lived upload ticket ({ file_id, upload: { url, token }, max_size, expires_in }). The file BYTES are uploaded over plain HTTP straight to storage — they must NOT pass through this tool or the model context (never base64 the file into a tool argument). Flow: (1) call this with the target memo_id and the file's content_type; (2) HTTP POST to upload.url as multipart/form-data with exactly two fields — token set to upload.token, and file containing the bytes (read the file FROM DISK, e.g. curl -F "token=<token>" -F "file=@/path/to/file" <url>; size between 1 and max_size); (3) call confirm-file-upload with the same memo_id and file_id to record the file on the memo. Only text, media, PDF and office documents are accepted (text/, image/, audio/, video/, application/pdf, Word/Excel/PowerPoint, OpenDocument), up to max_size bytes (the per-file cap of the memo owner's plan). The ticket expires in ~15 min. If the byte upload fails because the network sandbox blocks it, the host shown in upload.url must be on the client's network allowlist — surface that exact host to the user to allow (in Claude Code it is also offered for one-click approval on first use); if it cannot be allowlisted (e.g. plain chat clients), hand the user the ready-to-run curl command so they upload it themselves from an unsandboxed terminal. Requires write access to the memo (its private owner, or a member of its project).

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": {
      "memo_id": "<memo_id>",
      "content_type": "<content_type>"
    },
    "name": "request-file-upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
memo_idYesId of the memo to attach the file to
content_typeYesMIME type of the file you will upload. Only TEXT, MEDIA, PDF and OFFICE documents are allowed: text/* (e.g. text/plain, text/markdown, text/csv), image/*, audio/*, video/*, application/pdf, and Word/Excel/PowerPoint (OOXML + legacy) / OpenDocument — anything else is rejected. The upload token locks the stored file to this exact type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, non-idempotent), and the description adds substantial context beyond them: the returned ticket shape, ~15 min expiry, max_size cap, content-type acceptance rules, write-access requirement, and sandbox/allowlist failure handling with a fallback. This is unusually rich behavioral disclosure.

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 step-1 framing and the return shape before the flow details. It is dense and lengthy, but every sentence carries operational information (flow, limits, error handling) that an agent needs, so it earns most of its space.

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 multi-step upload handshake with no output schema, the description supplies the return shape, the two-parameter POST contract, size/type limits, expiry, and permission requirements. An agent has everything needed to call it and to route the subsequent byte upload correctly.

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 coverage is 100% and both parameters are already documented in the schema (memo_id target, content_type restrictions and token-locking). The description largely restates the content-type acceptance list rather than adding new meaning, so the baseline 3 for high schema coverage is appropriate.

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+resource ('Step 1 of attaching a file to a memo') and explicitly distinguishes itself from the sibling confirm-file-upload by naming it as step 3 of the flow. An agent can tell exactly what this tool does versus its counterparts 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?

Gives an explicit ordered flow (call this → HTTP POST bytes → call confirm-file-upload), states when-not ('bytes must NOT pass through this tool or the model context'), and names the alternative endpoint and command form. Nothing about selection is 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.