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. 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

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.8/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 burden and delivers: discloses the replace-rather-than-duplicate idempotency behavior, the permission requirement (edit issues), the return value (download URL), and that mimeType is never used to serve the file. All beyond what any annotation would give.

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?

The description is several sentences but every one earns its place — idempotency, alternative routing, permission, and return value. Slightly long, but the density of useful guidance justifies the length.

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 complex tool with 5 parameters, no annotations, and no output schema, the description covers the return value, permissions, edge cases (data URL unwrapping, replace behavior, MIME serving), and the alternative tool. Nothing an agent needs to call it correctly is missing.

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%, but the description adds meaning beyond the schema: contentBase64 accepts data URLs and unwraps them, text is stored as UTF-8, passing both is refused, and filename directory parts are dropped. It enriches every parameter's semantics.

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 ('Attach a file to an issue') and distinguishes from the sibling add_wiki_attachment by making the target resource clear. The opening clause leaves no ambiguity about what the tool does.

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?

Explicitly explains when to pass text vs contentBase64, and proactively routes local disk files to the pm-files MCP server via local_files_setup, naming a concrete alternative and exclusion condition. This is model usage 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