Skip to main content
Glama
uarlouski

TestRail MCP Server

by uarlouski

add_attachment

Attach a file or auto-zipped directory to a TestRail test case, run, or result for evidence and documentation. Supports uploads up to 256MB.

Instructions

Add an attachment to a test case, test run, or test result in TestRail. If the file_path points to a directory, it will be automatically zipped before uploading. Maximum upload size is 256MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesThe ID of the entity to attach the file to (e.g. 123 or 'C123' for cases, or numeric run / result ID)
file_pathYesThe path to the file or directory to attach. Directories will be automatically zipped.
entity_typeYesThe type of entity to attach the file to ('case', 'run', or 'result')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.10.0
    • changedInput schema / properties / entity_id / description
      Previous value: -"The ID of the entity to attach the file to (e.g. 123 or 'C123' for cases, or numeric run ID)"New value: +"The ID of the entity to attach the file to (e.g. 123 or 'C123' for cases, or numeric run / result ID)"
    • changedInput schema / properties / entity_type / description
      Previous value: -"The type of entity to attach the file to ('case' or 'run')"New value: +"The type of entity to attach the file to ('case', 'run', or 'result')"
    • changedInput schema / properties / entity_type / enum
      Previous value: -[
      -  "case",
      -  "run"
      -]New value: +[
      +  "case",
      +  "run",
      +  "result"
      +]
  2. Changed2 schema fields changedv2.9.0
    • removedInput schema / properties / entity_id / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / entity_id / type
      Added value: +[
      +  "number",
      +  "string"
      +]
  3. Addedv2.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare the safety profile (not read-only, not destructive, not idempotent), so the description is free to add operational detail. It contributes real behavior beyond annotations: automatic zipping when file_path is a directory and a 256MB maximum upload size. It does not say what happens on duplicate filenames or how large attachments are reported.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, zero filler, and the core action is front-loaded before the two conditional constraints. Every sentence carries information an agent would otherwise have to guess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter mutation tool with full schema coverage, annotations covering safety, and no output schema, the description covers the notable edge cases (directories, size limit). The main gap is the absence of any statement about the result of a successful upload or failure modes, which an agent might want.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents entity_type, entity_id, and file_path, including the 'C123'/numeric ID convention and the directory-zipping behavior. The description largely restates the file_path zip semantics, adding little meaning beyond structured fields; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Add an attachment') and enumerates the three target entity types (test case, test run, test result), so an agent knows exactly what the tool does. It stops short of explicitly differentiating itself from the sibling read counterpart query_attachment, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose rather than stated: there is no explicit 'use this when...' or routing advice against siblings like query_attachment. It does supply practical preconditions (directory auto-zip, 256MB cap), which is useful but is constraint information rather than when-to-use guidance.

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