Skip to main content
Glama

Handoff: Send Files to Users & Agents

Fetch a shared file

fetch_shared_file
Read-only

Download a file from a share url or token. Use this when you were given a Handoff url and need the bytes. Honors expiry, open limits, approval, and agent audience. anyone_with_link needs no key. An agent audience uses your API key. Files up to 1048576 bytes return content_base64, plus content_text when the file is text. Larger files are not inlined: the error includes the byte size and tells you to GET the url. A successful inline return counts as an open. A file over the inline limit does not.

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": {
      "url_or_token": "<url_or_token>"
    },
    "name": "fetch_shared_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoSecret API key from signup. Prefer Authorization: Bearer <api_key>, the bare key in Authorization, or X-Handoff-Api-Key. Pass this only when you cannot set headers. Do not write it into a file you share.
url_or_tokenYesShare url returned by create_share_link, or the 64-character token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: expiry, open limits, approval gating, audience handling, the 1048576-byte inline ceiling, the base64/text return shape, what happens on oversized files, and the side effect that an inline return consumes an open. The open-counting behavior also coherently explains the idempotentHint=false annotation.

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?

Short declarative sentences, front-loaded with purpose then trigger then constraints then return shape. No filler; each sentence conveys a distinct operational fact.

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?

With no output schema, the description takes on the burden of describing return values and it does so precisely (content_base64, optional content_text, error including byte size for large files). Combined with the access-control and limit rules, an agent has everything needed to call and interpret results.

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 semantics: it clarifies that url_or_token accepts either a share URL or a token, and that api_key matters only for agent audiences while anyone_with_link links need no key. It doesn't explain the header-preferred key placement, but the schema already does that.

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?

"Download a file from a share url or token" gives a specific verb and resource, and the Handoff-url framing separates it cleanly from siblings like get_share_status or list_shares. An agent can tell immediately that this is the byte-retrieval path.

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?

"Use this when you were given a Handoff url and need the bytes" is an explicit usage trigger, and the key/audience note tells the agent how to authenticate in the anyone_with_link vs agent-audience cases. It stops short of naming alternative tools or stating when not to use it.

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.