Skip to main content
Glama
stampchain-io

Stampchain MCP Server

Official

get_token_info

Retrieve detailed SRC-20 token information by ticker symbol, including optional holder statistics and transfer data for analysis.

Instructions

Retrieve detailed information about a specific SRC-20 token by its ticker symbol

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickYesThe ticker symbol of the SRC-20 token
include_holdersNoWhether to include holder statistics
include_transfersNoWhether to include recent transfer data

Implementation Reference

  • The execute method implementing the core logic of the 'get_token_info' tool, which fetches and formats token information using the Stampchain API.
    public async execute(params: GetTokenInfoParams, context?: ToolContext): Promise<ToolResponse> {
      try {
        context?.logger?.info('Executing get_token_info tool', { params });
    
        // Validate parameters
        const validatedParams = this.validateParams(params);
    
        // Search for the specific token
        const tokenResponse = await this.apiClient.searchTokens({
          query: validatedParams.tick,
          page: 1,
          page_size: 1,
        });
    
        if (!tokenResponse || !tokenResponse || tokenResponse.length === 0) {
          throw new ToolExecutionError(
            `Token with ticker ${validatedParams.tick} not found`,
            this.name,
            { tick: validatedParams.tick }
          );
        }
    
        const token = tokenResponse[0];
    
        // Verify exact match (case-insensitive)
        if (token.tick.toLowerCase() !== validatedParams.tick.toLowerCase()) {
          throw new ToolExecutionError(
            `Token with ticker ${validatedParams.tick} not found (found ${token.tick} instead)`,
            this.name,
            { requestedTick: validatedParams.tick, foundTick: token.tick }
          );
        }
    
        const contents = [];
    
        // Add formatted token info
        contents.push({ type: 'text' as const, text: formatToken(token) });
    
        // Add deployment information
        const stats = [
          '\nDeployment Information:',
          '---',
          `Block Index: ${token.block_index}`,
          `Block Time: ${new Date(token.block_time).toLocaleString()}`,
          `Transaction Hash: ${token.tx_hash}`,
        ];
    
        if (token.creator_name) {
          stats.push(`Creator: ${token.creator_name} (${token.creator})`);
        } else {
          stats.push(`Creator: ${token.creator}`);
        }
    
        contents.push({ type: 'text' as const, text: stats.join('\n') });
    
        // Note about additional data
        if (validatedParams.include_holders || validatedParams.include_transfers) {
          contents.push({
            type: 'text' as const,
            text: '\nNote: Detailed holder and transfer data requires additional API endpoints that may not be available in the current implementation.',
          });
        }
    
        // Add JSON representation
        contents.push(tokenToJSON(token));
    
        return multiResponse(...contents);
      } catch (error) {
        context?.logger?.error('Error executing get_token_info tool', { error });
    
        if (error instanceof ValidationError) {
          throw error;
        }
    
        if (error instanceof ToolExecutionError) {
          throw error;
        }
    
        throw new ToolExecutionError('Failed to retrieve token information', this.name, error);
      }
    }
  • Zod schema defining the input parameters for the 'get_token_info' tool, including ticker and optional flags for additional data.
    export const GetTokenInfoParamsSchema = z.object({
      tick: TokenTickerSchema.describe('The ticker symbol of the SRC-20 token'),
      include_holders: z
        .boolean()
        .optional()
        .default(false)
        .describe('Whether to include holder statistics'),
      include_transfers: z
        .boolean()
        .optional()
        .default(false)
        .describe('Whether to include recent transfer data'),
    });
  • Registration of the GetTokenInfoTool constructor under the 'get_token_info' key in the tokenTools export.
    export const tokenTools = {
      get_token_info: GetTokenInfoTool,
      search_tokens: SearchTokensTool,
    };
  • The get_token_info tool is listed in the central getAvailableToolNames function that returns all available tool names.
    export function getAvailableToolNames(): string[] {
      return [
        // Stamp tools
        'get_stamp',
        'search_stamps',
        'get_recent_stamps',
        'get_recent_sales',
        'get_market_data',
        'get_stamp_market_data',
    
        // Collection tools
        'get_collection',
        'search_collections',
    
        // Token tools
        'get_token_info',
        'search_tokens',
    
        // Analysis tools
        'analyze_stamp_code',
        'get_stamp_dependencies',
        'analyze_stamp_patterns',
      ];
    }
  • Assignment of the GetTokenInfoParamsSchema to the tool's schema property.
    public readonly schema = GetTokenInfoParamsSchema;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't disclose any behavioral traits like rate limits, authentication needs, error handling, or what 'detailed information' includes beyond the parameters. This leaves significant gaps for an agent to understand how to interact with it effectively.

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 core purpose without any wasted words. It's appropriately sized for a simple retrieval tool, making it easy for an agent to parse quickly.

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 retrieving token information with optional parameters (include_holders, include_transfers) and no output schema, the description is incomplete. It doesn't explain what 'detailed information' entails, how the optional parameters affect the output, or any response format, leaving the agent with insufficient context for proper usage.

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%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond implying the ticker symbol is the primary identifier, which is covered in the schema. This meets the baseline score of 3 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 clearly states the verb ('retrieve') and resource ('detailed information about a specific SRC-20 token'), specifying it's by ticker symbol. However, it doesn't explicitly differentiate from sibling tools like 'search_tokens' or 'get_collection', which might retrieve token information differently.

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 like 'search_tokens' or 'get_collection'. It lacks context about prerequisites, such as needing a valid ticker symbol, and doesn't mention any exclusions or specific use cases.

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/stampchain-io/stampchain-mcp'

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