Skip to main content
Glama

Report Model Usage

usage_report
Destructive

Meldet den Verbrauch dieser Sitzung (POST /agents/verbrauch).

**Der Verbrauch kommt über den MCP:** die Sitzung meldet selbst, COMPASS
holt nichts beim Anbieter ab. Eine Sitzung ohne Meldung
erscheint in `GET /agents/verbrauch/ohne-meldung`; in den Flächen steht
er mit „—", nie mit 0, und bekommt weder Punkte noch Abzug.

Gemeldet wird am ENDE der Sitzung und bei langer Arbeit zwischendurch: **die
Meldung ersetzt, sie addiert nicht.** Schlüssel ist (Tag, Persona,
Modell, Anbieter, Sitzung) — dieselbe Sitzung, die dasselbe Modell erneut
meldet, überschreibt ihre eigene Zeile. Erwartet werden deshalb die SUMMEN
dieser Sitzung, nicht die Differenz seit der letzten Meldung. Ein
Wiederholversuch nach einem Abbruch verdoppelt dadurch nichts.

`sitzung` ist dieselbe Kennung wie im Herzschlag (`agent_herzschlag`) —
daran hängt die Zuordnung „hat diese Sitzung gemeldet".

`anbieter` ist eine freie Zeichenkette (z. B. `anthropic`, `deepseek`) —
kein geschlossenes Enum, sondern offen für weitere. `modell` ist die
Modell-ID des Anbieters.

Alles außer den fünf Pflichtwerten ist optional, und optional heißt
**weglassen**, nicht 0: ein Anbieter, der keine Cache-Tokens meldet, hat
nicht null gelesen, er hat nichts gesagt. Eine 0 hier ist eine Messung,
die es nicht gab.

`zeitpunkt` (ISO 8601) ist der Zeitpunkt des VERBRAUCHS, nicht der der
Meldung; er bestimmt den Tag, unter dem gebucht wird. Damit lässt sich
nachtragen, und eine Sitzung über Mitternacht landet nicht komplett auf
dem Folgetag. Fehlt er, gilt jetzt. Wann die Meldung ankam, hält der
Kern selbst fest (`gemeldet_am`) — das kann der Melder nicht setzen.

**CACHE GELESEN UND CACHE GESCHRIEBEN SIND ZWEI ZAHLEN**, nie eine.
Gemessen an einem echten Sitzungsprotokoll: 1.383.889.662 gelesene gegen
18.466.177 geschriebene Cache-Token, Faktor 75 — und bei Anbietern kostet
ein geschriebener Token ein Mehrfaches eines gelesenen. In Claude Codes
Protokoll heißen sie `cache_read_input_tokens` und
`cache_creation_input_tokens`. Wer sie zusammenwirft, macht die
Kostenrechnung um diesen Faktor falsch.

Die KOSTEN rechnet der Kern, nicht dieses Werkzeug und nicht der Melder:
aus `compass_modell_preise` und dem Preis, der am gemeldeten Tag GALT. Ein
Agent, der seinen Preis selbst behauptet, wäre eine Quelle, die niemand
prüfen kann. Fehlt ein Preis, kommt `kosten_cent: null` samt
`kosten_grund` zurück — „nicht gemessen", nicht 0; der Betreiber trägt
den Preis nach, und der Betrag wird nachgerechnet.

Die Antwort nennt `kosten_waehrung`, die Waehrung des Preises, mit dem
gerechnet wurde. Betraege in verschiedenen Waehrungen werden nirgends
addiert: Auswertungen fuehren sie je Waehrung getrennt, ohne Umrechnung.

Unbekannte Persona -> 404, negative Zahl -> 422, beides durchgereicht.

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": {
      "persona_slug": "<persona_slug>",
      "sitzung": "<sitzung>",
      "anbieter": "<anbieter>",
      "modell": "<modell>",
      "token_ein": "<token_ein>",
      "token_aus": "<token_aus>"
    },
    "name": "usage_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatNoChat token returned by `persona_waehlen`. With it, the call acts as the persona of that chat; without it, as the unbound connection (Chat-Token aus `persona_waehlen`: mit ihm handelt der Aufruf als die Persona dieses Chats, ohne ihn als die ungebundene Verbindung).
fehlerNo
modellYes
aufrufeNo
sitzungYes
anbieterYes
dauer_msNo
token_ausYes
token_einYes
zeitpunktNo
persona_slugYes
werkzeugaufrufeNo
token_cache_gelesenNo
token_cache_geschriebenNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations declare only readOnlyHint=false and destructiveHint=true; the description goes well beyond by disclosing the overwrite key (day, persona, model, provider, session), that costs are computed server-side from `compass_modell_preise` at the price valid on the reported day, that a missing price yields `kosten_cent: null` rather than 0, that currency amounts are never summed, and the 404/422 error behaviour. The overwrite semantics are consistent with destructiveHint=true.

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

Conciseness3/5

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

Purpose is front-loaded and bold markers aid scanning, but the text is roughly 450 words with repeated admonitions about zero-vs-omitted (stated three separate times via '—', optional≠0, and `kosten_cent: null`) and an anecdotal factor-75 measurement that could be a clause. It is informative rather than padded, yet clearly longer than needed.

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 14-parameter mutation with an output schema present, the description covers the semantics an agent most needs — replace-vs-add, sums not deltas, consumption timestamp, cache tokens, server-side costing — and need not explain return values because the output schema exists. The remaining hole is the cluster of undocumented optional counters and the five-vs-six required-value mismatch.

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 coverage is only 7% across 14 parameters, so the description has to carry the load, and it does well for `sitzung`, `anbieter`, `modell`, `zeitpunkt` and the two cache tokens (including the read-vs-written distinction and the omit-vs-zero rule). But `aufrufe`, `fehler`, `dauer_ms`, `werkzeugaufrufe`, `token_ein`/`token_aus` and `persona_slug` get no explanation, and it claims 'fünf Pflichtwerte' while the schema marks six as required, leaving real ambiguity.

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 first line names a specific verb and resource — 'Meldet den Verbrauch dieser Sitzung (POST /agents/verbrauch)' — and the following text separates it from the heartbeat (`agent_herzschlag`) and from the read-side `GET /agents/verbrauch/ohne-meldung`. An agent can tell what this tool does and does not do without opening the schema.

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?

Explicit timing guidance: report at the END of the session and intermittently during long work, plus the crucial rule that each call REPLACES rather than adds, so the values are cumulative sums and retries after an abort are safe. It lacks an explicit 'when not to use' or a named sibling alternative for other reporting needs, which keeps it short of a 5.

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.