Skip to main content
Glama

get_nonce

Generate a cryptographic nonce to verify wallet owner signatures for secure authentication in blockchain transactions.

Instructions

Get a nonce for owner wallet signature verification.

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 handler function that calls the /v1/nonce API to retrieve the nonce.
    async (args) => {
      const params = new URLSearchParams();
      if (args.wallet_id) params.set('walletId', args.wallet_id);
      const qs = params.toString();
      const result = await apiClient.get('/v1/nonce' + (qs ? '?' + qs : ''));
      return toToolResult(result);
    },
  • Zod schema defining the input arguments for the get_nonce tool.
    {
      wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
    },
  • Registration function that defines the get_nonce tool in the MCP server.
    export function registerGetNonce(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'get_nonce',
        withWalletPrefix('Get a nonce for owner wallet signature verification.', 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 result = await apiClient.get('/v1/nonce' + (qs ? '?' + qs : ''));
          return toToolResult(result);
        },
      );
    }
Behavior2/5

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

Lacks annotations entirely, so description must carry full behavioral burden. Fails to disclose: whether the nonce is consumed/invalidated after retrieval, TTL/rate limits, formatting of the returned value, or whether this operation is idempotent. 'Signature verification' implies read-only intent but without confirmation of side effects.

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 with zero redundancy. Front-loaded with verb and purpose. However, extreme brevity sacrifices necessary behavioral context given zero annotation coverage.

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?

Adequate for a single-parameter tool with complete schema coverage, but lacking critical context for a cryptographic primitive: no output schema description, no explanation of nonce format (string/number/hex), and no indication of the subsequent verification step.

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 'wallet_id' fully documented in the schema description (including auto-resolution logic). Description adds no parameter context, meeting baseline expectation when structured schema is comprehensive.

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?

States a clear action (Get) and specific purpose (nonce for owner wallet signature verification). Uses crypto-specific terminology precisely. However, does not explicitly distinguish from similar authentication tools like 'sign_message' or 'erc8128_sign_request' 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?

Provides no guidance on when to invoke this tool versus other signing/verification siblings, nor does it explain the typical workflow (e.g., get nonce → sign → verify) or prerequisites for use.

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