tarn_run
Execute tests and return a structured JSON report.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | No | Path to .tarn.yaml file or directory |
tag | string | No | Filter by tag (comma-separated) |
env | string | No | Environment name (loads tarn.env.{name}.yaml) |
vars | object | No | Variable 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 |
|---|---|---|---|
path | string | Yes | Path 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 |
|---|---|---|---|
path | string | No | Path 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 |
|---|---|---|---|
path | string | No | Optional: run tests first, then plan |
tag | string | No | Tag filter when path is provided |
env | string | No | Environment name when path is provided |
vars | object | No | Variable overrides when path is provided |
report | object | No | Pass a report directly (skip running) |
max_items | integer | No | Limit the number of failing steps in the plan |
Returns: Prioritized list of remediation steps, each with evidence and hints.
Recommended agent loop
- Call
tarn_listto discover available tests - Call
tarn_validateafter generating or editing YAML - Call
tarn_runand inspectfailure_categoryfirst - Optionally call
tarn_fix_planfor structured remediation - Fix assertions/captures against the real response payload
- 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.