Skip to main content
Glama

get-token

Retrieve token details from blockchain networks using MetaMask MCP server. Provide token address and chain ID to fetch information.

Instructions

Fetch the token information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAddress to get token for.
chainIdNoID of chain to use when fetching data.

Implementation Reference

  • The execute handler for the "get-token" tool. Fetches token information using Wagmi's getToken function with the provided wagmiConfig and args, then returns the result as a standardized text content block using JSONStringify to handle serialization.
    execute: async (args) => {
      const result = await getToken(wagmiConfig, args);
      return {
        content: [
          {
            type: "text",
            text: JSONStringify(result),
          },
        ],
      };
    },
  • Input schema for the "get-token" tool using Zod. Requires an 'address' of type Address, optionally accepts 'chainId' as a number.
    parameters: z.object({
      address: Address.describe("Address to get token for."),
      chainId: z.coerce.number().optional().describe("ID of chain to use when fetching data."),
    }),
  • The registration function that defines and registers the "get-token" tool on the FastMCP server, including name, description, schema, and handler.
    export function registerGetTokenTools(server: FastMCP, wagmiConfig: Config): void {
      server.addTool({
        name: "get-token",
        description: "Fetch the token information.",
        parameters: z.object({
          address: Address.describe("Address to get token for."),
          chainId: z.coerce.number().optional().describe("ID of chain to use when fetching data."),
        }),
        execute: async (args) => {
          const result = await getToken(wagmiConfig, args);
          return {
            content: [
              {
                type: "text",
                text: JSONStringify(result),
              },
            ],
          };
        },
      });
    };
  • Call to register the "get-token" tool as part of the central registerTools function.
    registerGetTokenTools(server, wagmiConfig);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Fetch' suggests a read-only operation, but it doesn't specify if this requires authentication, has rate limits, returns paginated data, or what the output format looks like. The description is minimal and lacks critical behavioral details for a tool with parameters.

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 extremely concise with a single sentence, 'Fetch the token information.', which is front-loaded and wastes no words. Every part of the sentence contributes to the purpose, making it efficient and well-structured for its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of fetching token data in a blockchain context, the description is incomplete. With no annotations, no output schema, and siblings that handle similar functions, it fails to clarify what 'token information' entails—e.g., metadata, decimals, symbol—or how it differs from other tools. This leaves significant gaps for an AI agent to understand the tool's full context.

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%, with clear descriptions for 'address' and 'chainId' in the input schema. The description adds no additional meaning beyond the schema, such as explaining what 'token information' includes or how parameters affect the fetch. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Fetch the token information' states a clear verb ('fetch') and resource ('token information'), but it's vague about what specific token information is retrieved. It doesn't distinguish from sibling tools like 'get-token-balance' or 'get-native-currency-balance', which also fetch token-related data. The purpose is understandable but lacks specificity.

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 description provides no guidance on when to use this tool versus alternatives. With siblings like 'get-token-balance' and 'get-native-currency-balance', there's no indication of what makes 'get-token' unique—such as whether it fetches metadata, supply, or other token details. Usage is implied only by the name, with no explicit context or exclusions.

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/Xiawpohr/metamask-mcp'

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