Skip to main content
Glama

Batfish Run Assertion Suite

batfish_run_assertion_suite

Validates and runs a YAML assertion suite against a Batfish network snapshot, returning per-assertion pass, fail, or error results with a summary; invalid suites run nothing.

Instructions

Validate and run an assertion suite (YAML text) on a snapshot.

suite_yaml uses the suite schema (see examples/assertions.yaml)::

version: 1
assertions:
  - type: assert_flows_succeed
    params:
      startLocation: as1border1
      headers:
        dstIps: 2.128.0.101
        ipProtocols: [TCP]
        dstPorts: "443"

Header fields follow Batfish rules: srcIps/dstIps accept IPs, prefixes, and node names; srcPorts/dstPorts are string specs such as "443". Without ipProtocols, Batfish tests ICMP. Prefer node names, interface locations, or explicit host IPs over broad prefixes, which may make Batfish choose representative flows with network-address sources.

All-or-nothing: if the suite is invalid, nothing runs and the result is {results: [], errors: [...], summary: {...}}. Otherwise results are {type, status, message, snapshot, ran_at, runtime, fun?, answer_rows?, details?, code?} per assertion, plus a summary of pass/fail/error counts. Failure messages use a one-line summary; rows are returned as answer_rows when parseable, otherwise as capped details.

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": {
      "suite_yaml": "<suite_yaml>"
    },
    "name": "batfish_run_assertion_suite"
  }
}

Input Schema

NameRequiredDescriptionDefault
debugNo
networkNo
snapshotNo
suite_yamlYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the all-or-nothing execution model, the exact shape returned when the suite is invalid, the per-assertion result fields, and that failure details fall back to capped 'details' when rows are unparseable. It stops short of stating whether running the suite mutates snapshot state or whether any permissions/prerequisites apply.

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?

The verb-and-resource statement is front-loaded, followed by a compact YAML example and then the return contract. The example is long but earns its space by encoding the suite schema, and each prose sentence adds distinct information.

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 tool taking a free-form YAML blob, this gives an agent enough to construct a valid suite and anticipate the response, and the output schema means return values need not be re-explained. The remaining gap is operational context: no mention of the snapshot prerequisite workflow or how this relates to the single-assertion sibling.

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 0% across four parameters, and the description compensates thoroughly for suite_yaml only, including the header field rules and the ICMP default when ipProtocols is omitted. The debug, network, and snapshot parameters receive no explanation beyond an oblique 'on a snapshot'.

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?

States a specific verb pair and resource: 'Validate and run an assertion suite (YAML text) on a snapshot.' The plural 'suite' combined with 'on a snapshot' implicitly separates it from the single-assertion sibling batfish_run_assertion, but the description never names that sibling to make the distinction explicit.

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?

There is real embedded guidance on how to write good assertions ('Prefer node names, interface locations, or explicit host IPs over broad prefixes'), but nothing says when to reach for this tool versus batfish_run_assertion, nor whether a snapshot must already be uploaded first. Usage is implied by the YAML example rather than stated.

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