disconnect
Disconnect your wallet from the MetaMask MCP server to end the session and secure your blockchain interactions.
Instructions
Disconnect the wallet.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "disconnect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/disconnect.ts:11-21 (handler)The execute handler for the 'disconnect' tool, which calls wagmi's disconnect function and returns a success text response.
execute: async () => { await disconnect(wagmiConfig); return { content: [ { type: "text", text: "Disconnect successfully", }, ], }; }, - src/tools/disconnect.ts:7-22 (registration)Direct registration of the 'disconnect' tool using FastMCP's addTool method, including name, description, empty schema, and handler.
server.addTool({ name: "disconnect", description: "Disconnect the wallet.", parameters: z.object({}), execute: async () => { await disconnect(wagmiConfig); return { content: [ { type: "text", text: "Disconnect successfully", }, ], }; }, }); - src/tools/register-tools.ts:37-37 (registration)Invocation of registerDisconnectTools as part of the batched tools registration.
registerDisconnectTools(server, wagmiConfig); - src/index.ts:15-15 (registration)Top-level call to register all tools, which indirectly registers the 'disconnect' tool.
registerTools(server, wagmiConfig);