Skip to main content
Glama

Attach a file, through a link or your sandbox

upload_link

Attach a file (a ticket PDF, a booking screenshot, a QR code) to an item; or, with as "photo", a picture of a place, stay or option that your human says is of it, shown as its photo. Only when your human asks, with a file they gave you. If your host passes files to tools (ChatGPT), use attach_file instead. Returns put_url and url:

  • With a shell that reaches the internet (Claude's code tool, Claude Code, Codex), send the file's bytes yourself: curl -fsS -T -H "X-File-Name: " "<put_url>". It takes one file, within 10 minutes, and replies with it.

  • Otherwise, or if that fails, give your human url: it opens that record's card on the web with the upload ready. On Claude, when your sandbox couldn't reach app.tripmo.me, also tell them they can allow it (Settings > Capabilities, code execution's allowed domains) so files go straight in next time. Never paste a file's contents (base64) into a call. PDF or an image, up to 20 MB. More in guide "files". To list a record's files, query with include ["files"]; to remove one, write {op:"delete", id:"fil_…"}.

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": {
      "trip": "<trip>",
      "record": "<record>"
    },
    "name": "upload_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
asNoLeave it out, or "file", for a ticket, a confirmation, a screenshot or a QR code. "photo" only when your human says it's a picture of the place (an image): it then shows as the item's photo.
tripYesThe trip id, e.g. "trp_8Kd2…", from list_trips.
recordYesThe item (itm_…) the file goes on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / as / description
      Previous value: -"Leave it out, or \"file\", for a ticket, a confirmation, a screenshot or a QR code. \"photo\" only when your human says it's a picture of the place (an image of an item, not a document): it then shows as the item's photo."New value: +"Leave it out, or \"file\", for a ticket, a confirmation, a screenshot or a QR code. \"photo\" only when your human says it's a picture of the place (an image): it then shows as the item's photo."
    • changedInput schema / properties / record / description
      Previous value: -"The item (itm_…) or the person's own travel document (doc_…)."New value: +"The item (itm_…) the file goes on."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say this is a non-destructive, non-idempotent mutation; the description adds the real behavioral burden: it returns put_url and url, a single file per call, a 10-minute window, PDF/image up to 20 MB, a hard 'never paste base64' rule, and a documented fallback when the sandbox cannot reach the host. It also points at query include ['files'] and write {op:'delete'} for follow-up. No contradiction with annotations.

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 purpose, then cleanly bulleted by upload path, with the constraints last. It is long, but nearly every sentence is operational (limits, idempotency of retry, error fallback); the only marginal content is the Claude allowed-domains tip, and the 'photo' restatement slightly duplicates the schema.

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?

There is no output schema, and the description compensates by naming both return fields and explaining what to do with each. For a multi-step upload tool it covers purpose, prerequisites, transfer mechanics, failure recovery, and cleanup paths, so an agent has everything needed to call it 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%, including a full enum description for 'as', so the schema already carries parameter meaning and the baseline is 3. The description restates the 'photo' semantics and implies trip/record scoping, but adds no format or syntax detail beyond what the schema provides.

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 (attach) and resource (a file to an item), enumerates concrete file types, and explicitly distinguishes the 'photo' mode. It also names the sibling it is not for file-passing hosts (attach_file), so the agent can route without opening either 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 precondition ('Only when your human asks, with a file they gave you') and an explicit alternative for hosts that pass files to tools ('use attach_file instead'). It then branches the remaining workflow by capability (internet-reaching shell vs. handing url to the human), leaving nothing 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.

Resources