Skip to main content
Glama

get_wallet_info

Retrieve wallet details including chain, address, environment, and available networks for crypto operations.

Instructions

Get wallet info including chain, address, environment, and available networks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.

Implementation Reference

  • The asynchronous handler function that performs the API calls and combines the data to return the wallet information.
    async (args) => {
      const params = new URLSearchParams();
      if (args.wallet_id) params.set('walletId', args.wallet_id);
      const qs = params.toString();
      const addressResult = await apiClient.get<Record<string, unknown>>('/v1/wallet/address' + (qs ? '?' + qs : ''));
      if (!addressResult.ok) {
        return toToolResult(addressResult);
      }
    
      const walletId = addressResult.data['walletId'] as string;
      const networksResult = await apiClient.get<{ networks: unknown[] }>(
        '/v1/wallets/' + walletId + '/networks',
      );
    
      // Fetch wallet detail to get smart account fields (accountType, signerKey, deployed)
      const detailResult = await apiClient.get<Record<string, unknown>>(
        '/v1/wallets/' + walletId,
      );
    
      const combined = {
        ...addressResult.data,
        networks: networksResult.ok ? networksResult.data.networks : [],
        accountType: detailResult.ok ? (detailResult.data['accountType'] ?? 'eoa') : 'eoa',
        signerKey: detailResult.ok ? (detailResult.data['signerKey'] ?? null) : null,
        deployed: detailResult.ok ? (detailResult.data['deployed'] ?? true) : true,
      };
    
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(combined) }],
      };
    },
  • The registration function that defines the 'get_wallet_info' tool within the MCP server.
    export function registerGetWalletInfo(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'get_wallet_info',
        withWalletPrefix('Get wallet info including chain, address, environment, and available networks.', walletContext?.walletName),
        {
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          if (args.wallet_id) params.set('walletId', args.wallet_id);
          const qs = params.toString();
          const addressResult = await apiClient.get<Record<string, unknown>>('/v1/wallet/address' + (qs ? '?' + qs : ''));
          if (!addressResult.ok) {
            return toToolResult(addressResult);
          }
    
          const walletId = addressResult.data['walletId'] as string;
          const networksResult = await apiClient.get<{ networks: unknown[] }>(
            '/v1/wallets/' + walletId + '/networks',
          );
    
          // Fetch wallet detail to get smart account fields (accountType, signerKey, deployed)
          const detailResult = await apiClient.get<Record<string, unknown>>(
            '/v1/wallets/' + walletId,
          );
    
          const combined = {
            ...addressResult.data,
            networks: networksResult.ok ? networksResult.data.networks : [],
            accountType: detailResult.ok ? (detailResult.data['accountType'] ?? 'eoa') : 'eoa',
            signerKey: detailResult.ok ? (detailResult.data['signerKey'] ?? null) : null,
            deployed: detailResult.ok ? (detailResult.data['deployed'] ?? true) : true,
          };
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(combined) }],
          };
        },
      );
Behavior2/5

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

No annotations provided, yet description fails to disclose safety profile, side effects, or mutation status. While 'Get' implies read-only, explicit confirmation is absent despite presence of destructive siblings (send_token, approve_token).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence efficiently front-loaded with action verb. Lists return fields to compensate for missing output schema without redundancy. Only minor improvement would be adding usage context.

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?

Adequately compensates for missing output schema by detailing return structure. However, given 50+ sibling tools including similar retrieval functions, description should clarify selection criteria or relationship to connect_info/get_address.

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 wallet_id fully documented in schema (auto-resolution logic included). Description focuses entirely on return values rather than input parameters, meeting baseline for high schema coverage.

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?

Uses specific verb+resource ('Get wallet info') and enumerates returned fields (chain, address, environment, networks), distinguishing it from narrower siblings like get_balance or get_address. However, lacks explicit contrast with get_address to clarify when to use comprehensive metadata vs. single field retrieval.

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?

Provides no guidance on when to use this tool versus alternatives like get_address or connect_info, nor does it mention prerequisites such as wallet authorization or session state.

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