Skip to main content
Glama

Get attachment

get_attachment
Read-onlyIdempotent

Fetch a specific attachment from Bugzilla by ID. Text-based content is returned decoded, while binary attachments are returned as base64 when include_content is enabled.

Instructions

Fetch a single attachment by ID. Text-based attachments (patches, logs, text, JSON, HTML, source code) are returned decoded as text; binary attachments are returned as base64 when include_content is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_charsNoTruncate decoded text content to this many characters
attachment_idYes
include_contentNoInclude the attachment content

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds valuable beyond-annotation context: text attachments are decoded, binary attachments are base64 when include_content is set. No contradiction with 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?

Two compact sentences front-load the primary action and then add return-format behavior. Every clause earns its place with no filler.

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?

Covers the main retrieval scope and return encoding behavior, and annotations handle safety semantics. Without an output schema, it leaves a minor gap around what is returned when include_content is false and around error behavior.

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?

The description maps 'by ID' to attachment_id and explains include_content's effect on binary content, adding meaning beyond the schema. It does not mention max_chars, though the schema already documents truncation; with 67% schema coverage, the description partially compensates.

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?

States 'Fetch a single attachment by ID' — a specific verb and resource that clearly defines the operation. The text/binary return distinction further scopes behavior and differentiates it from the sibling get_bug_attachments list tool.

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?

Clear that this is single-ID retrieval rather than listing attachments, so an agent can infer it is not for collection listing. However, it never explicitly names get_bug_attachments as the alternative or gives a when-not-to-use condition.

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