Skip to main content
Glama
RWAValueRouter

ValueRouter MCP Server

get_supported_tokens

Retrieve supported token lists for blockchain networks to enable cross-chain USDC bridging across Ethereum, Solana, Sui, and Cosmos ecosystems.

Instructions

Get supported tokens for a specific chain or all chains

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdNoChain ID to get tokens for (optional)
includeTestnetsNoWhether to include testnet tokens

Implementation Reference

  • MCP tool handler for 'get_supported_tokens': parses input using schema and delegates to QuoteService for execution.
    private async getSupportedTokens(args: any): Promise<MCPToolResult> {
      try {
        const request = SupportedTokensRequestSchema.parse(args);
        const result = await this.quoteService.getSupportedTokens(request);
        return createSuccessResponse(result);
      } catch (error) {
        return createErrorResponse(
          error instanceof Error ? error.message : String(error),
          'INVALID_REQUEST'
        );
      }
    }
  • Core implementation in QuoteService: retrieves supported tokens for specified chain or all chains, filtering testnets if requested.
    async getSupportedTokens(request: SupportedTokensRequest): Promise<SupportedTokensResponse> {
      const { chainId, includeTestnets = false } = request;
      
      if (chainId) {
        const chainIdTyped = chainId as SupportedChainId;
        const chainInfo = CHAIN_INFO[chainIdTyped];
        
        if (!chainInfo) {
          throw new Error(`Unsupported chain: ${chainId}`);
        }
    
        if (!includeTestnets && chainInfo.isTestnet) {
          return { tokens: [], chains: [] };
        }
    
        const tokens = await this.getTokensForChain(chainIdTyped);
        return {
          tokens,
          chains: [chainInfo],
        };
      }
    
      // Get tokens for all chains
      const allTokens: Token[] = [];
      const allChains: typeof CHAIN_INFO[keyof typeof CHAIN_INFO][] = [];
      
      for (const [chainId, chainInfo] of Object.entries(CHAIN_INFO)) {
        if (!includeTestnets && chainInfo.isTestnet) {
          continue;
        }
    
        const tokens = await this.getTokensForChain(chainId as SupportedChainId);
        allTokens.push(...tokens);
        allChains.push(chainInfo);
      }
    
      return {
        tokens: allTokens,
        chains: allChains,
      };
    }
  • Zod schema defining input parameters for get_supported_tokens tool: optional chainId and includeTestnets flag.
    export const SupportedTokensRequestSchema = z.object({
      chainId: z.union([z.number(), z.string()]).optional(),
      includeTestnets: z.boolean().optional().default(false),
    });
    
    export type SupportedTokensRequest = z.infer<typeof SupportedTokensRequestSchema>;
  • src/index.ts:79-99 (registration)
    Tool registration in ListTools handler: defines name, description, and inputSchema matching the Zod schema.
      name: 'get_supported_tokens',
      description: 'Get supported tokens for a specific chain or all chains',
      inputSchema: {
        type: 'object',
        properties: {
          chainId: {
            oneOf: [
              { type: 'number' },
              { type: 'string' },
            ],
            description: 'Chain ID to get tokens for (optional)',
          },
          includeTestnets: {
            type: 'boolean',
            description: 'Whether to include testnet tokens',
            default: false,
          },
        },
        additionalProperties: false,
      },
    },
  • Helper method that populates tokens for a chain using constants (native token and USDC).
    private async getTokensForChain(chainId: SupportedChainId): Promise<Token[]> {
      const chainInfo = CHAIN_INFO[chainId];
      const tokens: Token[] = [];
    
      // Add native token
      if (NATIVE_TOKENS[chainId]) {
        tokens.push(NATIVE_TOKENS[chainId]);
      }
    
      // Add USDC if available
      if (chainInfo.usdcAddress) {
        tokens.push({
          address: chainInfo.usdcAddress,
          chainId,
          symbol: 'USDC',
          name: 'USD Coin',
          decimals: 6,
          isNative: false,
          logoURI: 'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png',
        });
      }
    
      // For production, you'd fetch from token lists or APIs
      // For now, we'll return the basic tokens
      return tokens;
    }
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. It states what the tool does but doesn't describe behavioral traits like whether it's a read-only operation, potential rate limits, authentication needs, or what the return format looks like (e.g., list of token objects with details). For a tool with no annotations, this is a significant gap in transparency.

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 with zero waste. It's front-loaded with the core purpose and includes essential scope details. Every word earns its place, making it highly concise and well-structured for quick understanding.

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 the tool's moderate complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage context, behavioral traits, and output format. Without annotations or output schema, the description should do more to compensate, but it meets the bare minimum for a simple read operation.

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 both parameters (chainId and includeTestnets) with descriptions. The description adds no additional meaning beyond what's in the schema—it doesn't explain parameter interactions, default behaviors, or examples. Baseline 3 is appropriate 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 'Get' and the resource 'supported tokens', specifying scope with 'for a specific chain or all chains'. It distinguishes from siblings like get_supported_chains (which gets chains, not tokens) and get_user_balance (which gets balances, not token lists). However, it doesn't explicitly differentiate from other token-related tools since none exist in the sibling list.

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. It doesn't mention prerequisites, use cases, or exclusions. For example, it doesn't clarify if this should be used before bridging operations (like execute_bridge) or how it relates to get_bridge_quote. The lack of context makes it unclear when this tool is appropriate.

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/RWAValueRouter/MCP'

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