Skip to main content
Glama

get_rpc_proxy_url

Retrieve an EVM RPC proxy URL for a specific wallet and blockchain chain ID to use with development tools like Forge, Hardhat, ethers.js, or viem.

Instructions

Get the EVM RPC proxy URL for a wallet and chain. Use this URL as --rpc-url for Forge, Hardhat, ethers.js, or viem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idYesWallet ID (UUID)
chain_idYesEVM chain ID (e.g. 1 for Ethereum mainnet, 137 for Polygon)

Implementation Reference

  • The handler function that executes the logic to fetch and construct the RPC proxy URL.
    async (args) => {
      const result = await apiClient.get('/v1/connect-info');
      if (!('ok' in result) || !result.ok) {
        return toToolResult(result);
      }
    
      const data = result.data as ConnectInfoData;
      if (!data.rpcProxy?.enabled || !data.rpcProxy?.baseUrl) {
        return {
          content: [{
            type: 'text' as const,
            text: JSON.stringify({
              error: 'RPC proxy is not enabled. Ask the operator to enable it in Admin Settings.',
            }),
          }],
          isError: true,
        };
      }
    
      const url = `${data.rpcProxy.baseUrl}/${args.wallet_id}/${args.chain_id}`;
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify({
            url,
            walletId: args.wallet_id,
            chainId: args.chain_id,
            usage: `Use this URL as --rpc-url: ${url}`,
          }),
        }],
      };
    },
  • The registration function for the 'get_rpc_proxy_url' tool.
    export function registerGetRpcProxyUrl(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'get_rpc_proxy_url',
        withWalletPrefix(
          'Get the EVM RPC proxy URL for a wallet and chain. Use this URL as --rpc-url for Forge, Hardhat, ethers.js, or viem.',
          walletContext?.walletName,
        ),
        {
          wallet_id: z.string().describe('Wallet ID (UUID)'),
          chain_id: z.number().describe('EVM chain ID (e.g. 1 for Ethereum mainnet, 137 for Polygon)'),
        },
        async (args) => {
          const result = await apiClient.get('/v1/connect-info');
          if (!('ok' in result) || !result.ok) {
            return toToolResult(result);
          }
    
          const data = result.data as ConnectInfoData;
          if (!data.rpcProxy?.enabled || !data.rpcProxy?.baseUrl) {
            return {
              content: [{
                type: 'text' as const,
                text: JSON.stringify({
                  error: 'RPC proxy is not enabled. Ask the operator to enable it in Admin Settings.',
                }),
              }],
              isError: true,
            };
          }
    
          const url = `${data.rpcProxy.baseUrl}/${args.wallet_id}/${args.chain_id}`;
          return {
            content: [{
              type: 'text' as const,
              text: JSON.stringify({
                url,
                walletId: args.wallet_id,
                chainId: args.chain_id,
                usage: `Use this URL as --rpc-url: ${url}`,
              }),
            }],
          };
        },
      );
    }
  • Input schema definition for the 'get_rpc_proxy_url' tool.
    {
      wallet_id: z.string().describe('Wallet ID (UUID)'),
      chain_id: z.number().describe('EVM chain ID (e.g. 1 for Ethereum mainnet, 137 for Polygon)'),
    },
Behavior3/5

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

No annotations provided, so description carries full burden. Adds context that this is a 'proxy' URL (not direct node) and specifies compatible dev tools. Missing operational details like authentication requirements, rate limits, URL expiration, or read-only safety status.

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?

Two efficient sentences with zero waste. Front-loaded with action ('Get'), followed by resource identification, then specific usage instructions. Excellent information density.

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?

Appropriately complete for a simple 2-parameter retrieval tool. Compensates for missing output schema by describing the return value's format and usage (compatible with major EVM tools). Could benefit from noting if URL contains embedded auth or expiration details.

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% with complete descriptions (wallet_id as UUID, chain_id with examples). Description mentions 'wallet and chain' aligning with parameters but adds no additional semantic detail beyond schema definitions. Baseline 3 appropriate given schema completeness.

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?

Clear specific verb (Get) + resource (EVM RPC proxy URL) + scope (for a wallet and chain). Distinguishes from sibling tools like get_balance, get_address, or send_token by focusing specifically on RPC endpoint retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit post-call usage guidance: 'Use this URL as --rpc-url for Forge, Hardhat, ethers.js, or viem.' This signals the intended consumers (EVM development frameworks). Lacks explicit 'when not to use' or alternative tool comparisons.

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