Skip to main content
Glama

session_report

Report token usage and cost at session end, save them to the agent record, and return tool-call stats plus a compliance score for project-context checks.

Instructions

Report token usage and cost at the end of a session. Saves them on your agent session record and returns this session's tool-call stats and a compliance score (whether you loaded project context before acting). All parameters are optional; omitted or zero values are not recorded.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "session_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoLLM model used (e.g. 'claude-sonnet-4').
tokens_inNoTotal input tokens this session.
tokens_outNoTotal output tokens this session.
estimated_costNoEstimated cost in USD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-idempotent, non-destructive write, and the description adds real context beyond them: what gets persisted (agent session record), what comes back (tool-call stats, compliance score), and that omitted/zero values are silently dropped. It doesn't address repeated calls against the non-idempotent hint, which keeps it from a 5.

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?

Three tight sentences, front-loaded with purpose, then effect, then parameter behavior. Nothing redundant.

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 no output schema, the description reasonably carries the return burden by naming tool-call stats and a compliance score and defining the score's meaning. Details of the returned structure and any follow-up implications of a low compliance score are left implicit.

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 adds meaning the schema cannot express — that every parameter is optional and that omitted or zero values are not recorded, which changes how an agent should fill them in.

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?

States a specific verb and resource — report token usage and cost at session end — plus a secondary effect (saving to the agent session record). No sibling tool does anything comparable, so the agent can place it immediately.

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?

The timing guidance is explicit and actionable: call it at the end of a session. It doesn't name alternatives or say what to do if usage is unknown, but the intent is unambiguous.

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