Skip to main content
Glama

Cost ledger: month-to-date spend, by operation and by tool

spend
Read-onlyIdempotent

Track X API monthly costs, remaining budget, last 24h usage, and price table. Optionally list recent ledger entries.

Instructions

What the account has spent on the X API this billing month according to the local ledger (mirrors X pay-per-use prices, with 24h-UTC read dedup), the remaining budget, the last 24h, and the price table. X does not expose a balance API; reconcile against console.x.com occasionally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recentNoAlso list the last N ledger entries.
Behavior5/5

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

Explains the local ledger nature, price mirroring, dedup, and the limitation that it's not authoritative due to no balance API, providing transparency about data source and caveats.

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?

The description conveys necessary details but includes some parenthetical and explanatory phrases that add length; still efficient and not verbose.

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?

Provides sufficient context about data sources, limitations, and reconciliation, though it doesn't specify output format or further edge cases, which is acceptable given no 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?

The single parameter 'recent' is clearly described in the schema, and the tool description adds context about the output including 'last 24h', but doesn't elaborate further on parameter usage.

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 the tool returns spend data, remaining budget, recent activity, and price table, distinguishing it from other tools in the set.

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?

Mentions the absence of a balance API and suggests reconciling against console, giving context on when to rely on this tool versus external sources, though not explicitly stating when to use alternatives.

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/rthomas24/x-mcp'

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