Skip to main content
Glama

query_balance

Query real-time GLM and Kimi Coding Plan token/credit balances to track 5-hour, weekly, and monthly quota usage, remaining percentages, and reset times for one or all enabled accounts.

Instructions

查询 GLM 与 Kimi Coding Plan 账号的实时 Token/积分余额,包含 5小时滚动窗口及周(7d)/月(30d)周期的已用额度、剩余比例与重置时间。

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": "query_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idNo可选,指定查询单个账号 ID;不填则查询 JSON 配置文件中所有启用账号

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden; '查询' plus the balance framing adequately signals a read-only operation and it discloses the return payload (used quota, remaining ratio, reset times). It omits failure behavior when a provider is unreachable, whether it calls external APIs live, and any rate-limit or credential requirements, which are real gaps for an unannotated tool.

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?

One dense sentence that front-loads the action and resource, then the scope details. Nothing is redundant or padded, though the packed list of periods and metrics takes a moment to parse.

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 single-optional-parameter read tool with no output schema, the description is largely sufficient: it names the accounts covered and enumerates the returned metrics and reset timing, which is the main thing an agent needs to decide what to do with the result. Missing sibling routing and provider-failure behavior keep it just short of complete.

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 coverage is 100% and the single optional account_id parameter is fully documented in the schema itself (including the 'omit = all enabled accounts' semantics). The description adds no meaning beyond that because it does not mention the parameter at all; baseline 3 applies when the schema does the heavy lifting.

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 gives a specific verb ('查询') plus a specific resource ('实时 Token/积分余额') and even enumerates the measurement windows (5-hour rolling, 7d, 30d), so the agent knows exactly what data it returns. It stops short of differentiating itself from the sibling get_utilization_stats, which is the only thing keeping it from a 5.

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?

Usage is only implied: the description makes clear this is the tool for checking balances, and the schema notes that omitting account_id queries all enabled accounts. There is no explicit statement of when to prefer this over get_utilization_stats, nor any exclusion or prerequisite (e.g. whether provider credentials must be configured first).

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