Skip to main content
Glama

Get an Attachment

get_attachment
Read-only

A file someone sent back in a reply (get_replies lists them): a short-lived download URL (5 minutes — e.g. curl -sfL -o <name> "<url>"); an image up to 5 MB also comes back as an image you can see, and a small text file as text.

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": {
      "agent_id": "<agent_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesThe Agent (from list_agents or create_agent).
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond readOnlyHint=true, the description discloses the key behavioral traits: the download URL is short-lived (5 minutes) with a concrete curl usage example, images up to 5 MB are returned as viewable images, and small text files come back as text. These are non-obvious return behaviors an agent could not infer from annotations or schema.

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?

A single dense sentence that front-loads the resource definition and then the return behaviors. It is efficient, though the nested parentheticals (the curl example, the expiry note) make it slightly harder to scan than a short bulleted structure would be.

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?

For a 2-parameter read tool with no output schema, the description covers the essential unknown – what comes back and how long the URL lives. Remaining gaps (behavior when the URL expires, attachment_id format) are minor and partly covered by the schema for agent_id.

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 50%: agent_id is documented in the schema but attachment_id is not. The description implies attachment_id identifies a file sent in a reply, which partially compensates, but adds no format or sourcing detail beyond that hint. Baseline 3 is appropriate given partial schema coverage.

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?

The description defines the resource concretely as 'a file someone sent back in a reply' and implicitly the fetch action (retrieving a download URL / inline content). It distinguishes itself from get_replies by identifying that tool as the lister rather than the fetcher. The verb itself is only implied by the tool name rather than stated, so it falls short of the explicit verb+resource standard.

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?

It gives clear provenance guidance – attachments originate from replies and get_replies lists them – which tells an agent where to get the required attachment_id. It does not state when not to use it or contrast with create_attachment, but the usage context is unambiguous for a read tool.

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