Skip to main content
Glama
uarlouski

TestRail MCP Server

by uarlouski

add_attachment

Attach files to TestRail test cases, runs, or results. Directories are automatically zipped before upload (max 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.6/5.0
Behavior4/5

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

The annotations only indicate a non-read-only, non-idempotent, non-destructive operation, so the description adds meaningful behavioral context by disclosing that directories are automatically zipped and uploads are capped at 256MB. It stops short of describing error handling or response details, but the annotation coverage lowers that burden.

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?

The description is three tight sentences with no filler: the core operation first, then directory behavior, then the size constraint. Every sentence earns its place.

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 simple three-parameter mutation with full schema coverage, the description is reasonably complete: it states the operation, entity types, directory handling, and upload limit. It is only mildly incomplete by not addressing the overlapping sibling tool or the expected return value, though no output schema exists.

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?

The input schema already documents all three parameters at 100% coverage, including the entity_type enum and the fact that directories are zipped. The description reinforces the directory behavior and size limit but adds no new parameter-level semantics beyond what the schema provides.

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 clearly states a specific action ('Add an attachment') and names the target resources (test case, test run, test result), so an agent understands the core purpose. However, it does not explicitly differentiate itself from the sibling add_attachment_to_run, which overlaps for run attachments.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool versus alternatives like add_attachment_to_run. The directory-zipping and 256MB notes are useful constraints, but they do not help an agent select the correct tool among siblings.

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