Skip to main content
Glama

list_attachments

Read-only

Fetch attachments for a test case, test run, test result, or one step; each record returns the id for deletion and the URL for download.

Instructions

List the attachments of a test case, test run (cycle), test result, or of one step of a case or result (GET /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. These endpoints take no pagination and no fields projection — the full list always comes back. Step attachments are aggregated ASYMMETRICALLY (verified live): the test-case list EXCLUDES attachments that live on the case steps, while the test-result list INCLUDES them — so enumerating a case's evidence needs one extra call per step, and doing the same on a result double-counts. An out-of-range stepIndex answers 404 (an in-range step with no attachments answers []), and a testResultId that does not exist answers [] rather than 404, unlike a bogus test case or run key. Returns the API's array of attachment records as-is; each record carries the numeric id delete_attachment needs and the url download_attachment accepts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesEntity family the attachment belongs to; it decides which identifier is required
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.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description goes well beyond that: no pagination and no fields projection, asymmetric step aggregation verified live, 404 for out-of-range stepIndex versus [] for an in-range step with no attachments, and [] rather than 404 for a nonexistent testResultId while a bogus case/run key errors. That is exactly the extra behavioral context the annotations cannot carry.

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?

Purpose, addressing rules, and constraints are front-loaded in that order, and the Cross-references to delete_attachment/download_attachment close the loop. The middle section is dense and runs several independent constraints into single sentences, so it is slightly heavier than needed, but nearly every clause carries distinct information.

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?

There is no output schema, and the description compensates by describing the return value: the API's array of attachment records as-is, each carrying the numeric id delete_attachment needs and the url download_attachment accepts. Combined with the error semantics and per-target rules, nothing an agent needs 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 description coverage is 100%, so the baseline is 3, but the description adds real semantics beyond the schema: which target/identifier pairing is required, that an unmatched identifier is rejected, and the divergent error behavior of stepIndex and testResultId (404 vs []). It stops short of restating formats for every field, but the additions are meaningful rather than duplicative.

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 (List) and resource (attachments) and enumerates the exact entity families it covers: test case, test run/cycle, test result, or a single step of a case/result, with the concrete URL templates. It is clearly distinguishable from the Jira sibling jira_list_attachments and from download_attachment/delete_attachment, which it references by name.

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 maps each target enum value to its required identifier ('test_case' needs testCaseKey, 'test_run' needs testRunKey, 'test_result' needs testResultId), states that mismatched identifiers are rejected, and restricts stepIndex to 'test_case'/'test_result'. It even gives the operational consequence for step enumeration (one extra call per step for cases; double-counting risk for results).

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