{"at":"2026-11-23T04:23:18.686Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:23:21.298Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"batfish-q-mcp","version":"4.2.4"}},"cacheScope":"private","capabilities":{"extensions":{"io.modelcontextprotocol/ui":{}},"logging":{},"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"This server exposes a curated catalog of 60 Batfish questions plus snapshot,\nassertion, topology, and failure-testing tools.\n\nWorkflow:\n1. Call batfish_list_snapshots to confirm the snapshot and network.\n2. Browse batfish_list_questions for the full catalog. If you know the topic\n   but not the Batfish name, call batfish_find_questions with the user's words\n   (for example \"standby gateway\", \"traffic going in circles\", or \"which ACL\n   rule blocks this\").\n3. Call batfish_get_question(fun) for full descriptions, output columns,\n   defaults, and allowed values.\n4. Call batfish_run_question with its `fun` and an `options` dict.\n\nEach catalog entry includes a one-line description, tags, synonyms, output\ncolumn names, a category description, required/optional inputs, and structured\ntype metadata (`fields`, `placeholder`, `example`) for complex values such as\nHeaderConstraints. Inputs marked `required: true` must be supplied; other\ninputs may be omitted. batfish_get_question adds long descriptions, typed\noutput columns, input descriptions, defaults, allowed values, and field specs.\nDiscovery tools work without a running Batfish; the metadata is checked in.\n\nDecision guide:\n- Did Batfish parse the snapshot? initIssues, fileParseStatus, parseWarning.\n- Need configuration facts (interfaces, ACLs, BGP/OSPF config)? nodeProperties,\n  interfaceProperties, *Configuration, *Properties, namedStructures.\n- Need the topology graph? Use batfish_get_topology; for raw links use\n  layer3Edges or userProvidedLayer1Edges.\n- Need the routing table or a route lookup? routes (RIB), bgpRib (BGP table),\n  lpmRoutes (which route wins for an IP).\n- Need end-to-end connectivity? traceroute (one source, one direction),\n  reachability (find successful flows), bidirectionalReachability (round trip),\n  detectLoops, *MultipathConsistency.\n- Need to know whether traffic is permitted? testFilters. Need to find which\n  flows or lines match? searchFilters or findMatchingFilterLines. Need\n  shadowed/unreachable rules? filterLineReachability.\n- Need protocol session health? bgpSessionStatus (up/down) vs\n  bgpSessionCompatibility (why misconfigured); same pattern for OSPF.\n- Need a redundant gateway? hsrpProperties or vrrpProperties.\n- Need tunnels or overlays? ipsec*, vxlan*, evpn*.\n- Need to debug a specifier? resolve*.\n- Need to compare snapshots? Any question with `supports_differential: true` can\n  run with both `snapshot` and `reference_snapshot`; compareFilters and\n  differentialReachability are differential-only. In a differential answer,\n  `Snapshot_*` columns come from `snapshot` (the snapshot under test) and\n  `Reference_*` columns come from `reference_snapshot` (the baseline).\n\nIf two questions still fit, say so and explain the difference rather than\nguessing. Pass `network` on the first call if the server has no network set.\n\nQuestion failures come back as `{status: \"error\", code, message}` instead of a\nJava work-item log; pass `debug: true` to include the raw log. Reachability\nanswers compact trace columns to disposition, node path, and hop count by\ndefault; set `trace_detail: \"full\"` when every hop-by-hop step is needed, or\n`\"none\"` to drop traces. `max_rows` caps large answers (default 50, `0` for no\nlimit). Header values are Batfish specifiers: `srcIps`/`dstIps` accept IPs,\nprefixes, node names, or named IP spaces, while `srcPorts`/`dstPorts` require\nstring specs such as \"443\". Batfish returns representative flows for broad\nheaders: a prefix such as `10.0.0.0/24` may yield a network or broadcast source.\nPrefer node names, interface locations, or explicit host IPs for realistic\nexamples. When an assertion omits `ipProtocols`, Batfish tests ICMP; set\n`ipProtocols` and `dstPorts` for service-level checks.\n","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T04:23:21.298Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:23:21.483Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"batfish-q-mcp","version":"4.2.4"}},"cacheScope":"private","resultType":"complete","tools":[{"_meta":{"fastmcp":{"tags":[]}},"description":"Find catalog questions from a plain-language query.\n\n``query`` is the user's own wording, e.g. ``\"standby gateway\"``,\n``\"traffic going in circles\"``, or ``\"which firewall rule is blocking\"``.\nIt is matched against question names, descriptions, categories, tags,\nsynonyms, input names/descriptions/allowed values, and output columns.\n\nReturns ``{query, count, total_matches, results}`` where each result is\n``{fun, name, category, description, tags, synonyms,\nsupports_differential, differential_only, score, matched_on}``. Results are\nranked by relevance and capped at ``limit`` (default 5).\n\nUse ``batfish_get_question(fun)`` for full input/output details. This tool\nuses checked-in metadata and does not contact Batfish.","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":5,"type":"integer"},"query":{"type":"string"}},"required":["query"],"type":"object"},"name":"batfish_find_questions","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Find Questions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List Batfish questions from the curated catalog.\n\nReturns one dict per question:\n``{category, category_description, fun, name, description, tags,\nsynonyms, supports_differential, differential_only, output_columns,\ninputs, type?}``.\n\n- ``description`` is a one-line summary; ``tags`` are Batfish's tags;\n  ``synonyms`` are plain-language search terms.\n- ``output_columns`` lists only column names; call\n  ``batfish_get_question`` for their types and descriptions.\n- Each input is ``{name, type, required, hint?, fields?, placeholder?,\n  example?}``. ``required`` is true when the input must be supplied\n  (not optional and has no default).\n- ``supports_differential`` is true when the question accepts a\n  ``reference_snapshot``. ``differential_only`` marks the two questions\n  (``compareFilters`` and ``differentialReachability``) that can only be\n  run differentially; ``type`` is retained on those entries.\n\nPass a category name to filter; omit it for the full catalog. This tool\nuses checked-in metadata and does not contact Batfish.","inputSchema":{"additionalProperties":false,"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_list_questions","outputSchema":{"properties":{"result":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Batfish List Questions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Return full metadata for one question, including output columns.\n\n``fun`` is a catalog question name (see ``batfish_list_questions``).\n\nReturns ``{category, category_description, fun, name, description,\nlong_description, tags, synonyms, supports_differential,\ndifferential_only, output_columns, inputs, type?}``:\n\n- ``output_columns`` is a list of ``{name, type, description}`` objects\n  describing the answer table.\n- each input includes its catalog ``type`` and ``required`` flag plus\n  template details when available: ``description``, ``display_name``,\n  ``default``, ``allowed_values`` (strings, or ``{value, description}``\n  objects), ``field_specs`` for structured values, and ``min_length``.\n- ``TYPE_HINTS`` add ``hint``/``fields``/``placeholder``/``example`` for\n  complex values such as HeaderConstraints.\n\nRaises ``ValueError`` for an unknown ``fun``, listing the known names.","inputSchema":{"additionalProperties":false,"properties":{"fun":{"type":"string"}},"required":["fun"],"type":"object"},"name":"batfish_get_question","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Get Question"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List snapshots of a Batfish network.\n\nIf ``network`` is given, the session is pointed at it first\n(``set_network``); otherwise the session's current network is used.","inputSchema":{"additionalProperties":false,"properties":{"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_list_snapshots","outputSchema":{"properties":{"result":{"items":{"type":"string"},"type":"array"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Batfish List Snapshots"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Delete a Batfish snapshot.\n\n- ``name``: the snapshot name to delete (sanitized with\n  ``safe_snapshot_name``).\n- ``network``: the network the snapshot lives in; if given, the\n  session is pointed at it first.\n\nReturns ``{name}`` — the name that was deleted.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name"],"type":"object"},"name":"batfish_delete_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Delete Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Upload a Batfish snapshot zip, base64-encoded.\n\nThe name is sanitized with ``safe_snapshot_name`` (Batfish allows only\nletters, digits, '-' and '_'). Unless ``overwrite`` is true, an\nexisting snapshot of that name is kept and a unique name is chosen\n(``base``, ``base_1``, ...). If ``network`` is given,\nthe session is pointed at it first. Returns the name actually used.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"overwrite":{"default":false,"type":"boolean"},"zip_base64":{"type":"string"}},"required":["name","zip_base64"],"type":"object"},"name":"batfish_upload_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Upload Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Run a Batfish question and return its JSON-safe rows.\n\n- ``fun`` is the pybatfish question function name (see\n  ``batfish_list_questions``); ``options`` is its keyword-argument dict.\n- ``snapshot`` runs the question on that snapshot (the session's\n  current snapshot otherwise).\n- ``reference_snapshot`` + ``snapshot`` runs a differential question\n  comparing the two; both are required for differential questions. In the\n  answer, ``Snapshot_*`` columns come from ``snapshot`` (the snapshot\n  under test) and ``Reference_*`` columns come from ``reference_snapshot``\n  (the baseline).\n- ``network`` points the session at a network first, if given.\n- ``debug=True`` includes the raw Batfish exception log in the response.\n- ``trace_detail`` controls trace columns (``Traces``, ``Snapshot_Traces``,\n  ``Reference_Traces``): ``\"summary\"`` (default) keeps disposition, node\n  path, and hop count; ``\"none\"`` drops the trace columns but keeps the\n  trace counts; ``\"full\"`` returns the original hop-by-hop traces.\n- ``max_rows`` caps the number of returned rows (default 50). Use ``0``\n  for no limit; ``total_rows``, ``returned_rows``, and ``truncated`` report\n  whether the cap was applied.\n- A named ``snapshot``/``reference_snapshot`` must exist in the network;\n  otherwise a ``ValueError`` lists the available snapshots.\n\nReturns ``{fun, snapshot, reference_snapshot, status, rows,\nremoved_columns, total_rows, returned_rows, truncated}`` where ``rows`` is\na list of row dicts. A ``differentialReachability`` answer also includes\n``trace_columns``, which maps ``Snapshot_Traces`` to the ``snapshot``\nargument and ``Reference_Traces`` to ``reference_snapshot``. A Batfish\nfailure returns ``{status: \"error\", code, message, rows: []}`` instead of\nraising; known codes include ``SNAPSHOT_INCOMPATIBLE``,\n``INVALID_ARGUMENT``, ``INVALID_PORT_SPEC``, and\n``BIDIRECTIONAL_REQUIRES_DST``.\n\nHeader values are Batfish specifiers: ``srcIps``/``dstIps`` accept IPs,\nprefixes, node names, or named IP spaces; ``srcPorts``/``dstPorts`` take\nstrings such as ``\"443\"``. If ``ipProtocols`` is omitted, Batfish tests\nICMP, so set ``ipProtocols`` and ``dstPorts`` for service-level checks.\nBatfish returns representative flows for broad headers, so a prefix such\nas ``10.0.0.0/24`` may yield a network or broadcast source; prefer node\nnames, interface locations, or explicit host IPs for realistic examples.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"fun":{"type":"string"},"max_rows":{"default":50,"type":"integer"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"reference_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"trace_detail":{"default":"summary","type":"string"}},"required":["fun"],"type":"object"},"name":"batfish_run_question","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Question"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List the assertions available (registry + live pybatfish names).\n\nReturns ``{snapshot, answer, specs}``:\n\n- ``snapshot`` / ``answer``: assertion names available in the installed\n  pybatfish, grouped by how they are called (session-bound vs\n  answer-based).\n- ``specs``: the curated registry ``{type: {label, description, group,\n  phase, call, needs_question, params}}`` — each param is\n  ``{name, type, optional, hint}``, where ``hint`` describes complex\n  types (e.g. ``HeaderConstraints``) so you can build ``params``.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"batfish_list_assertions","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish List Assertions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Validate and run one assertion on a snapshot.\n\n- ``name``: assertion type (see ``batfish_list_assertions``).\n- ``params``: its parameters, e.g. ``{\"headers\": {\"dstIps\":\n  \"8.8.8.8\", \"ipProtocols\": [\"TCP\"], \"dstPorts\": \"443\"}}`` for\n  ``assert_flows_succeed``.\n- ``question``: ``{\"fun\": ..., \"options\": {...}}`` — required for\n  answer-based assertions (``assert_zero_results``, ``assert_num_results``,\n  ``assert_min_results``); the question is run first and its answer checked.\n- ``snapshot`` / ``network``: run on that snapshot (and network first),\n  otherwise the session's current ones.\n- ``debug=True`` includes the raw Batfish error text on failures.\n\nReturns ``{type, status (pass/fail/error), message, snapshot, ran_at,\nruntime, fun?, answer_rows?, details?, code?}``. Failure messages are\nshort: ``message`` is the one-line summary, and failing rows are returned\nas ``answer_rows`` when they can be parsed; otherwise ``details`` holds a\ncapped records-style payload. Validation problems are returned as\n``status: \"error\"`` with an ``errors`` list (nothing is run).\n\nHeader fields follow Batfish rules: ``srcIps``/``dstIps`` accept IPs,\nprefixes, and node names; ``srcPorts``/``dstPorts`` are string specs such\nas ``\"443\"``. When ``ipProtocols`` is omitted, Batfish tests ICMP, so set\n``ipProtocols`` and ``dstPorts`` for service-level assertions. Prefer node\nnames, interface locations, or explicit host IPs: broad prefixes may make\nBatfish choose representative flows with network-address sources.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"question":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name"],"type":"object"},"name":"batfish_run_assertion","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Assertion"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Validate and run an assertion suite (YAML text) on a snapshot.\n\n``suite_yaml`` uses the suite schema (see ``examples/assertions.yaml``)::\n\n    version: 1\n    assertions:\n      - type: assert_flows_succeed\n        params:\n          startLocation: as1border1\n          headers:\n            dstIps: 2.128.0.101\n            ipProtocols: [TCP]\n            dstPorts: \"443\"\n\nHeader fields follow Batfish rules: ``srcIps``/``dstIps`` accept IPs,\nprefixes, and node names; ``srcPorts``/``dstPorts`` are string specs such\nas ``\"443\"``. Without ``ipProtocols``, Batfish tests ICMP. Prefer node\nnames, interface locations, or explicit host IPs over broad prefixes,\nwhich may make Batfish choose representative flows with network-address\nsources.\n\nAll-or-nothing: if the suite is invalid, nothing runs and the result is\n``{results: [], errors: [...], summary: {...}}``. Otherwise results are\n``{type, status, message, snapshot, ran_at, runtime, fun?, answer_rows?,\ndetails?, code?}`` per assertion, plus a ``summary`` of pass/fail/error\ncounts. Failure messages use a one-line summary; rows are returned as\n``answer_rows`` when parseable, otherwise as capped ``details``.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"suite_yaml":{"type":"string"}},"required":["suite_yaml"],"type":"object"},"name":"batfish_run_assertion_suite","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Assertion Suite"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Fork a snapshot, optionally failing (deactivating) nodes/interfaces.\n\n- ``base_name``: the snapshot to fork.\n- ``name``: the fork's name (sanitized with ``safe_snapshot_name``);\n  defaults to ``<base>_Fail``. Unless ``overwrite`` is true, an\n  existing name is kept and a unique one is chosen\n  (``name``, ``name_1``, ...).\n- ``failed_nodes``: node names to deactivate in the fork.\n- ``failed_interfaces``: interfaces to deactivate, each as a\n  ``node[interface]`` string (for example ``\"r1[Gi0/0]\"``) or as a\n  ``{\"hostname\": \"r1\", \"interface\": \"Gi0/0\"}`` mapping. Bare node names\n  are rejected; use ``failed_nodes`` for those.\n- The failure-testing flow is: fork, then diff the fork against the base\n  with a differential question.\n- ``network``: the network both snapshots live in, if given.\n\nReturns ``{name, base_name}`` — the name actually used.","inputSchema":{"additionalProperties":false,"properties":{"base_name":{"type":"string"},"failed_interfaces":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null},"failed_nodes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"overwrite":{"default":false,"type":"boolean"}},"required":["base_name"],"type":"object"},"name":"batfish_fork_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Fork Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Return the topology graph of a snapshot as nodes/edges.\n\n- ``kind=\"layer3\"`` (default): L3 links from ``layer3Edges``\n  (node — interface <-> interface — node, so edges carry a ``title``\n  like ``\"r1 (Gi0/0) <---> r2 (Gi0/0)\"``).\n- ``kind=\"routing\"``: routing adjacencies from ``bgpEdges``.\n\nReturns ``{kind, snapshot, node_count, edge_count, nodes, edges}``.","inputSchema":{"additionalProperties":false,"properties":{"kind":{"default":"layer3","type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_get_topology","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Get Topology"}],"ttlMs":0}}}
{"at":"2026-11-23T04:23:21.834Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T04:23:24.303Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"logging":{},"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":false},"tools":{"listChanged":true}},"instructions":"This server exposes a curated catalog of 60 Batfish questions plus snapshot,\nassertion, topology, and failure-testing tools.\n\nWorkflow:\n1. Call batfish_list_snapshots to confirm the snapshot and network.\n2. Browse batfish_list_questions for the full catalog. If you know the topic\n   but not the Batfish name, call batfish_find_questions with the user's words\n   (for example \"standby gateway\", \"traffic going in circles\", or \"which ACL\n   rule blocks this\").\n3. Call batfish_get_question(fun) for full descriptions, output columns,\n   defaults, and allowed values.\n4. Call batfish_run_question with its `fun` and an `options` dict.\n\nEach catalog entry includes a one-line description, tags, synonyms, output\ncolumn names, a category description, required/optional inputs, and structured\ntype metadata (`fields`, `placeholder`, `example`) for complex values such as\nHeaderConstraints. Inputs marked `required: true` must be supplied; other\ninputs may be omitted. batfish_get_question adds long descriptions, typed\noutput columns, input descriptions, defaults, allowed values, and field specs.\nDiscovery tools work without a running Batfish; the metadata is checked in.\n\nDecision guide:\n- Did Batfish parse the snapshot? initIssues, fileParseStatus, parseWarning.\n- Need configuration facts (interfaces, ACLs, BGP/OSPF config)? nodeProperties,\n  interfaceProperties, *Configuration, *Properties, namedStructures.\n- Need the topology graph? Use batfish_get_topology; for raw links use\n  layer3Edges or userProvidedLayer1Edges.\n- Need the routing table or a route lookup? routes (RIB), bgpRib (BGP table),\n  lpmRoutes (which route wins for an IP).\n- Need end-to-end connectivity? traceroute (one source, one direction),\n  reachability (find successful flows), bidirectionalReachability (round trip),\n  detectLoops, *MultipathConsistency.\n- Need to know whether traffic is permitted? testFilters. Need to find which\n  flows or lines match? searchFilters or findMatchingFilterLines. Need\n  shadowed/unreachable rules? filterLineReachability.\n- Need protocol session health? bgpSessionStatus (up/down) vs\n  bgpSessionCompatibility (why misconfigured); same pattern for OSPF.\n- Need a redundant gateway? hsrpProperties or vrrpProperties.\n- Need tunnels or overlays? ipsec*, vxlan*, evpn*.\n- Need to debug a specifier? resolve*.\n- Need to compare snapshots? Any question with `supports_differential: true` can\n  run with both `snapshot` and `reference_snapshot`; compareFilters and\n  differentialReachability are differential-only. In a differential answer,\n  `Snapshot_*` columns come from `snapshot` (the snapshot under test) and\n  `Reference_*` columns come from `reference_snapshot` (the baseline).\n\nIf two questions still fit, say so and explain the difference rather than\nguessing. Pass `network` on the first call if the server has no network set.\n\nQuestion failures come back as `{status: \"error\", code, message}` instead of a\nJava work-item log; pass `debug: true` to include the raw log. Reachability\nanswers compact trace columns to disposition, node path, and hop count by\ndefault; set `trace_detail: \"full\"` when every hop-by-hop step is needed, or\n`\"none\"` to drop traces. `max_rows` caps large answers (default 50, `0` for no\nlimit). Header values are Batfish specifiers: `srcIps`/`dstIps` accept IPs,\nprefixes, node names, or named IP spaces, while `srcPorts`/`dstPorts` require\nstring specs such as \"443\". Batfish returns representative flows for broad\nheaders: a prefix such as `10.0.0.0/24` may yield a network or broadcast source.\nPrefer node names, interface locations, or explicit host IPs for realistic\nexamples. When an assertion omits `ipProtocols`, Batfish tests ICMP; set\n`ipProtocols` and `dstPorts` for service-level checks.\n","protocolVersion":"2025-11-25","serverInfo":{"name":"batfish-q-mcp","version":"4.2.4"}}}}
{"at":"2026-11-23T04:23:24.303Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T04:23:24.303Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T04:23:24.488Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"_meta":{"fastmcp":{"tags":[]}},"description":"Find catalog questions from a plain-language query.\n\n``query`` is the user's own wording, e.g. ``\"standby gateway\"``,\n``\"traffic going in circles\"``, or ``\"which firewall rule is blocking\"``.\nIt is matched against question names, descriptions, categories, tags,\nsynonyms, input names/descriptions/allowed values, and output columns.\n\nReturns ``{query, count, total_matches, results}`` where each result is\n``{fun, name, category, description, tags, synonyms,\nsupports_differential, differential_only, score, matched_on}``. Results are\nranked by relevance and capped at ``limit`` (default 5).\n\nUse ``batfish_get_question(fun)`` for full input/output details. This tool\nuses checked-in metadata and does not contact Batfish.","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":5,"type":"integer"},"query":{"type":"string"}},"required":["query"],"type":"object"},"name":"batfish_find_questions","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Find Questions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List Batfish questions from the curated catalog.\n\nReturns one dict per question:\n``{category, category_description, fun, name, description, tags,\nsynonyms, supports_differential, differential_only, output_columns,\ninputs, type?}``.\n\n- ``description`` is a one-line summary; ``tags`` are Batfish's tags;\n  ``synonyms`` are plain-language search terms.\n- ``output_columns`` lists only column names; call\n  ``batfish_get_question`` for their types and descriptions.\n- Each input is ``{name, type, required, hint?, fields?, placeholder?,\n  example?}``. ``required`` is true when the input must be supplied\n  (not optional and has no default).\n- ``supports_differential`` is true when the question accepts a\n  ``reference_snapshot``. ``differential_only`` marks the two questions\n  (``compareFilters`` and ``differentialReachability``) that can only be\n  run differentially; ``type`` is retained on those entries.\n\nPass a category name to filter; omit it for the full catalog. This tool\nuses checked-in metadata and does not contact Batfish.","inputSchema":{"additionalProperties":false,"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_list_questions","outputSchema":{"properties":{"result":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Batfish List Questions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Return full metadata for one question, including output columns.\n\n``fun`` is a catalog question name (see ``batfish_list_questions``).\n\nReturns ``{category, category_description, fun, name, description,\nlong_description, tags, synonyms, supports_differential,\ndifferential_only, output_columns, inputs, type?}``:\n\n- ``output_columns`` is a list of ``{name, type, description}`` objects\n  describing the answer table.\n- each input includes its catalog ``type`` and ``required`` flag plus\n  template details when available: ``description``, ``display_name``,\n  ``default``, ``allowed_values`` (strings, or ``{value, description}``\n  objects), ``field_specs`` for structured values, and ``min_length``.\n- ``TYPE_HINTS`` add ``hint``/``fields``/``placeholder``/``example`` for\n  complex values such as HeaderConstraints.\n\nRaises ``ValueError`` for an unknown ``fun``, listing the known names.","inputSchema":{"additionalProperties":false,"properties":{"fun":{"type":"string"}},"required":["fun"],"type":"object"},"name":"batfish_get_question","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Get Question"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List snapshots of a Batfish network.\n\nIf ``network`` is given, the session is pointed at it first\n(``set_network``); otherwise the session's current network is used.","inputSchema":{"additionalProperties":false,"properties":{"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_list_snapshots","outputSchema":{"properties":{"result":{"items":{"type":"string"},"type":"array"}},"required":["result"],"type":"object","x-fastmcp-wrap-result":true},"title":"Batfish List Snapshots"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Delete a Batfish snapshot.\n\n- ``name``: the snapshot name to delete (sanitized with\n  ``safe_snapshot_name``).\n- ``network``: the network the snapshot lives in; if given, the\n  session is pointed at it first.\n\nReturns ``{name}`` — the name that was deleted.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name"],"type":"object"},"name":"batfish_delete_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Delete Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Upload a Batfish snapshot zip, base64-encoded.\n\nThe name is sanitized with ``safe_snapshot_name`` (Batfish allows only\nletters, digits, '-' and '_'). Unless ``overwrite`` is true, an\nexisting snapshot of that name is kept and a unique name is chosen\n(``base``, ``base_1``, ...). If ``network`` is given,\nthe session is pointed at it first. Returns the name actually used.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"overwrite":{"default":false,"type":"boolean"},"zip_base64":{"type":"string"}},"required":["name","zip_base64"],"type":"object"},"name":"batfish_upload_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Upload Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Run a Batfish question and return its JSON-safe rows.\n\n- ``fun`` is the pybatfish question function name (see\n  ``batfish_list_questions``); ``options`` is its keyword-argument dict.\n- ``snapshot`` runs the question on that snapshot (the session's\n  current snapshot otherwise).\n- ``reference_snapshot`` + ``snapshot`` runs a differential question\n  comparing the two; both are required for differential questions. In the\n  answer, ``Snapshot_*`` columns come from ``snapshot`` (the snapshot\n  under test) and ``Reference_*`` columns come from ``reference_snapshot``\n  (the baseline).\n- ``network`` points the session at a network first, if given.\n- ``debug=True`` includes the raw Batfish exception log in the response.\n- ``trace_detail`` controls trace columns (``Traces``, ``Snapshot_Traces``,\n  ``Reference_Traces``): ``\"summary\"`` (default) keeps disposition, node\n  path, and hop count; ``\"none\"`` drops the trace columns but keeps the\n  trace counts; ``\"full\"`` returns the original hop-by-hop traces.\n- ``max_rows`` caps the number of returned rows (default 50). Use ``0``\n  for no limit; ``total_rows``, ``returned_rows``, and ``truncated`` report\n  whether the cap was applied.\n- A named ``snapshot``/``reference_snapshot`` must exist in the network;\n  otherwise a ``ValueError`` lists the available snapshots.\n\nReturns ``{fun, snapshot, reference_snapshot, status, rows,\nremoved_columns, total_rows, returned_rows, truncated}`` where ``rows`` is\na list of row dicts. A ``differentialReachability`` answer also includes\n``trace_columns``, which maps ``Snapshot_Traces`` to the ``snapshot``\nargument and ``Reference_Traces`` to ``reference_snapshot``. A Batfish\nfailure returns ``{status: \"error\", code, message, rows: []}`` instead of\nraising; known codes include ``SNAPSHOT_INCOMPATIBLE``,\n``INVALID_ARGUMENT``, ``INVALID_PORT_SPEC``, and\n``BIDIRECTIONAL_REQUIRES_DST``.\n\nHeader values are Batfish specifiers: ``srcIps``/``dstIps`` accept IPs,\nprefixes, node names, or named IP spaces; ``srcPorts``/``dstPorts`` take\nstrings such as ``\"443\"``. If ``ipProtocols`` is omitted, Batfish tests\nICMP, so set ``ipProtocols`` and ``dstPorts`` for service-level checks.\nBatfish returns representative flows for broad headers, so a prefix such\nas ``10.0.0.0/24`` may yield a network or broadcast source; prefer node\nnames, interface locations, or explicit host IPs for realistic examples.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"fun":{"type":"string"},"max_rows":{"default":50,"type":"integer"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"reference_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"trace_detail":{"default":"summary","type":"string"}},"required":["fun"],"type":"object"},"name":"batfish_run_question","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Question"},{"_meta":{"fastmcp":{"tags":[]}},"description":"List the assertions available (registry + live pybatfish names).\n\nReturns ``{snapshot, answer, specs}``:\n\n- ``snapshot`` / ``answer``: assertion names available in the installed\n  pybatfish, grouped by how they are called (session-bound vs\n  answer-based).\n- ``specs``: the curated registry ``{type: {label, description, group,\n  phase, call, needs_question, params}}`` — each param is\n  ``{name, type, optional, hint}``, where ``hint`` describes complex\n  types (e.g. ``HeaderConstraints``) so you can build ``params``.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"batfish_list_assertions","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish List Assertions"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Validate and run one assertion on a snapshot.\n\n- ``name``: assertion type (see ``batfish_list_assertions``).\n- ``params``: its parameters, e.g. ``{\"headers\": {\"dstIps\":\n  \"8.8.8.8\", \"ipProtocols\": [\"TCP\"], \"dstPorts\": \"443\"}}`` for\n  ``assert_flows_succeed``.\n- ``question``: ``{\"fun\": ..., \"options\": {...}}`` — required for\n  answer-based assertions (``assert_zero_results``, ``assert_num_results``,\n  ``assert_min_results``); the question is run first and its answer checked.\n- ``snapshot`` / ``network``: run on that snapshot (and network first),\n  otherwise the session's current ones.\n- ``debug=True`` includes the raw Batfish error text on failures.\n\nReturns ``{type, status (pass/fail/error), message, snapshot, ran_at,\nruntime, fun?, answer_rows?, details?, code?}``. Failure messages are\nshort: ``message`` is the one-line summary, and failing rows are returned\nas ``answer_rows`` when they can be parsed; otherwise ``details`` holds a\ncapped records-style payload. Validation problems are returned as\n``status: \"error\"`` with an ``errors`` list (nothing is run).\n\nHeader fields follow Batfish rules: ``srcIps``/``dstIps`` accept IPs,\nprefixes, and node names; ``srcPorts``/``dstPorts`` are string specs such\nas ``\"443\"``. When ``ipProtocols`` is omitted, Batfish tests ICMP, so set\n``ipProtocols`` and ``dstPorts`` for service-level assertions. Prefer node\nnames, interface locations, or explicit host IPs: broad prefixes may make\nBatfish choose representative flows with network-address sources.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"name":{"type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"question":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name"],"type":"object"},"name":"batfish_run_assertion","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Assertion"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Validate and run an assertion suite (YAML text) on a snapshot.\n\n``suite_yaml`` uses the suite schema (see ``examples/assertions.yaml``)::\n\n    version: 1\n    assertions:\n      - type: assert_flows_succeed\n        params:\n          startLocation: as1border1\n          headers:\n            dstIps: 2.128.0.101\n            ipProtocols: [TCP]\n            dstPorts: \"443\"\n\nHeader fields follow Batfish rules: ``srcIps``/``dstIps`` accept IPs,\nprefixes, and node names; ``srcPorts``/``dstPorts`` are string specs such\nas ``\"443\"``. Without ``ipProtocols``, Batfish tests ICMP. Prefer node\nnames, interface locations, or explicit host IPs over broad prefixes,\nwhich may make Batfish choose representative flows with network-address\nsources.\n\nAll-or-nothing: if the suite is invalid, nothing runs and the result is\n``{results: [], errors: [...], summary: {...}}``. Otherwise results are\n``{type, status, message, snapshot, ran_at, runtime, fun?, answer_rows?,\ndetails?, code?}`` per assertion, plus a ``summary`` of pass/fail/error\ncounts. Failure messages use a one-line summary; rows are returned as\n``answer_rows`` when parseable, otherwise as capped ``details``.","inputSchema":{"additionalProperties":false,"properties":{"debug":{"default":false,"type":"boolean"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"suite_yaml":{"type":"string"}},"required":["suite_yaml"],"type":"object"},"name":"batfish_run_assertion_suite","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Run Assertion Suite"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Fork a snapshot, optionally failing (deactivating) nodes/interfaces.\n\n- ``base_name``: the snapshot to fork.\n- ``name``: the fork's name (sanitized with ``safe_snapshot_name``);\n  defaults to ``<base>_Fail``. Unless ``overwrite`` is true, an\n  existing name is kept and a unique one is chosen\n  (``name``, ``name_1``, ...).\n- ``failed_nodes``: node names to deactivate in the fork.\n- ``failed_interfaces``: interfaces to deactivate, each as a\n  ``node[interface]`` string (for example ``\"r1[Gi0/0]\"``) or as a\n  ``{\"hostname\": \"r1\", \"interface\": \"Gi0/0\"}`` mapping. Bare node names\n  are rejected; use ``failed_nodes`` for those.\n- The failure-testing flow is: fork, then diff the fork against the base\n  with a differential question.\n- ``network``: the network both snapshots live in, if given.\n\nReturns ``{name, base_name}`` — the name actually used.","inputSchema":{"additionalProperties":false,"properties":{"base_name":{"type":"string"},"failed_interfaces":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null},"failed_nodes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"overwrite":{"default":false,"type":"boolean"}},"required":["base_name"],"type":"object"},"name":"batfish_fork_snapshot","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Fork Snapshot"},{"_meta":{"fastmcp":{"tags":[]}},"description":"Return the topology graph of a snapshot as nodes/edges.\n\n- ``kind=\"layer3\"`` (default): L3 links from ``layer3Edges``\n  (node — interface <-> interface — node, so edges carry a ``title``\n  like ``\"r1 (Gi0/0) <---> r2 (Gi0/0)\"``).\n- ``kind=\"routing\"``: routing adjacencies from ``bgpEdges``.\n\nReturns ``{kind, snapshot, node_count, edge_count, nodes, edges}``.","inputSchema":{"additionalProperties":false,"properties":{"kind":{"default":"layer3","type":"string"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"name":"batfish_get_topology","outputSchema":{"additionalProperties":true,"type":"object"},"title":"Batfish Get Topology"}]}}}
