Skip to main content
Glama

Handoff: Send Files to Users & Agents

Create a share link

create_share_link

Create a controlled download link for a file you own. Use this when a person or another agent should fetch the file. The response includes url and token ONCE, plus expires_at and max_opens. Save the url immediately. Later status calls do not return it. When expires_in_hours is omitted, the link expires in 7 days. Download with GET on that url. Requires your API key.

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.
file_idYesFile id returned by save_file or list_files.
audienceYesanyone_with_link: whoever has the saved url. agent: only the registered agent_id in audience_value.
max_opensNoSuccessful downloads allowed. The next one is refused.
audience_valueNoRequired for agent: the recipient's registered agent_id. Example: their-agent
expires_in_hoursNoHours until the link expires. Default 168 (7 days) when omitted.
requires_approvalNoWhen true, downloads wait until the owner approves the grant.

Output Schema

NameRequiredDescriptionDefault
urlYes
tokenYes
grant_idYes
max_opensYes
expires_atYes
token_prefixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / audience_value / description
      Previous value: -"Required for agent: the recipient's registered agent_id."New value: +"Required for agent: the recipient's registered agent_id. Example: their-agent"
    • changedInput schema / properties / expires_in_hours / description
      Previous value: -"Stop serving the file after this many hours."New value: +"Hours until the link expires. Default 168 (7 days) when omitted."
    • addedInput schema / properties / file_id / minLength
      Added value: +1
    • addedOutput schema / properties / expires_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / max_opens
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "grant_id",
      -  "url",
      -  "token",
      -  "token_prefix"
      -]New value: +[
      +  "grant_id",
      +  "url",
      +  "token",
      +  "token_prefix",
      +  "expires_at",
      +  "max_opens"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "grant_id": {
      +      "type": "string"
      +    },
      +    "token": {
      +      "type": "string"
      +    },
      +    "token_prefix": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "grant_id",
      +    "url",
      +    "token",
      +    "token_prefix"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the url/token are returned exactly once and never again in later status calls, the link defaults to a 7-day expiry, and the download mechanism is a plain GET. Annotations only say non-read-only, non-idempotent, non-destructive; the description supplies the irreversibility warning that actually matters here.

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?

Front-loads the highest-risk fact (url and token returned ONCE, save the url immediately) before mechanics and defaults. Every sentence carries a distinct operational fact with no filler.

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?

Despite 7 parameters, an output schema, and an auth requirement, nothing an agent needs to call this correctly is missing: the audience distinction, the agent_id recipient path, the one-time credential, and the expiry default are all covered.

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 parameters like api_key, audience, and max_opens are already fully documented. The description restates the api_key requirement and the expires_in_hours default (168) that the schema already declares, adding no new constraint or format detail.

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 specific verb and resource ('Create a controlled download link for a file you own') with the ownership precondition. It does not differentiate itself from the sibling share_file, which is the obvious near-neighbor an agent would confuse it with.

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 a person or another agent should fetch the file' gives a concrete triggering condition, and the audience enum values are reinforced in the schema. No exclusions or alternative routing (e.g. vs share_file) are given, so it falls short of the 5 bar.

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.