Skip to main content
Glama
ownasquare

Context Loom

by ownasquare

record_usage

Record provider-observed usage idempotently and return updated thread totals for accurate token tracking.

Instructions

Idempotently record provider-observed usage and return updated thread totals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
providerYes
thread_idYes
hydration_idNo
idempotency_keyYes
reasoning_tokensNo
actual_input_tokensNo
cached_input_tokensNo
actual_output_tokensNo
verified_baseline_input_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
turnsYes
thread_idYes
actual_input_tokensNo
cached_input_tokensNo
actual_output_tokensNo
local_compactor_tokensNo
actual_usage_completenessYes
projected_input_tokens_savedYes
estimated_baseline_input_tokensYes
estimated_hydrated_input_tokensYes
baseline_estimate_adjusted_reductionNo
verified_counterfactual_tokens_savedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses idempotency and that totals are returned, but doesn't say what happens on a duplicate idempotency_key, whether it requires auth, or how concurrent writes behave — gaps for a mutation tool.

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?

A single front-loaded sentence with no filler. Every word earns its place and the key behavioral trait (idempotency) leads.

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

Completeness2/5

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

An output schema exists, so return values need no explanation. But for a 10-parameter mutation tool with zero annotation coverage and zero schema descriptions, this one-liner leaves too much unspecified about its arguments and write semantics.

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

Parameters2/5

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

Schema description coverage is 0% across 10 parameters, and the description compensates only vaguely through the phrase 'provider-observed usage.' Nothing explains the token fields, idempotency_key semantics, hydration_id, or which of the many optional token params matter when.

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?

States a specific verb (record) and resource (provider-observed usage) and adds the return value (updated thread totals). It's clear what the tool does, but it never differentiates itself from siblings like thread_stats or hydrate_message, which handle related thread/token concepts.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no conditions, and no alternatives. An agent must infer from the name alone that this is for logging observed token usage rather than reading it (thread_stats) or hydrating messages.

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