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
| Name | Required | Description | Default |
|---|---|---|---|
| confirmReset | Yes | Must be exactly 'yes-i-am-sure' to confirm resetting agent state (removes proofs/delegations). |
Implementation Reference
- src/tool_handlers.ts:923-941 (handler)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(), }), }, ], }; };
- src/schemas.ts:398-408 (schema)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." );
- src/tool_handlers.ts:979-979 (registration)Maps the 'w3_reset' tool name to its handler function in the toolHandlers export used by the MCP server.w3_reset: handleW3Reset,