Skip to main content
Glama

web3_list_keys

Lists all API keys for a wallet using a SIWE signed message. Returns key IDs, prefixes, active status, and last usage timestamps.

Instructions

List all API keys for a wallet. Requires a fresh SIWE challenge signed with personal_sign. Returns key IDs, prefixes, active status, and last usage timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe SIWE message from web3_challenge
signatureYesHex-encoded signature from personal_sign (0x-prefixed, 65 bytes)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • The 'web3_list_keys' tool registration and handler. It calls api().web3.listKeys() if a client is configured, otherwise makes a direct POST to https://api.0xarchive.io/v1/web3/keys. Accepts 'message' and 'signature' params, returns API key list.
    server.registerTool(
      "web3_list_keys",
      {
        description:
          "List all API keys for a wallet. Requires a fresh SIWE challenge signed with personal_sign. " +
          "Returns key IDs, prefixes, active status, and last usage timestamps.",
        inputSchema: {
          message: z.string().describe("The SIWE message from web3_challenge"),
          signature: z.string().describe("Hex-encoded signature from personal_sign (0x-prefixed, 65 bytes)"),
        },
        outputSchema: ObjectOutputSchema,
        annotations: AUTH_TOOL_ANNOTATIONS,
      },
      async (params: any) => {
        try {
          if (client) {
            const data = await api().web3.listKeys(params.message, params.signature);
            return formatResponse(data);
          }
          const response = await fetch("https://api.0xarchive.io/v1/web3/keys", {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ message: params.message, signature: params.signature }),
          });
          const data = await response.json();
          if (!response.ok) {
            return {
              content: [{ type: "text" as const, text: `Error: ${data.error || "List keys failed"}` }],
              isError: true,
            };
          }
          return formatResponse(data);
        } catch (err) {
          const error = err instanceof OxArchiveError ? err : new OxArchiveError(String(err), 500);
          return formatError(error);
        }
      }
    );
  • src/index.ts:2065-2070 (registration)
    Annotations used for web3 auth tools (web3_list_keys, web3_challenge, web3_signup, etc.) declaring they are not read-only, not destructive, not idempotent, and open world.
    const AUTH_TOOL_ANNOTATIONS = {
      readOnlyHint: false,
      destructiveHint: false,
      idempotentHint: false,
      openWorldHint: true,
    } as const;
  • Input/output schema for web3_list_keys: requires 'message' (SIWE challenge message) and 'signature' (hex-encoded personal_sign signature), outputs an object via ObjectOutputSchema.
    "web3_list_keys",
    {
      description:
        "List all API keys for a wallet. Requires a fresh SIWE challenge signed with personal_sign. " +
        "Returns key IDs, prefixes, active status, and last usage timestamps.",
      inputSchema: {
        message: z.string().describe("The SIWE message from web3_challenge"),
        signature: z.string().describe("Hex-encoded signature from personal_sign (0x-prefixed, 65 bytes)"),
      },
      outputSchema: ObjectOutputSchema,
      annotations: AUTH_TOOL_ANNOTATIONS,
    },
Behavior3/5

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

The description adds the authentication requirement but does not address potential side effects indicated by openWorldHint=true. The readOnlyHint=false annotation contradicts the implied read-only nature of listing keys, but the description does not clarify this.

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 concise sentences: one for purpose, one for prerequisites and return info. Every sentence is necessary and front-loaded, with no wasted words.

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?

The description covers purpose, prerequisites, and return fields. An output schema exists (not shown), so return details are handled. Minor gap: no mention of error cases or expiration handling, but enough for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds value by explaining that 'message' comes from web3_challenge and 'signature' is from personal_sign, going beyond the schema's descriptions.

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 'List all API keys for a wallet,' using a specific verb and resource. It distinguishes itself from sibling tools like web3_revoke_key and get_* data tools by focusing on key listing with authentication requirements.

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?

The description specifies the prerequisite: 'Requires a fresh SIWE challenge signed with personal_sign.' This provides clear context for when to use the tool, though it does not explicitly contrast with alternatives like web3_revoke_key.

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/0xArchiveIO/0xarchive-mcp'

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