Skip to main content
Glama

Handoff: Send Files to Users & Agents

Share a file

share_file

Share a file in one call and get a download link. Pass name and content_text (or content_base64). Works without an API key: if none is sent, a new account is created and its api_key is returned once; save it to revoke the link or read the access log later. Default link: anyone with the link, expires in 7 days.

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

Input Schema

NameRequiredDescriptionDefault
refNoOptional attribution label. Lowercase letters, digits, dot, underscore, or hyphen. At most 64 characters.
mimeNoMIME type. Inferred from the file name when omitted.
nameYesFile name with an extension. No slashes or control characters.
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.
audienceNoDefault anyone_with_link.
max_opensNoSuccessful downloads allowed. Omit for no limit.
content_textNoUTF-8 text. Pass exactly one of content_text or content_base64.
audience_valueNoRequired when audience is agent.
content_base64NoStandard or url-safe base64. A data:*;base64, prefix is stripped. Example: aGk=
expires_in_hoursNoHours until the link expires. Default 168 (7 days).
requires_approvalNoDefault false. When true, downloads wait until the owner approves.

Output Schema

NameRequiredDescriptionDefault
urlYes
nextYes
api_keyNo
file_idYes
grant_idYes
max_opensYes
expires_atYes
token_prefixYes
requires_approvalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / content_base64 / description
      Previous value: -"Standard base64 file bytes. Do not include a data: URL prefix."New value: +"Standard or url-safe base64. A data:*;base64, prefix is stripped. Example: aGk="
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Adds substantive behavior beyond annotations: the return is a download link, the api_key is returned only once and must be saved to revoke or read the access log, and the default sharing policy is anyone-with-link with 7-day expiry. Annotations only declare non-readonly/non-destructive/open-world, so this extra context carries real weight.

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?

Four dense sentences with the core action first, then the input contract, then the no-key caveat, then the default policy. Every sentence carries information an agent needs; nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 11 params, full schema coverage, and an output schema present, the description covers the highest-risk gotcha (one-time api_key return that must be persisted). It omits the audience=agent/audience_value interaction and the one-shot side effect of creating an account, but the schema and output schema cover the remainder.

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 all 11 parameters are already documented, including defaults for audience, expires_in_hours, and requires_approval. The description's parameter mentions (name, content_text/content_base64, defaults) restate schema content rather than adding syntax or constraint meaning, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource+outcome: share a file and get a download link, all in one call. The 'in one call' phrasing implicitly distinguishes it from the multi-step save_file/create_share_link path, but no sibling is named, so differentiation is inferred rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a conditional usage path ('works without an API key: a new account is created'), which is genuinely useful routing information. However it never states when to prefer this over create_share_link, save_file, or signup, and offers no exclusions, leaving the alternative selection ambiguous among 14 siblings.

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.