Skip to main content
Glama

agentguard — policy proxy for agent tool calls

okgate_spend_report

Read-onlyIdempotent

Read an agent log and report what it spent: totals, calls by tool and by class, estimated dollars by rail, loops, the largest single run, and — for every overspend — the okgate band whose cap would have stopped it, the exact cap, and the call that would have tripped it.

Needs no account and no key. The log is read in the request and discarded; nothing is stored. Accepts an agentwares audit export (agentwares.audit/v1), a Claude Code session .jsonl, or a CSV/JSONL of tool calls with any of tool, ts, class, amount_usd, rail, run_id, model, input_tokens, output_tokens.

Caps come from the proxy's own default policy, so a band named here refuses exactly what it says it refuses. Buying that band is a checkout a person completes; the calls-only purchase an unattended agent can complete is in okgate_get_pricing instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logYesThe log itself, verbatim — JSON, JSONL or CSV. Not a path and not a URL: this server does not fetch anything.
detailNo`concise` (default) returns the totals, the top ten tools, the rails, the loops and every overspend. `full` adds the complete per-tool breakdown and the window. Ask for `full` only when you are going to read it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the safety profile is covered. The description meaningfully adds that no account or key is needed, that the log is read in-request and discarded (nothing stored), and that caps derive from the proxy's own default policy — behavioral facts not present in any structured field. It omits error handling and size limits.

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?

Three short paragraphs that are front-loaded with outputs first, then input formats/privacy, then the cap-routing note. Every sentence carries information, though the middle paragraph's enumeration of accepted field names is dense and slightly long-winded.

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

Completeness5/5

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

With no output schema, the description carries the burden of describing the return, and it does so explicitly by enumerating every report section including the overspend band and tripping call. For a stateless read-only analysis tool, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema by naming the accepted input shapes in detail — agentwares.audit/v1 exports, Claude Code .jsonl sessions, or CSV/JSONL with the recognized field names — which helps an agent decide whether its data qualifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause gives a precise verb+resource ('Read an agent log and report what it spent') and then enumerates the exact report sections: totals, calls by tool and class, dollars by rail, loops, largest run, and per-overspend band/cap/call. It also names a sibling (okgate_get_pricing) to route the adjacent purchase task, so an agent can separate it from the other okgate tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the triggering context clearly (auditing a spend log) and explicitly redirects the buying path to okgate_get_pricing, which is real sibling differentiation. It stops short of stating when NOT to use this tool or how it relates to get_run/export_audit, so it is clear context without full exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.