Skip to main content
Glama

get_ai_usage

Monitor AI token usage and estimated cost for the current MCP session, tracking calls, input/output tokens, and spending from design tools.

Instructions

AI token usage and estimated cost for this MCP session (in-memory tracker; never throws; unknown when provider pricing is not configured).

Returns: { calls, inputTokens, outputTokens, estimatedCost, knownEstimatedCost, costComplete, unpricedCalls, summary }. Use to monitor spend from analyze_design, design_doc, or compose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, but the description thoroughly discloses behavioral traits: it never throws, behaves correctly even when provider pricing is not configured (returns unknown), and is an in-memory tracker. This covers all relevant behavioral expectations.

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 three concise sentences, each serving a purpose: stating functionality, behavioral notes, and return structure with usage guidance. No unnecessary information.

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 no parameters and no output schema, the description provides sufficient information: it explains what the tool does, its behavior, and what it returns. The usage guidance ties it to specific sibling tools, making it contextually complete.

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?

There are no parameters, so schema description coverage is 100%. The description adds meaning by listing the return fields (calls, inputTokens, etc.), which compensates for the lack of an output schema and provides context beyond the input 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 clearly states it returns AI token usage and estimated cost for the MCP session, specifying it is an in-memory tracker. It distinguishes itself from sibling tools by mentioning it is used to monitor spend from specific tools like analyze_design, design_doc, or compose.

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

Usage Guidelines5/5

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

The description explicitly says 'Use to monitor spend from analyze_design, design_doc, or compose,' providing clear guidance on when to use this tool versus alternatives among the sibling tools.

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/memi-design/memi'

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