Skip to main content
Glama
vilaabo

zephyr-scale-mcp

by vilaabo

upload_attachment

Upload a file as an attachment to a Zephyr Scale test case, test run, or test result. Optionally attach to a specific step of a test case or result.

Instructions

Upload a file as an attachment to a Zephyr Scale test case, test run (cycle) or test result — optionally to a single step (POST multipart/form-data to /testcase/{key}[/step/{i}]/attachments, /testrun/{key}/attachments or /testresult/{id}[/step/{i}]/attachments). Addressing: target 'test_case' requires testCaseKey (stepIndex optional to address a specific step); target 'test_run' requires testRunKey (no step addressing — the API has no per-step endpoint for runs); target 'test_result' requires testResultId (stepIndex optional). Pass ONLY the identifier that matches the chosen target. filePath must be an absolute path of a file ON THE MACHINE RUNNING THIS MCP SERVER (the file is read from local disk). Returns the attachment metadata reported by the API, or { uploaded, fileName, size } when the API responds with an empty body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesKind of entity the attachment belongs to: test_case, test_run or test_result
fileNameNoFile name to store in Zephyr Scale; defaults to the basename of filePath
filePathYesAbsolute path of the file to upload on the machine running this MCP server
stepIndexNo0-based step index to address a single step instead of the whole entity (targets 'test_case' and 'test_result' only)
testRunKeyNoTest run (cycle) key, e.g. PROJ-R123 — required when target is 'test_run'
testCaseKeyNoTest case key, e.g. PROJ-T123 — required when target is 'test_case'
testResultIdNoNumeric test result id — required when target is 'test_result'. Result ids are returned by create_test_result / update_last_test_result / get_test_run_results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

With empty annotations, the description carries the full burden. It discloses that filePath must be an absolute path on the MCP server, explains the response format including a fallback for empty API responses, and notes step assignment constraints.

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 comprehensive but not overly verbose. It front-loads the main purpose and then systematically details the addressing rules. Every sentence adds necessary 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?

Despite no output schema, the description fully explains the return value. It covers all three target types, parameter constraints, file path requirements, and step addressing limitations, making it complete for an agent to invoke correctly.

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%, but the description adds value by clarifying which identifier is required per target, the stepIndex applicability, and the default for fileName. This goes beyond the schema's basic 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?

Clearly states the tool uploads a file as an attachment to Zephyr Scale entities (test case, test run, test result) optionally to a step. Distinguishes from siblings like delete_attachment, download_attachment, list_attachments.

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?

Provides explicit guidance on target selection and required identifiers, including the limitation that test_run does not support step addressing. Though it doesn't state when not to use, the context is clear enough for an agent.

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