Skip to main content
Glama

get-account

Retrieve the current blockchain account address from MetaMask wallet for secure AI-powered transactions and interactions.

Instructions

Get current account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute handler for the 'get-account' tool. Retrieves the current account information using wagmi's getAccount function with the configured wagmiConfig and returns a formatted text response containing address, addresses, chainId, and status.
    execute: async () => { const result = getAccount(wagmiConfig) return { content: [ { type: "text", text: JSONStringify({ address: result.address, addresses: result.addresses, chainId: result.chainId, status: result.status, }), }, ], } },
  • The registration function for the 'get-account' tool. Adds the tool to the FastMCP server, specifying name, description, empty input schema (z.object({})), and the execute handler.
    export function registerGetAccountTools(server: FastMCP): void { server.addTool({ name: "get-account", description: "Get current account", parameters: z.object({}), execute: async () => { const result = getAccount(wagmiConfig) return { content: [ { type: "text", text: JSONStringify({ address: result.address, addresses: result.addresses, chainId: result.chainId, status: result.status, }), }, ], } }, }); };
  • Top-level call to register the 'get-account' tool on the main FastMCP server instance.
    registerGetAccountTools(server);

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/Xiawpohr/mcpilot'

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