Get attachment metadata
get_attachmentFetch 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
| Name | Required | Description | Default |
|---|---|---|---|
| attachment | Yes | The attachment resource name from a message's attachment[].name. |