Skip to main content
Glama

cost_query

Check cost audits for AI coding agents: view budget limits, actual token/cost usage per agent, and WARN-level over-limit records. Optionally set temporary daily cost or per-run token caps during the query.

Instructions

查询成本审计——预算配置 / 各 Agent 实际消耗(token/成本)/ 超限记录(WARN 级)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxCostPerDayNo查询时临时指定每日成本上限(USD)
maxTokensPerRunNo查询时临时指定单 run token 上限(不传则仅报实际消耗)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It does disclose that the operation is a query and enumerates the audit output categories, which is useful. It does not mention response format or side effects, though the verb '查询' suggests read-only behavior.

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 a single dense, front-loaded sentence with no filler. Every phrase contributes meaning, and the structure makes the tool's scope immediately understandable.

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?

For a simple read-only query with optional parameters and no output schema, the description sufficiently names the returned data categories (budget config, actual consumption, WARN records). It lacks explicit guidance on when to prefer it over related siblings, but that gap is already captured in the usage guidelines dimension.

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 the schema already documents both parameters. The description's mention of budget configuration and token/cost over-limit records loosely aligns with maxCostPerDay and maxTokensPerRun, but it adds no parameter-specific meaning 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?

The description states a clear action ('查询' / query) and a specific resource: cost audit, covering budget configuration, per-agent token/cost consumption, and WARN-level over-limit records. This is specific and informative, though it does not explicitly distinguish itself from sibling tools like stats or train_budget.

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?

The phrase '查询成本审计' implies this is the go-to tool for reading cost and budget audit data, so the intended usage is inferable. However, it provides no explicit when-to-use guidance, no exclusions, and no pointer to alternative tools such as train_budget or run_audit.

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

Deploy Server

Other Tools