Skip to main content
Glama

zora_get_coin

Fetch metadata, market data, and creator information for any Zora Coins token on Base mainnet by providing its address and chain ID.

Instructions

Fetch metadata, market data & creator info for a coin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
chainIdNo

Implementation Reference

  • Handler function that executes the 'zora_get_coin' tool logic by calling CoinsSDK.getCoin with the provided address and chainId, then formats and returns the response.
    async ({ address, chainId }) => { // @ts-expect-error - TypeScript can't resolve barrel exports properly const resp = await CoinsSDK.getCoin({ address, chain: chainId ?? DEFAULT_CHAIN.id }); return { content: [{ type: "text", text: json(resp) }] }; }
  • Zod input schema defining parameters for the 'zora_get_coin' tool: required coin address and optional chainId.
    inputSchema: { address: z.string().min(1, "address is required"), chainId: z.number().optional(), },
  • src/index.ts:100-115 (registration)
    MCP server registration of the 'zora_get_coin' tool, including title, description, input schema, and inline handler function.
    server.registerTool( "zora_get_coin", { title: "Get coin details", description: "Fetch metadata, market data & creator info for a coin.", inputSchema: { address: z.string().min(1, "address is required"), chainId: z.number().optional(), }, }, async ({ address, chainId }) => { // @ts-expect-error - TypeScript can't resolve barrel exports properly const resp = await CoinsSDK.getCoin({ address, chain: chainId ?? DEFAULT_CHAIN.id }); return { content: [{ type: "text", text: json(resp) }] }; } );
  • Helper utility function used by the tool handler to format responses as JSON, properly handling bigint values.
    function json(data: unknown): string { return JSON.stringify( data, (_k, v) => (typeof v === "bigint" ? v.toString() : v), 2 ); }

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/r4topunk/zora-coins-mcp-server'

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