Skip to main content
Glama

add_attachment

Attach a file to an issue: pass its bytes as 'contentBase64', or its content as 'text' when the file is text. Attaching a filename the issue already has replaces that file rather than adding a second copy, so retrying this call cannot double it. Returns the attachment's download URL. Requires permission to edit issues in that project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesIssue key, e.g. 'UK-1'.
textNoThe file's content as text, stored as UTF-8 — for a log, CSV or Markdown file you are writing here. Alternative to 'contentBase64'; passing both is refused.
filenameYesFile name to store, e.g. 'report.pdf'. Any directory part is dropped.
mimeTypeNoContent type to record for the listing, e.g. 'text/csv'. Ignored when the bytes identify themselves (a PNG is a PNG whatever you call it), and never used to serve the file.
contentBase64NoThe file's bytes, base64-encoded (a 'data:…;base64,…' URL is accepted and unwrapped). Use 'text' instead when the file is text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it delivers: it discloses that reusing an existing filename replaces the old file, retrying is safe, a download URL is returned, and editing permission is required. This is substantial, non-obvious behavioral context beyond simply 'attaches a file'.

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?

Four compact sentences, each earning its place: payload selection, replacement/idempotence semantics, return value, and authorization. The most important usage information is front-loaded.

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 tool with 5 parameters, no annotations, and no output schema, the description plus schema gives an agent everything needed to call it correctly: parameter choice, duplicate-handling behavior, return value, and permission requirements. No critical operational gap remains.

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 description coverage is 100%, so the baseline is 3, but the description adds meaningful cross-parameter guidance: use 'text' for text files and 'contentBase64' for bytes. It also clarifies the 'filename' parameter by explaining replacement behavior. The remaining parameters are already well documented in the schema.

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 states a specific verb and resource: attach a file to an issue. It also distinguishes the two ways to provide the file and naturally differentiates from siblings like add_wiki_attachment by scoping to issues.

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?

It clearly describes when to use the tool and which parameter to choose for binary vs text content, and it notes the required edit permission. However, it does not explicitly name sibling alternatives like add_wiki_attachment or state when not to use them, so it falls just short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources