Skip to main content
Glama

haldir_get_spend

Retrieve spend summaries by agent or session, including total USD and per-tool breakdowns, so budget owners can track and control AI agent costs.

Instructions

Spend summary for an agent or session: total USD and a breakdown by tool. The question a budget owner asks.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "haldir_get_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idNoFilter by agent ID
session_idNoFilter by session ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.3

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the return shape (total USD plus per-tool breakdown) and implies a read-only operation, but it omits the aggregation window (what time period the spend covers), whether filters are additive, and what happens when both or neither parameter is supplied.

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?

Two short sentences with the payload front-loaded — resource, scope, and return content come first. The second sentence is atmospheric rather than informational but is short enough not to obstruct.

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?

No output schema exists, so the description must carry return-value information, and it partially does by naming the total and per-tool breakdown. However, a spend summary without a stated time period is materially ambiguous, and with no annotations the read-only/safety profile and filter-combination rules remain unstated.

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 description coverage is 100%, so both filters are already documented as agent ID and session ID. The phrase "for an agent or session" adds only a mild hint that the two parameters select alternative scopes; it adds no syntax, mutual-exclusivity, or default behavior beyond the schema.

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?

States a specific resource (spend) and scope (an agent or session) plus the returned content (total USD, per-tool breakdown). It is clearly distinguishable from the sibling set, which is dominated by secret, session, audit, and proof operations, none of which report spend. It stops short of explicitly contrasting with any named alternative.

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?

"The question a budget owner asks" hints at the audience but gives no explicit when-to-use guidance, no when-not, and no named alternative. It also leaves unanswered whether the agent_id and session_id filters can be combined or which to pick, which is exactly the decision an agent faces when invoking it.

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