Skip to main content
Glama

upload_attachment

Attach a local file from the MCP server's disk to a Zephyr Scale test case, test run, test result, or step, using the target key or ID.

Instructions

Attach a local file to a test case, test run (cycle), test result, or to one step of a case or result (POST multipart/form-data /testcase/{key}[/step/{i}]/attachments, /testrun/{key}/attachments, /testresult/{id}[/step/{i}]/attachments). Addressing: 'test_case' needs testCaseKey, 'test_run' needs testRunKey, 'test_result' needs testResultId (numeric); an identifier that does not match the target is rejected. stepIndex is accepted for 'test_case' and 'test_result' only — API v1 has no per-step attachments endpoint for runs. filePath is read from the disk of the machine running this MCP server, not from the caller. Uploads are not idempotent: calling twice creates two attachments. A bogus testResultId is rejected here with 404 even though list_attachments answers [] for it (verified live). Returns the attachment metadata the API reports — on the reference build always a bare { id }, with neither the file name nor the size echoed back, so verifying an upload costs a list_attachments call — or { uploaded: true, fileName, size } when the API answers with an empty body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesEntity family the attachment belongs to; it decides which identifier is required
fileNameNoFile name to store in Zephyr Scale, extension included; defaults to the basename of filePath. Stored verbatim, Unicode and spaces included — except that the API strips any directory prefix, so "../dir/report.png" is stored as "report.png".
filePathYesPath of the file to read and upload, on the machine running this MCP server (absolute path recommended)
stepIndexNo0-based index of a single step, instead of the whole entity (targets 'test_case' and 'test_result' only)
testRunKeyNoTest run (cycle) key, e.g. PROJ-R123 (PROJ-C123 on older instances) — required when target is 'test_run'
testCaseKeyNoTest case key, e.g. PROJ-T123 — required when target is 'test_case'
testResultIdNoNumeric test result (execution) id — an id, NOT a key; returned by create_test_result, update_last_test_result and get_test_run_results — required when target is 'test_result'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares non-idempotency ('calling twice creates two attachments'), that filePath resolves on the MCP server's disk rather than the caller's, and the 404-vs-[] divergence between this tool and list_attachments. These are exactly the behaviors an agent cannot infer from the schema.

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?

Front-loaded with the action and endpoint list, then addressing rules, then return semantics. It is long and dense in a single block, and the parenthetical endpoint list is somewhat heavy, but nearly every sentence carries operational information an agent needs.

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?

No output schema exists, and the description compensates by describing the return shape in both cases ('bare { id }' vs '{ uploaded: true, fileName, size }') and noting that verification requires a list_attachments call. For a 7-param mutation tool with no annotations, nothing material is left unstated.

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 already 100%, so the baseline is 3, but the description adds cross-parameter logic the schema cannot express: the target→identifier requirement mapping, that stepIndex only applies to 'test_case'/'test_result', and that testResultId is an id, not a key. This genuinely reduces mis-invocation risk beyond the per-field descriptions.

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 local file') and enumerates the exact entity families it can target, immediately distinguishing it from the Jira-side jira_upload_attachment and from upload_automation_results/upload_cucumber_results siblings.

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?

Explains the addressing contract (which identifier each target requires, that a mismatched identifier is rejected) and where stepIndex is valid, plus the API-version limitation for runs. It does not explicitly name a sibling alternative for attaching to Jira issues, so it stops just short of a full when/when-not routing statement.

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

Deploy Server

Other Tools