Skip to main content
Glama
sohaibsohail98

mcp-context-inspector

get_cost_estimate

Read-onlyIdempotent

Estimate the USD cost of agent sessions using token counts and a static price table. Pass a session ID for one session's cost, or a lookback period in seconds to sum all sessions within that window.

Instructions

Estimated USD cost as a float.

Pass session_id for one session's cost, or period_seconds for the summed cost of your sessions in the last N seconds. Give exactly one; non-owners are scoped to their own sessions. These are estimates from token counts and a static price table, not billed amounts.

session_id: optional session id. period_seconds: optional lookback window in seconds (e.g. 86400 for the last day).

Returns 0.0 for an unknown or non-owned session_id, and for a period with no matching sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo
period_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as read-only, idempotent, and non-destructive, so the bar is lower. The description adds meaningful behavioral context: estimates are not billed amounts, and unknown/non-owned session IDs as well as empty periods return 0.0. These are exactly the edge cases an agent needs to anticipate.

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?

The description is compact and front-loaded with the core meaning, then moves to usage modes, then edge cases. Each sentence earns its place; no filler or repetition of annotation values.

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?

Given the annotations already cover safety and idempotency, and an output schema exists, the description supplies all remaining needed context: parameter semantics, exclusivity, scoping, estimate nature, and zero-value fallback behavior. An agent can invoke this tool correctly without further inference.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden for parameter meaning. It explains both parameters in plain language, gives an example value for period_seconds, and clarifies mutual exclusivity plus ownership scoping. This fully compensates for the bare schema.

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?

The description opens with a precise statement of purpose: 'Estimated USD cost as a float.' It clearly identifies the resource (session cost) and the computation basis (token counts and a static price table), and distinguishes this from billed amounts, which separates it from related metrics tools.

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 description gives explicit usage guidance: pass exactly one of session_id or period_seconds, explains what each mode computes, and notes non-owner scoping. It does not explicitly name sibling tools as alternatives, but for this tool the parameter-mode distinction is the main usage decision and it is covered clearly.

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

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/sohaibsohail98/mcp-context-inspector'

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