Skip to main content
Glama

get_session_token_usage

Calculates token consumption and context bloat across a conversation transcript, defaulting to the latest active conversation, so agents can gauge context pressure.

Instructions

Calculate token consumption and context bloat across the current conversation transcript.

Input Schema

NameRequiredDescriptionDefault
conversation_idNoOptional conversation ID to inspect. Defaults to the latest active conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations exist, so the description carries the full disclosure burden, and it does not state that this is a read-only computation, whether it costs tokens itself, or what the result looks like. There is no output schema either, yet the description gives no indication of the shape of the 'token consumption' or 'context bloat' figures. It does not contradict anything, but it discloses very little behavior.

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?

One front-loaded sentence with no filler or redundancy. It is efficient, though the brevity is partly the source of the missing guidance rather than pure economy.

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

Completeness3/5

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

This is a simple one-optional-parameter tool, so the definition is minimally adequate. With no output schema and no description of the returned metrics, an agent cannot anticipate what 'context bloat' means numerically or how to interpret the result.

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 the single optional conversation_id parameter is fully documented in the schema, so the baseline is 3. The description adds no parameter meaning and even skews toward 'current conversation transcript' while the schema allows inspecting an arbitrary conversation.

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?

The description gives a specific verb ('Calculate') and specific metrics ('token consumption and context bloat') scoped to the conversation transcript, so an agent knows exactly what the tool produces. It does not differentiate itself from siblings like get_token_awareness_summary or get_account_quota, leaving overlap ambiguous.

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 guidance, no exclusions, and no mention of the two sibling tools that plausibly cover adjacent token/quota reporting. The phrase 'current conversation transcript' hints at scope but is never framed as a selection rule versus the alternatives.

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