Run Budget Guard

Hard dollar, token, call and time caps shared by every sub-agent in one agent run.

Sollte ich dies verwenden

Qualität und Sicherheit

A
Qualität der Beschreibung
97%
Vollständigkeit des Schemas
71%
Qualität der Benennung
87%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~855Tokens (Tool-Definitionen)
~1023 BTypische Antwortgröße
Mittlere Auswirkung auf die Aufmerksamkeit (0.67% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

{
  "mcpServers": {
    "budget": {
      "url": "https://budget.cloudforbots.com/mcp"
    }
  }
}

Remote-Endpunkte

https://budget.cloudforbots.com/mcpstreamable-http

Was es kann

Tool-Inventar

Tools (6)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
⚪open_budget(label, max_usd, max_tokens, max_calls, max_seconds, ...)

Open a hard budget for one agent run before it starts: max dollars, tokens, calls and/or wall-clock seconds. Returns a handle. Give the handle to every sub-agent; they all draw from the same ledger, so one runaway loop or fork cannot exceed the run cap.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "description": "What this run is for, e.g. \"nightly code cleanup\"."
    },
    "max_usd": {
      "type": "number",
      "description": "Dollar cap for the whole run (your own estimates per call)."
    },
    "max_tokens": {
      "type": "integer",
      "description": "Token cap (input + output) for the whole run."
    },
    "max_calls": {
      "type": "integer",
      "description": "Cap on model/tool calls for the whole run."
    },
    "max_seconds": {
      "type": "integer",
      "description": "Wall-clock cap in seconds from now."
    },
    "ttl_hours": {
      "type": "integer",
      "description": "Handle lifetime (free max 24, Pro max 168). Default 24."
    },
    "mode": {
      "type": "string",
      "enum": [
        "shadow",
        "enforce"
      ],
      "description": "shadow = watch only: track spend and flag where the cap WOULD have stopped the run, never block (free). enforce = return allowed=false at the cap (Pro). Default: enforce on Pro, shadow on free."
    }
  }
}
⚪reserve(handle, usd, tokens, calls, note)

Call BEFORE each model call, tool call or sub-agent spawn with your estimate. Returns allowed=true and deducts it, or allowed=false with the limit that tripped. When allowed is false, stop, do not retry, and return your partial result to the user. Atomic, so parallel sub-agents cannot both slip under the cap.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "handle": {
      "type": "string",
      "description": "The budget handle from open_budget (looks like bg_<id>.<secret>). Pass it to every sub-agent so they all spend from the same budget."
    },
    "usd": {
      "type": "number",
      "description": "Estimated cost of the next call in USD."
    },
    "tokens": {
      "type": "integer",
      "description": "Estimated tokens of the next call."
    },
    "calls": {
      "type": "integer",
      "description": "Number of calls to reserve (default 1)."
    },
    "note": {
      "type": "string",
      "description": "Short note, e.g. \"web_search #12\"."
    }
  },
  "required": [
    "handle"
  ]
}
⚪record(handle, usd, tokens, note)

After a call, report the actual usage minus what you reserved (positive if it cost more, negative to give back an overestimate). Keeps the ledger honest without blocking.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "handle": {
      "type": "string",
      "description": "The budget handle from open_budget (looks like bg_<id>.<secret>). Pass it to every sub-agent so they all spend from the same budget."
    },
    "usd": {
      "type": "number"
    },
    "tokens": {
      "type": "integer"
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "handle"
  ]
}
🟢weekly_report

Draft a plain-English report of the last 7 days for your key (or IP): runs, spend, runs that went over their cap, and dollars spent after a cap would have stopped them. Read-only; sends nothing. Show it to your user.

Eingabe-Schema

{
  "type": "object",
  "properties": {}
}
🟡budget_status(handle, close)

See spend vs limits, remaining budget, whether the run is stopped and why, and the last 20 ledger events. Set close=true when the run finishes.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "handle": {
      "type": "string",
      "description": "The budget handle from open_budget (looks like bg_<id>.<secret>). Pass it to every sub-agent so they all spend from the same budget."
    },
    "close": {
      "type": "boolean"
    }
  },
  "required": [
    "handle"
  ]
}
🟢usage_and_upgrade

Show today's usage for your key or IP and the $49/month All Access upgrade link (cloudforbots.com/offer). Free tier: 500 calls/day. Not metered.

Eingabe-Schema

{
  "type": "object",
  "properties": {}
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet6 Tools