Skip to main content
Glama

jira_add_attachment

Upload images or documents to a Jira issue using a public file URL or base64 content; returns attachment ID and download URL.

Instructions

Uploads an attachment (image, document, etc.) to a Jira issue.

EFFICIENT METHOD (recommended for large files):

  • fileUrl: Provide URL to remote file - MINIMAL tokens (~60 tokens) Example: Upload to Dropbox/S3/imgur first, then provide URL

DIRECT METHOD (for small files):

  • content: Base64 encoded content - WARNING: HIGH token cost (~330,000 tokens for 1MB file) Only suitable for small files (< 500 KB)

Returns attachment metadata including ID and download URL. To reference the image in a comment or description, use wiki markup: !filename.png! or !filename.png|thumbnail!

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": {
      "issueKey": "<issueKey>",
      "filename": "<filename>"
    },
    "name": "jira_add_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentNoBase64-encoded or plain text content. WARNING: HIGH token cost (~330k tokens for 1MB file). Use fileUrl for large files or upload to cloud storage first.
fileUrlNoURL to download file from (efficient for remote files, ~60 tokens). Upload large files to Dropbox/S3/imgur first, then use URL. Only public http(s) URLs: localhost, private and link-local addresses are refused, also after a redirect.
filenameYesName of the file to attach
isBase64NoWhether content is base64-encoded (default: true). Set to false for plain text files.
issueKeyYesIssue key to add attachment to (e.g., PROJECT-123)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.12.3
    • changedInput schema / properties / fileUrl / description
      Previous value: -"URL to download file from (efficient for remote files, ~60 tokens). Upload large files to Dropbox/S3/imgur first, then use URL."New value: +"URL to download file from (efficient for remote files, ~60 tokens). Upload large files to Dropbox/S3/imgur first, then use URL. Only public http(s) URLs: localhost, private and link-local addresses are refused, also after a redirect."
  2. Changed7 schema fields changedv1.11.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / content
      Added value: +{
      +  "description": "Base64-encoded or plain text content. WARNING: HIGH token cost (~330k tokens for 1MB file). Use fileUrl for large files or upload to cloud storage first.",
      +  "type": "string"
      +}
    • addedInput schema / properties / fileUrl
      Added value: +{
      +  "description": "URL to download file from (efficient for remote files, ~60 tokens). Upload large files to Dropbox/S3/imgur first, then use URL.",
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "description": "Name of the file to attach",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / isBase64
      Added value: +{
      +  "default": true,
      +  "description": "Whether content is base64-encoded (default: true). Set to false for plain text files.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / issueKey
      Added value: +{
      +  "description": "Issue key to add attachment to (e.g., PROJECT-123)",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "issueKey",
      +  "filename"
      +]
  3. Addedv1.10.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, so the description adds real value: token-cost profiles per method (~60 tokens for fileUrl vs ~330k per MB for base64), a size threshold, and the return contract ('attachment metadata including ID and download URL'). It does not discuss permission requirements or failure modes for oversized or rejected uploads, which keeps it short of a 5.

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?

Well front-loaded with the core action first, and the two-method block format is easy to scan. There is some duplication of the token-cost warnings between the description body and the schema, and the parenthetical '(image, document, etc.)' adds little, but the prose is otherwise lean.

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 five-parameter mutation tool with no output schema, the description covers what is uploaded, how to choose between the two content sources, what comes back (ID and download URL), and how to use the result downstream. Nothing an agent needs in order to call this 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%, so the baseline is 3; the description nonetheless frames the two optional content parameters as a mutually exclusive choice with cost implications, which is interpretive value beyond the field-level schema text. The fileUrl security restriction appears only in the schema, not the description, so it is not fully independent.

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 definition opens with a specific verb and resource: 'Uploads an attachment (image, document, etc.) to a Jira issue.' An agent can immediately distinguish this write operation from siblings such as jira_get_attachments or jira_delete_attachment without needing to read further.

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 gives explicit method-selection guidance ('EFFICIENT METHOD' for large files via fileUrl, 'DIRECT METHOD' for small files under 500 KB via content) plus a follow-up hint about wiki markup for referencing the uploaded file in comments or descriptions. It stops short of naming sibling tools such as jira_get_attachments as a verification step after upload, but the method branching is unusually clear.

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