Reference

MCP Tools Reference

Available tools exposed by tarn-mcp. Designed for AI agents to call directly without scraping CLI output.

tarn_run

Execute tests and return a structured JSON report.

Parameter Type Required Description
pathstringNoPath to .tarn.yaml file or directory
tagstringNoFilter by tag (comma-separated)
envstringNoEnvironment name (loads tarn.env.{name}.yaml)
varsobjectNoVariable overrides as key-value pairs

Returns: A structured JSON report matching the JSON Report schema.

tarn_validate

Validate .tarn.yaml files without executing them. Checks YAML syntax and schema validity.

Parameter Type Required Description
pathstringYesPath to .tarn.yaml file or directory

Returns: Validation results with any parse/schema errors.

tarn_list

List all available tests. Returns file names, test names, and step counts.

Parameter Type Required Description
pathstringNoPath to directory (defaults to current directory)

tarn_fix_plan

Analyze a failed report and return a prioritized remediation plan with next actions per failed step.

Parameter Type Required Description
pathstringNoOptional: run tests first, then plan
tagstringNoTag filter when path is provided
envstringNoEnvironment name when path is provided
varsobjectNoVariable overrides when path is provided
reportobjectNoPass a report directly (skip running)
max_itemsintegerNoLimit the number of failing steps in the plan

Returns: Prioritized list of remediation steps, each with evidence and hints.

  1. Call tarn_list to discover available tests
  2. Call tarn_validate after generating or editing YAML
  3. Call tarn_run and inspect failure_category first
  4. Optionally call tarn_fix_plan for structured remediation
  5. Fix assertions/captures against the real response payload
  6. Rerun until summary status is "PASSED"

Setup

Drop a .mcp.json at the repository root:

{
  "mcpServers": {
    "tarn": {
      "command": "tarn-mcp",
      "args": []
    }
  }
}

For opencode, use opencode.jsonc with a different schema. See the MCP Guide for full details.