get-chains
Retrieve the list of blockchain networks configured in MetaMask for secure wallet operations.
Instructions
Get the configured chains.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-chains.ts:12-22 (handler)The handler (execute function) for the 'get-chains' tool. It calls getChains from @wagmi/core using the provided wagmiConfig and returns the result as a text content block with JSONStringify serialization.execute: async () => { const result = getChains(wagmiConfig); return { content: [ { type: "text", text: JSONStringify(result), }, ], }; },
- src/tools/get-chains.ts:11-11 (schema)Zod schema defining the tool parameters as an empty object (no input parameters required).parameters: z.object({}),
- src/tools/get-chains.ts:8-23 (registration)Registration of the 'get-chains' tool on the FastMCP server within the registerGetChainsTools function, including name, description, schema, and inline handler.server.addTool({ name: "get-chains", description: "Get the configured chains.", parameters: z.object({}), execute: async () => { const result = getChains(wagmiConfig); return { content: [ { type: "text", text: JSONStringify(result), }, ], }; }, });
- src/tools/register-tools.ts:45-45 (registration)Call to register the 'get-chains' tool as part of the overall registerTools function that registers all tools.registerGetChainsTools(server, wagmiConfig);