Skip to main content
Glama

Upload a file

upload_note_file
Idempotent

Upload a file to use in a Note (Add only and up): any type, up to 5 MB, as base64 (it passes through your own output, so keep it small or ask the person to add a large one). It counts toward the same daily limit as images. For a Note that already exists, pass its note_id. Uploading does not add it to the Note: then put it on its own line in the Note's Markdown, name (the answer's markdown), or as a document block {"type": "file", "attrs": {"attachmentId": "<file_id>", "name": "…"}}. Place it once its state is uploaded (get_operation shows it); placed while checking, the write answers attachment_upload_in_progress: wait details.retry_after seconds and send it again.

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": {
      "operation_id": "<operation_id>",
      "thread_id": "<thread_id>",
      "name": "<name>",
      "checksum": "<checksum>",
      "data": "<data>"
    },
    "name": "upload_note_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe file as base64: any type, up to 5 MB.
nameYesIts name, with its extension; up to 255 characters.
note_idNoWhen the file goes in an existing Note: its id (required then).
checksumYesThe lowercase hex SHA-256 of the file bytes (not of the base64).
thread_idYesThe Thread of the Note the file goes in.
operation_idYesA new UUID for each write. After a lost answer, send the identical call with the same one, or check get_operation before writing again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency profile; the description adds the operationally important facts an agent cannot get elsewhere: the 5 MB cap, the shared daily quota with images, that base64 data passes through the agent's own output, and the asynchronous two-step lifecycle. It even documents the specific failure mode (attachment_upload_in_progress) with the retry_after remediation.

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 action and limits before the multi-step placement instructions, and every sentence carries actionable content. It is dense with parentheticals and runs long, which costs a point on readability, but there is little true waste.

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 6-parameter asynchronous upload tool with no output schema, the description covers limits, idempotency via operation_id, state polling through get_operation, placement formats, and the in-progress error with backoff. An agent has everything needed to call it and complete the workflow without guessing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: note_id is framed as conditionally required for existing Notes, and data is qualified with the practical warning that it transits the model's output and should be kept small. It does not add syntax detail for checksum or operation_id beyond the schema, keeping it just above baseline.

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?

Opens with a specific verb and resource ('Upload a file to use in a Note') and immediately scopes it as any file type up to 5 MB, which implicitly separates it from the sibling upload_note_image ('counts toward the same daily limit as images'). It also makes the crucial distinction that uploading is not the same as attaching, so an agent knows exactly what this call produces.

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 explicit conditional routing: pass note_id 'For a Note that already exists'. It states the negative case (uploading does not add it to the Note) and then names the two concrete follow-up forms to actually place the file, plus the prerequisite that placement must wait until state is 'uploaded' as shown by get_operation. That is when/when-not/alternatives all covered.

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.