Skip to main content
Glama

w3_reset

Reset the agent state on the MCP IPFS Server by removing all proofs and delegations while retaining the agent DID. Requires explicit confirmation to proceed.

Instructions

DANGEROUS: Resets the agent state, removing all proofs and delegations but retaining the agent DID. Requires explicit confirmation argument.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmResetYesMust be exactly 'yes-i-am-sure' to confirm resetting agent state (removes proofs/delegations).

Implementation Reference

  • The handler function that executes the w3_reset tool logic by running the 'w3 reset' command after validating arguments.
    const handleW3Reset: ToolHandler = async (_args) => {
      const parsed = Schemas.W3ResetArgsSchema.safeParse(_args);
      if (!parsed.success)
        throw new Error(`Invalid arguments for w3_reset: ${parsed.error.message}`);
      // const { confirmReset: _confirmReset } = parsed.data; // Value checked by schema
      const { stdout } = await runW3Command(`reset`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message:
                "Agent state reset successfully (proofs/delegations removed).",
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Input schema for w3_reset tool using Zod, requiring a confirmation string to prevent accidental resets.
    export const W3ResetArgsSchema = z
      .object({
        confirmReset: z
          .literal("yes-i-am-sure")
          .describe(
            "Must be exactly 'yes-i-am-sure' to confirm resetting agent state (removes proofs/delegations)."
          ),
      })
      .describe(
        "DANGEROUS: Resets the agent state, removing all proofs and delegations but retaining the agent DID. Requires explicit confirmation argument."
      );
  • Maps the 'w3_reset' tool name to its handler function in the toolHandlers export used by the MCP server.
    w3_reset: handleW3Reset,

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/alexbakers/mcp-ipfs'

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