Skip to main content
Glama

Export a regression test

export_regression
Read-onlyIdempotent

Run policy_check with caller-supplied records (no receipts or required-signature mode) and return it as a CI regression: curbi.regression JSON with each reply's expected verdict and rules, plus a dependency-free node:test file that replays it against the Check API. Expectations come from the checker, never from the caller. Nothing is stored. A pass grants no execution authority.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "policy": "<policy>"
    },
    "name": "export_regression"
  }
}

Input Schema

NameRequiredDescriptionDefault
casesNoUp to 50 replies checked against the same policy. Send reply or cases, not both.
replyNoOne agent reply to check. Send reply or cases, not both.
titleNoTitle for the regression file.
policyYesYour rules. Set at least one of prices, forbid or actions; validate_policy lints a policy before use. Ready-made policies: https://curbi.io/policies/
recordNoWhat actually happened, supplied by the caller and not verified by Curbi. A claimed action passes only when its operation is DONE here.
verifyNoExports use caller records, so only "optional" is accepted.
versionNoRegression format version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / policy / properties / forbid / items / properties / match
      Added value: +{
      +  "description": "Default \"word\": whole words, plus English endings. \"prefix\" also matches words that start with the phrase, for languages that add endings (\"garanti\" catches \"garantili\"); it can over-match (\"free\" would catch \"freedom\"), so use it per rule.",
      +  "enum": [
      +    "word",
      +    "prefix"
      +  ],
      +  "type": "string"
      +}
  2. Changed17 schema fields changed
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "cases"
      -      ]
      -    },
      -    "required": [
      -      "reply"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "required": [
      -        "reply"
      -      ]
      -    },
      -    "required": [
      -      "cases"
      -    ]
      -  }
      -]
    • addedInput schema / properties / cases / description
      Added value: +"Up to 50 replies checked against the same policy. Send reply or cases, not both."
    • addedInput schema / properties / cases / items / properties / id / description
      Added value: +"Your id for this case, returned with its result."
    • addedInput schema / properties / cases / items / properties / record / additionalProperties
      Added value: +false
    • addedInput schema / properties / cases / items / properties / record / description
      Added value: +"The record for this case only."
    • addedInput schema / properties / cases / items / properties / record / properties
      Added value: +{
      +  "effects": {
      +    "description": "Actions on record.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "operation": {
      +          "description": "Operation name from policy.actions, for example \"billing.refund\".",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "\"DONE\" when the action happened. Any other value does not count.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  },
      +  "facts": {
      +    "description": "Values the reply must state correctly, such as an appointment time.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "kind": {
      +          "description": "Kind of value.",
      +          "enum": [
      +            "time",
      +            "money",
      +            "date"
      +          ],
      +          "type": "string"
      +        },
      +        "near": {
      +          "description": "Words the value appears next to in the reply, for example \"appointment\".",
      +          "maxLength": 80,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "value": {
      +          "anyOf": [
      +            {
      +              "maxLength": 40,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            {
      +              "type": "number"
      +            }
      +          ],
      +          "description": "The value on record, as a number or text of at most 40 characters."
      +        }
      +      },
      +      "required": [
      +        "near",
      +        "kind",
      +        "value"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 20,
      +    "type": "array"
      +  },
      +  "receipts": {
      +    "description": "Curbi-signed receipts, when you have them.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "subject": {
      +    "description": "Optional id the record is about, such as an order or ticket.",
      +    "maxLength": 200,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / cases / items / properties / reply / description
      Added value: +"The agent reply."
    • addedInput schema / properties / policy / additionalProperties
      Added value: +false
    • addedInput schema / properties / policy / description
      Added value: +"Your rules. Set at least one of prices, forbid or actions; validate_policy lints a policy before use. Ready-made policies: https://curbi.io/policies/"
    • addedInput schema / properties / policy / properties
      Added value: +{
      +  "actions": {
      +    "additionalProperties": {
      +      "description": "Operation that must be DONE in the record.",
      +      "maxLength": 60,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "description": "Past-tense verb to operation, for example {\"refunded\": \"billing.refund\"}. Claiming the verb needs that operation DONE in the record.",
      +    "maxProperties": 40,
      +    "propertyNames": {
      +      "pattern": "^[a-z]{2,20}$"
      +    },
      +    "type": "object"
      +  },
      +  "description": {
      +    "description": "Optional policy description.",
      +    "type": "string"
      +  },
      +  "discounts": {
      +    "description": "Approved discounts. Any other \"N% off\" claim is a finding.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "items": {
      +          "description": "Price items it applies to; omit for all.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "minItems": 1,
      +          "type": "array"
      +        },
      +        "percent": {
      +          "description": "Percent off.",
      +          "exclusiveMinimum": 0,
      +          "maximum": 100,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "percent"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 20,
      +    "type": "array"
      +  },
      +  "forbid": {
      +    "description": "Phrases the agent must not say.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "description": "Lowercase slug. Findings are reported as forbid:<id>.",
      +          "pattern": "^[a-z0-9-]{1,40}$",
      +          "type": "string"
      +        },
      +        "negatable": {
      +          "description": "Default true: a negated mention (\"we do not guarantee\") passes.",
      +          "type": "boolean"
      +        },
      +        "phrases": {
      +          "description": "Literal phrases, never regular expressions.",
      +          "items": {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "maxItems": 20,
      +          "minItems": 1,
      +          "type": "array"
      +        },
      +        "why": {
      +          "description": "Reason shown with the finding.",
      +          "maxLength": 200,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "phrases"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 50,
      +    "type": "array"
      +  },
      +  "name": {
      +    "description": "Optional policy name.",
      +    "type": "string"
      +  },
      +  "prices": {
      +    "description": "Approved prices in USD. A wrong price, another currency, or an unapproved discount for an item is a finding.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "aliases": {
      +          "description": "Names to match instead of item, for example [\"Pro\", \"Pro plan\"].",
      +          "items": {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "maxItems": 8,
      +          "type": "array"
      +        },
      +        "amount": {
      +          "description": "The approved price. Use amount or amounts, not both.",
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "amounts": {
      +          "description": "Several approved prices for the item, such as monthly and annual.",
      +          "items": {
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "maxItems": 8,
      +          "minItems": 1,
      +          "type": "array"
      +        },
      +        "item": {
      +          "description": "Item name as customers say it, for example \"Pro\".",
      +          "maxLength": 80,
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "item"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 50,
      +    "type": "array"
      +  },
      +  "unknownAmounts": {
      +    "description": "\"flag\" (default) reports dollar amounts not tied to an approved price; \"allow\" ignores them.",
      +    "enum": [
      +      "flag",
      +      "allow"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / record / additionalProperties
      Added value: +false
    • addedInput schema / properties / record / description
      Added value: +"What actually happened, supplied by the caller and not verified by Curbi. A claimed action passes only when its operation is DONE here."
    • addedInput schema / properties / record / properties
      Added value: +{
      +  "effects": {
      +    "description": "Actions on record.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "operation": {
      +          "description": "Operation name from policy.actions, for example \"billing.refund\".",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "\"DONE\" when the action happened. Any other value does not count.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  },
      +  "facts": {
      +    "description": "Values the reply must state correctly, such as an appointment time.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "kind": {
      +          "description": "Kind of value.",
      +          "enum": [
      +            "time",
      +            "money",
      +            "date"
      +          ],
      +          "type": "string"
      +        },
      +        "near": {
      +          "description": "Words the value appears next to in the reply, for example \"appointment\".",
      +          "maxLength": 80,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "value": {
      +          "anyOf": [
      +            {
      +              "maxLength": 40,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            {
      +              "type": "number"
      +            }
      +          ],
      +          "description": "The value on record, as a number or text of at most 40 characters."
      +        }
      +      },
      +      "required": [
      +        "near",
      +        "kind",
      +        "value"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 20,
      +    "type": "array"
      +  },
      +  "receipts": {
      +    "description": "Curbi-signed receipts, when you have them.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "subject": {
      +    "description": "Optional id the record is about, such as an order or ticket.",
      +    "maxLength": 200,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / reply / description
      Added value: +"One agent reply to check. Send reply or cases, not both."
    • addedInput schema / properties / title / description
      Added value: +"Title for the regression file."
    • addedInput schema / properties / verify / description
      Added value: +"Exports use caller records, so only \"optional\" is accepted."
    • addedInput schema / properties / version / description
      Added value: +"Regression format version."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations by disclosing that nothing is stored, that a pass grants no execution authority, that expectations originate from the checker rather than the caller, and exactly what the output artifacts are. These are precisely the non-obvious behavioral facts an agent needs before invoking an export tool, and none of them duplicate the readOnly/idempotent hints.

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?

Four short sentences, front-loaded with the core operation and followed by output shape and safety caveats; almost nothing is wasted. The opening sentence is clause-heavy (parenthetical scope restriction plus two output artifacts), which slightly slows parsing but is dense rather than padded.

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?

With no output schema, the description takes responsibility for describing the return values — the regression JSON with per-reply expected verdicts and rules, plus the generated node:test file — and it explains the trust boundary (expectations from the checker). For a seven-parameter export tool this covers everything an agent needs to call it correctly.

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% and the nested policy/record/case properties are documented in detail, so the schema carries the parameter burden. The description adds only one semantic point beyond it — the verify mode is limited to optional because records are caller-supplied — with no detail on cases vs reply exclusivity, title, or version.

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?

States a specific action (run policy_check over caller-supplied records and package the results as a CI regression) and names both artifacts produced: a curbi.regression JSON file and a node:test replay file. It explicitly contrasts itself with the sibling policy_check by noting the caller-record / no-signature-mode subset, so an agent can tell the two apart without opening either schema.

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?

Implies the selection rule by scoping this tool to caller-supplied records with no receipts or required-signature mode, which tells the agent to reach for policy_check when real receipts or verification are needed. It does not explicitly state exclusions against validate_policy or verify_bundle, so the routing is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources