Skip to main content
Glama

get_tokens

Retrieve registered tokens for a specific blockchain network to enable token management and operations.

Instructions

Get registered tokens (builtin + custom) for a specific network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork identifier (e.g., "ethereum-sepolia", "polygon-amoy" or CAIP-2 "eip155:1").

Implementation Reference

  • The registerGetTokens function implements the "get_tokens" tool, setting up the MCP tool registration, schema validation, and the handler function that queries the API.
    export function registerGetTokens(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'get_tokens',
        withWalletPrefix('Get registered tokens (builtin + custom) for a specific network.', walletContext?.walletName),
        {
          network: z.string().describe('Network identifier (e.g., "ethereum-sepolia", "polygon-amoy" or CAIP-2 "eip155:1").'),
        },
        async (args) => {
          const params = new URLSearchParams();
          params.set('network', args.network);
          const result = await apiClient.get('/v1/tokens?' + params.toString());
          return toToolResult(result);
        },
      );
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It adds behavioral context by specifying 'registered' (implying a registry/cached list) and token types ('builtin + custom'). However, it omits safety characteristics (read-only idempotent), pagination behavior, or error conditions when invalid networks are provided.

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?

Single sentence with zero waste. Every token earns its place: 'registered' defines scope, 'builtin + custom' clarifies token origin types, and 'specific network' anchors the required parameter. Appropriately front-loaded.

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?

Adequate for a simple single-parameter read operation. The description explains what constitutes a 'token' in this context (registered, builtin+custom) without requiring output schema documentation. Minor gap: doesn't clarify read-only nature since no annotations declare 'readOnlyHint'.

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%, providing detailed examples for the 'network' parameter (e.g., 'ethereum-sepolia', CAIP-2 format). The description mentions 'for a specific network' which aligns with this parameter but adds no additional syntax, validation rules, or format constraints beyond the schema definition.

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 provides a clear verb ('Get'), resource ('registered tokens'), and scope ('builtin + custom'). It effectively distinguishes from mutation tools like 'send_token' and NFT-specific tools. However, it doesn't explicitly differentiate from sibling 'get_assets', which may overlap conceptually in blockchain contexts.

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 provided on when to use this versus 'get_assets' or other retrieval tools. No mention of prerequisites (e.g., whether the network must be supported/pre-configured) or when 'builtin' vs 'custom' filtering matters.

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/minhoyoo-iotrust/WAIaaS'

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