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
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | ||
| chainId | No |
Implementation Reference
- src/index.ts:110-114 (handler)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) }] }; }
- src/index.ts:105-108 (schema)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) }] }; } );
- src/index.ts:64-70 (helper)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 ); }