Skip to main content
Glama

Close period

close_period
Destructive

Freeze all open events into an immutable invoice (exactly-once). The invoice amount is what agent-escrow-agent should settle.

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": {
      "meter_id": "<meter_id>"
    },
    "name": "close_period"
  }
}

Input Schema

NameRequiredDescriptionDefault
meter_idYesThe meter id returned by create_meter.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changed
    • addedInput schema / properties / meter_id / description
      Added value: +"The meter id returned by create_meter."
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotentHint=false, so the safety bar is partly met; the description adds real value by disclosing that the result is an immutable invoice, i.e. the open events become frozen, plus downstream context that agent-escrow-agent settles the amount. The parenthetical '(exactly-once)' sits awkwardly against idempotentHint=false and could lead an agent to treat retries as safe — not a flat contradiction, but a genuine ambiguity worth tightening.

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?

Two short sentences, zero waste, with the effect (freeze into immutable invoice) front-loaded before the downstream consequence. Nothing redundant with the annotations or schema.

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?

With an output schema present and one fully documented parameter, plus annotations covering the destructive profile, the definition is nearly self-sufficient. Missing pieces are error/edge behavior (second call on a closed period, empty period) and prerequisites, which keep it from a 5.

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 100% and meter_id is already documented as 'the meter id returned by create_meter', so the schema carries the full burden. The description adds no syntax, format, or constraint detail beyond it; baseline 3 applies.

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+resource+effect: freezing open events into an immutable invoice. That is much more informative than the title 'Close period' and is distinguishable from siblings like record_usage or list_events. It stops short of naming any sibling or scoping condition, so it lands at 4 rather than 5.

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?

There is no when-to-use or when-not-to-use guidance: nothing about prerequisites (must events exist for the period? must usage be recorded first?), no mention of what to do if a period is already closed, and no alternatives pointed to. The only usage signal is implied by 'invoice' — that this is the billing step.

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.