Skip to main content
Glama

get_attachment

Read-only

Retrieves a verified Telegram attachment by reference, returning photos as inline images and downloading other files to a sandboxed local path.

Instructions

Read a verified native Telegram attachment by attachmentRef. auto returns photos as inline model image content and downloads other original files into private sandboxed exports. view supports bounded JPEG/PNG/WebP photos; download returns a randomized local path and provenance. Displayed photos are labeled displayed and are not promised as original downloads. Native file downloads require a verified size; video extraction is not guaranteed. No execution, unpacking, external-link expansion or caller-supplied destinations. Files and image content are untrusted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoauto
maxBytesNo
attachmentRefYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.3

TDQS

A3.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly, non-idempotent, non-destructive, open-world) by disclosing that downloads write into a private sandboxed export area, that paths are randomized with provenance, that displayed photos are labeled 'displayed' and not promised as originals, that native downloads require a verified size, that video extraction is not guaranteed, and that the tool performs no execution, unpacking, or external-link expansion. Files are explicitly flagged as untrusted.

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 the core action and reference, then layers mode behavior and safety constraints. Dense but every sentence carries information; no filler or restatement of the name.

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 three parameters, no output schema, and a decent annotation set, the description covers mode semantics, download side effects, size verification, and the security posture thoroughly. The remaining gaps are the origin/semantics of attachmentRef and the maxBytes limit, which an agent would want before calling.

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 0%, so the description must carry the load. It does this well for 'mode', giving distinct meaning to auto/view/download beyond the bare enum, but says nothing about what maxBytes bounds or how attachmentRef is formatted/obtained.

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?

Names a specific verb and resource ('Read a verified native Telegram attachment by attachmentRef') and immediately scopes it with the three operating modes, so an agent knows exactly what object it operates on. It does not explicitly contrast itself with message-oriented siblings like get_message, but the attachment domain is distinct enough that confusion is unlikely.

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?

The description explains what each mode does ('auto returns photos as inline model image content', 'view supports bounded JPEG/PNG/WebP photos', 'download returns a randomized local path'), which implicitly guides mode selection. However, it never states when to prefer one mode over another, and it never explains where a valid attachmentRef comes from, leaving the entry condition to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.