Skip to main content
Glama

Get attachment metadata

get_attachment
Read-onlyIdempotent

Fetch attachment metadata (filename, MIME type, source, download/thumbnail URIs) from Google Chat by resource name. Uses service-account auth; user-auth flows read the same info from the message attachment field.

Instructions

Fetches metadata of one message attachment by its resource name (from a message's attachment[].name): contentName (filename), contentType (MIME), source (DRIVE_FILE or UPLOADED_CONTENT), downloadUri/thumbnailUri (short-lived, for a signed-in browser user — not for server-side download) and attachmentDataRef. NOTE the auth split: this dedicated endpoint accepts only APP (service-account) authentication — with user credentials it returns an error, but the SAME metadata is already embedded in get_message's attachment[] field, so user-auth flows should read it there. Downloading raw bytes goes through the media endpoint (v1/media/?alt=media) and uploading new attachments through the upload endpoint — both outside this server's tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachmentYesThe attachment resource name from a message's attachment[].name.
Behavior5/5

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

Annotations already mark the tool read-only, idempotent, and non-destructive. The description goes far beyond that by disclosing the auth split (user credentials return an error), the short-lived nature of downloadUri/thumbnailUri and their browser-only suitability, and the fact that the metadata is duplicated in get_message. This is rich behavioral context with no contradiction to the annotations.

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?

The description is longer than average, but every sentence earns its place: return fields, auth restriction, alternative location for the same data, and endpoint boundaries for download/upload. The core action is front-loaded, and the supporting details are logically ordered with explicit notes.

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?

For a single-parameter read-only metadata fetch with no output schema, the description covers everything an agent needs: input source, returned fields, authentication constraints, the sibling alternative, and related endpoint routing. Nothing is missing for correct invocation and interpretation.

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%: the only parameter, 'attachment', is already described as 'The attachment resource name from a message's attachment[].name.' The tool description repeats this origin but adds no new meaning beyond the schema. Baseline 3 is appropriate because the schema carries the semantic load.

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?

The description opens with a specific verb and resource: 'Fetches metadata of one message attachment by its resource name.' It lists the exact fields returned and explicitly distinguishes this from get_message, which already embeds the same metadata. An agent can immediately tell what this tool does and how it differs from its closest sibling.

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

Usage Guidelines5/5

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

The description gives an explicit when-to-use and when-not-to-use: it accepts only APP (service-account) authentication, while user-auth flows should read the same metadata from get_message's attachment[] field. It also routes raw byte downloads to the media endpoint and uploads to the upload endpoint, both outside this server's tools. No inference is required.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-chat'

If you have feedback or need assistance with the MCP directory API, please join our Discord server