Skip to main content
Glama
lordbasilaiassistant-sudo

base-gasless-deploy-mcp

get_token_info

Retrieve ERC-20 token details including name, symbol, decimals, total supply, and owner balance from a Base contract address.

Instructions

Get info about a deployed ERC-20 token: name, symbol, decimals, total supply, and owner balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_addressYesToken contract address on Base

Implementation Reference

  • Handler for the get_token_info tool, which queries an ERC-20 token's metadata and supply using ethers.js.
    async ({ token_address }) => {
      try {
        const provider = getProvider();
        const token = new ethers.Contract(token_address, TOKEN_ABI, provider);
    
        const [name, symbol, decimals, totalSupply] = await Promise.all([
          token.name(),
          token.symbol(),
          token.decimals(),
          token.totalSupply(),
        ]);
    
        // Check if we have deploy record
        const record = deployments.find(
          (d) => d.tokenAddress.toLowerCase() === token_address.toLowerCase()
        );
    
        const result: Record<string, unknown> = {
          token_address,
          name,
          symbol,
          decimals: Number(decimals),
          total_supply: ethers.formatUnits(totalSupply, decimals),
          explorer: `https://basescan.org/token/${token_address}`,
        };
    
        if (record) {
          result.owner = record.owner;
          result.deployer = record.deployer;
          result.deployed_at = new Date(record.timestamp * 1000).toISOString();
          result.was_gasless = record.usedPaymaster;
    
          // Get owner balance
          const ownerBalance = await token.balanceOf(record.owner);
          result.owner_balance = ethers.formatUnits(ownerBalance, decimals);
  • src/index.ts:216-221 (registration)
    Registration of the get_token_info tool with its schema definition using zod.
    server.tool(
      "get_token_info",
      "Get info about a deployed ERC-20 token: name, symbol, decimals, total supply, and owner balance.",
      {
        token_address: z.string().describe("Token contract address on Base"),
      },
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool retrieves information (implied read-only), but doesn't mention critical aspects like authentication requirements, rate limits, network dependencies (Base), error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational 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, efficient sentence that front-loads the purpose and lists specific data points without unnecessary words. Every element ('Get info', token type, data fields) contributes directly to understanding the tool's function, making it appropriately sized and zero-waste.

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 no annotations and no output schema, the description is incomplete for a tool interacting with blockchain data. It lacks details on authentication, rate limits, error handling, and the structure of returned information (e.g., format of balances). While it specifies the data fields, operational context and output expectations are insufficiently covered.

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 the single parameter 'token_address' documented in the schema as 'Token contract address on Base'. The description doesn't add meaning beyond this, as it doesn't elaborate on address format, validation, or examples. With high schema coverage, the baseline score of 3 is appropriate, though no extra value is provided.

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

Purpose5/5

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

The description clearly states the specific action ('Get info about') and resource ('a deployed ERC-20 token'), listing the exact data returned (name, symbol, decimals, total supply, owner balance). It distinguishes from siblings like 'deploy_gasless_token' (creation) and 'transfer_tokens' (transaction) by focusing on read-only information retrieval.

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 description implies usage when token metadata is needed, but provides no explicit guidance on when to use this tool versus alternatives like 'list_deployed_tokens' (which likely returns multiple tokens without detailed info). No exclusions or prerequisites are mentioned, leaving usage context partially inferred rather than clearly defined.

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/lordbasilaiassistant-sudo/base-gasless-deploy-mcp'

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