Skip to main content
Glama

check_circuit_breaker

Inspect daily token usage, remaining budget, and circuit breaker status from the local SQLite ledger to stop runaway agent loops and prevent daily bill spikes.

Instructions

Inspect daily token consumption, remaining budget, and circuit breaker status from the local SQLite ledger to prevent runaway agent loops and $50/day bill spikes.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "check_circuit_breaker"
  }
}

Input Schema

NameRequiredDescriptionDefault
db_pathNoSQLite token ledger path (default: .cache/iktisad_gateway.db)..cache/iktisad_gateway.db
daily_budgetNoDaily token budget cap (default: 1,000,000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. "Inspect" and "from the local SQLite ledger" imply a read-only local lookup, but the description does not explicitly confirm that it has no side effects, whether it requires filesystem access, or what happens if the ledger is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is a single front-loaded sentence with no filler. It puts the inspected values and the reason for inspecting them immediately in view.

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 low-complexity tool with two optional parameters and no output schema, the description adequately identifies the data source and the values returned. It is slightly incomplete in not stating read-only behavior or failure conditions, but it covers the core need.

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 the two optional parameters are already documented. The description mentions daily consumption and budget but adds no parameter-specific meaning beyond what the schema provides for db_path and daily_budget.

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 uses the specific verb "Inspect" and names the exact resources: daily token consumption, remaining budget, and circuit breaker status from a local SQLite ledger. The purpose is clear, but it does not explicitly distinguish this tool from any sibling tool such as select_frugal_model.

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?

The phrase "to prevent runaway agent loops and $50/day bill spikes" gives a clear preventive context, implying the tool is used for cost and loop monitoring. However, it does not explicitly say when to call it, when not to call it, or which sibling tool to use instead for related tasks.

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