Skip to main content
Glama

Add attachment

add_attachment
Destructive

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. A file on the person's own disk — a screenshot, a PDF — is better attached by path through the pm-files MCP server than typed out as base64; local_files_setup says how to connect it. Returns the attachment's download URL. Requires permission to edit issues in that project.

Input 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
Behavior4/5

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

Annotations already flag destructiveHint=true; the description earns credit for making that concrete — attaching an existing filename replaces that file rather than duplicating, so retries cannot double it. It also discloses the required permission (edit issues in the project) and that it returns a download URL. Only size limits or failure modes are left unstated.

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 sentences, core action front-loaded, then the replacement/idempotency guarantee, then the alternative path, then return value and permission. No sentence restates the schema or the annotations verbatim.

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 5-param mutation tool with no output schema, it covers what an agent needs: content encoding choice, replacement semantics, the preferred alternative for local files, the returned URL, and the permission gate.

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% and each param is well documented, so the baseline is 3. The description adds real value on top by framing text vs contentBase64 as a decision with a mutual-exclusion rule and by pointing at an external server for the local-path case.

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 a specific verb and resource plus scope ('Attach a file to an issue'), and immediately enumerates the two content modes. The scope word 'issue' distinguishes it from the sibling add_wiki_attachment without needing to name it.

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?

Gives explicit when-to-use-which guidance: 'contentBase64' for bytes, 'text' when the file is text, and routes local-disk files (screenshots, PDFs) to the pm-files MCP server via local_files_setup rather than base64. It also tells the agent that retrying is safe, which is a usage condition in itself.

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