Skip to main content
Glama

driftguard_circuit_breaker_check

Logs command outcomes and halts the agent after 3 consecutive identical errors, stopping hallucination loops so repeated failures don't spiral.

Instructions

Registra l'esito di un comando ed evita loop infiniti di allucinazione, bloccando l'agente se ripete lo stesso errore per 3 volte consecutive.

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": {
      "command": "<command>",
      "exitCode": "<exitCode>"
    },
    "name": "driftguard_circuit_breaker_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesIl comando appena eseguito.
exitCodeYesL'exit code del comando (0 per successo, != 0 per errore).
errorSnippetNoSnippet opzionale del messaggio di errore.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the important behavior beyond the schema: the tool accrues state across calls and will actively block the agent after 3 consecutive repetitions of the same error. However, it does not say what 'same error' means (same command, same exit code, same snippet?), whether the counter resets on success, or what the blocking response actually looks like.

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?

A single compact sentence that front-loads the action and then the consequence, with no padding. Minor deduction for the language mismatch with the tool name and sibling set (Italian description, English identifiers), which slightly slows parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a small 3-parameter stateful gate, the description covers purpose and trigger but omits the return contract, which matters here because there is no output schema: an agent does not know whether the tool errors out, returns a status, or merely records. Given no annotations and no output schema, a bit more disclosure was warranted.

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%, so all three parameters (command, exitCode, errorSnippet) are already well documented inline. The description adds only a loose mapping via 'l'esito di un comando', and never mentions errorSnippet or how it factors into the repeat-detection logic. Baseline 3 is appropriate since the schema does the heavy lifting.

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?

The description names a specific verb and trigger mechanism: it records a command's outcome and blocks the agent after the same error repeats 3 times consecutively. That is far more than a restatement of 'circuit_breaker_check' and makes the tool's role unmistakable among the many driftguard siblings. It stops short of naming which sibling handles the adjacent concern (e.g. driftguard_diagnose_failure or driftguard_safety_check), so sibling differentiation is only partial.

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?

Usage is implied rather than stated: 'Registra l'esito di un comando' suggests calling it after executing a command, and the 3-error rule implies it should be called on error paths. There is no explicit 'call this after every command', no mention of when NOT to call it, and no pointer to alternatives such as the dry-run or diagnose tools.

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