Skip to main content
Glama

llm_session_spend

Monitor real-time session spend, broken down by model and tool, with anomaly warnings when costs exceed a threshold within 10 minutes.

Instructions

Show real-time session cost breakdown.

Reports spend accumulated since this session started, broken down by model and tool. Fires an anomaly warning if spend exceeds the configured threshold (default $0.50) in under 10 minutes.

Returns a formatted summary with per-model costs and anomaly status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses key behaviors: reports session spend, fires anomaly warning with threshold and time condition, returns formatted summary. Without annotations, this sufficiently covers the tool's read-only nature and output.

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?

Four concise sentences, each adding distinct value: purpose, content breakdown, anomaly behavior, output format. Front-loaded and no redundant text.

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

Completeness5/5

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

Description fully covers the tool's purpose, output details, and behavioral trait (anomaly warning), sufficient for a parameterless tool with an output schema.

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?

Tool has no parameters, so schema coverage is 100%. Description adds value by explaining output content, aligning with baseline 4 for zero-parameter tools.

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?

Clearly states 'Show real-time session cost breakdown' with specific breakdown by model and tool, and mentions anomaly warning, distinguishing it from sibling cost/usage tools that may cover broader or historical data.

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

Usage Guidelines3/5

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

Implies usage for current session cost monitoring but does not explicitly state when not to use or mention alternatives like llm_budget or llm_check_usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ypollak2/llm-router'

If you have feedback or need assistance with the MCP directory API, please join our Discord server