Skip to main content
Glama

get_usage

Monitor agent resource usage by retrieving API call count and compute consumption. Supply the agent ID to receive usage statistics.

Instructions

查看 Agent 的用量统计。返回 API 调用次数、算力消耗等。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent ID

Implementation Reference

  • The actual HTTP client method that executes the get_usage tool. It performs a GET request to '/acap/v1/agents/{agentId}/usage' to retrieve usage statistics for an agent.
    async getUsage(agentId: string) {
      return this.request('GET', `/acap/v1/agents/${agentId}/usage`);
    }
  • The input schema definition for the 'get_usage' tool. It declares a required 'agent_id' string parameter and provides a Chinese description: 'View Agent usage statistics. Returns API call count, compute consumption, etc.'
      name: 'get_usage',
      description: '查看 Agent 的用量统计。返回 API 调用次数、算力消耗等。',
      inputSchema: {
        type: 'object' as const,
        properties: {
          agent_id: { type: 'string', description: 'Agent ID' },
        },
        required: ['agent_id'],
      },
    },
  • src/index.ts:849-853 (registration)
    The case handler in the main tool dispatch switch statement that calls client.getUsage(agent_id) when the tool name is 'get_usage'.
    case 'get_usage': {
      const { agent_id } = args as { agent_id: string };
      result = await client.getUsage(agent_id);
      break;
    }
  • src/index.ts:120-120 (registration)
    Registration of 'get_usage' in the 'identity' feature group, alongside other identity-related tools like register_agent, get_profile, etc.
    'get_usage', 'rotate_api_key',
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, required permissions, or side effects. It only mentions the return values without safety or behavioral context.

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 concise with two sentences, front-loaded with the purpose. Every sentence contributes meaning without redundancy.

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?

Given no output schema, the description partially explains return values ('API call count, computational power consumption, etc.') but lacks specifics on aggregation, time range, or other details. Adequate for a simple tool but incomplete for full understanding.

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% with a single required parameter 'agent_id' described as 'Agent ID'. The description adds meaning by associating it with viewing an Agent's usage, but does not provide additional details 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 clearly states the tool is for viewing Agent usage statistics, specifying 'API call count' and 'computational power consumption'. It is specific with a verb and resource, but does not explicitly distinguish from sibling tools.

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?

No guidance on when to use this tool versus alternatives. The usage context is implied but not explicit, and no exclusions or alternative tools are mentioned.

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/ggqshuai-hub/a2amarket-mcp-server'

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