Skip to main content
Glama

get_nonce

Retrieve a nonce to verify owner wallet signatures. Provide wallet ID for multi-wallet sessions.

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 executes the get_nonce tool logic. It takes an optional wallet_id parameter, makes a GET request to /v1/nonce on the API client, and returns the result via toToolResult.
    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);
    },
  • Schema definition: wallet_id is an optional string parameter that specifies the target wallet ID. Required for multi-wallet sessions.
    {
      wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
    },
  • The registerGetNonce function registers the 'get_nonce' tool with the MCP server using server.tool(). Imported and called from server.ts (line 22 import, line 99 invocation).
    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);
        },
      );
    }
  • Import of registerGetNonce from the get-nonce tool module.
    import { registerGetNonce } from './tools/get-nonce.js';
  • Invocation of registerGetNonce during server creation, passing the server instance, API client, and wallet context.
    registerGetNonce(server, apiClient, walletContext);
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states the purpose but does not mention side effects, authentication requirements, rate limits, or response nature. The read-only nature is implied but not explicit.

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?

The description is a single sentence with no unnecessary words. It efficiently conveys the core purpose, though it could benefit from slightly more context without losing conciseness.

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 tool's simplicity (1 parameter, no output schema, no annotations), the description provides minimal context. It fails to explain what a nonce is, how it is used, or what the return value looks like, which may leave an agent underinformed.

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?

The schema already provides a clear description of the wallet_id parameter (when required, auto-resolution). The tool description adds no further parameter information beyond the schema, which has 100% coverage. Baseline 3 is appropriate.

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?

The description clearly states the verb 'get', the resource 'nonce', and the purpose 'for owner wallet signature verification'. It is specific and distinguishes from other sibling tools, none of which focus on nonce 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?

The description does not provide any guidance on when to use this tool versus alternatives, such as signing tools. It lacks context about prerequisites, typical workflows, or when not to use it.

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