Skip to main content
Glama

attachment_share

Shares a file from the attachments directory as a chat card with a download button, letting clients fetch bytes on demand so conversations stay small; use it to show images instead of describing them.

Instructions

Put a file from the attachments directory in front of the user, as a card in the chat with a download button. Use this instead of pasting a file:// link when you have produced a file for them. The BYTES are never sent with this call: the client fetches them on demand, so the conversation stays small and reopening the chat costs nothing. A file outside the attachments directory is COPIED IN automatically when its directory is one the operator listed in ATTACHMENTS_IMPORT_ROOTS (render output dirs, typically); anything else must be copied into the attachments directory first. Sharing an IMAGE is how you show the user a picture — do that instead of describing it in prose, and do NOT read_image it first: read_image loads the pixels into YOUR context (thousands of tokens per picture, so a handful exhausts the window) and shows the user nothing. One call per file is expected; a gallery of a dozen renders is a dozen calls.

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": {
      "path": "<path>"
    },
    "name": "attachment_share"
  }
}

Input Schema

NameRequiredDescriptionDefault
mimeNoMIME type, if you know it.
nameNoName to show the user; defaults to the stored name.
pathYesAbsolute path under the attachments directory, or under a configured import root (copied in).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that file bytes are never sent in the call, the client fetches on demand, and this keeps the conversation small and reopening cheap. It also explains the automatic copy-in behavior for import roots, the failure mode for other out-of-directory paths, and the token cost of the read_image alternative.

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?

It is front-loaded with the core action and the alternative-routing guidance, and nearly every sentence carries a distinct instruction. It runs long for a one-parameter tool and uses emphatic capitalization, but the length is justified by the number of non-obvious behaviors it must convey.

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 tool with no annotations, no output schema, and three well-documented parameters, the description covers what the call does, what the user sees, what is not transmitted, copy-in rules, and calling cadence. The only modest gap is that it does not say what the call returns to the agent (e.g., a reference or message id), which matters slightly given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns more by explaining that path may be an absolute path under the attachments directory OR under a configured import root (in which case it is copied in), which is semantic context the schema only hints at. It does not further clarify mime or name beyond what the schema already states.

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 first sentence gives a concrete verb and resource: place a file from the attachments directory in front of the user as a chat card with a download button. It differentiates from siblings by explicitly contrasting with pasting a file:// link and with read_image, so an agent can tell which tool to pick without opening any schema.

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?

It states when to use this tool (you produced a file for the user; you want to show an image), when NOT to (do not paste a file:// link, do not read_image first, do not describe a picture in prose), and the prerequisite for files outside the attachments directory (must be under a configured ATTACHMENTS_IMPORT_ROOTS directory or copied in first). It even sets batching expectations: one call per file, a dozen renders is a dozen calls.

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