ordinals_getInscription
Retrieve detailed inscription data, including content type, file info, origin, and status, by specifying the outpoint. Use this tool to verify NFT authenticity or explore metadata of digital artifacts on the Bitcoin SV blockchain.
Instructions
Retrieves detailed information about a specific ordinal inscription by its outpoint. Returns complete inscription data including content type, file information, inscription origin, and current status. Useful for verifying NFT authenticity or retrieving metadata about digital artifacts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes |
Implementation Reference
- tools/ordinals/getInscription.ts:47-102 (handler)The async handler function that validates the outpoint format, fetches detailed inscription data from the GorillaPool Ordinals API, handles errors, and returns the response as formatted JSON text content block.async ( { args }: { args: GetInscriptionArgs }, extra: RequestHandlerExtra, ) => { try { const { outpoint } = args; // Validate outpoint format if (!/^[0-9a-f]{64}_\d+$/i.test(outpoint)) { throw new Error("Invalid outpoint format. Expected 'txid_vout'"); } // Fetch inscription data from GorillaPool API const response = await fetch( `https://ordinals.gorillapool.io/api/inscriptions/${outpoint}`, ); if (response.status === 404) { return { content: [ { type: "text", text: JSON.stringify({ error: "Inscription not found" }), }, ], }; } if (!response.ok) { throw new Error( `API error: ${response.status} ${response.statusText}`, ); } const data = (await response.json()) as InscriptionResponse; return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: error instanceof Error ? error.message : String(error), }, ], isError: true, }; } },
- tools/ordinals/getInscription.ts:6-8 (schema)Zod schema for the tool's input arguments, defining 'outpoint' as a string in the format 'txid_vout'.export const getInscriptionArgsSchema = z.object({ outpoint: z.string().describe("Outpoint in format 'txid_vout'"), });
- tools/ordinals/getInscription.ts:41-103 (registration)Registers the 'ordinals_getInscription' tool on the MCP server, specifying name, description, input schema, and the handler function.server.tool( "ordinals_getInscription", "Retrieves detailed information about a specific ordinal inscription by its outpoint. Returns complete inscription data including content type, file information, inscription origin, and current status. Useful for verifying NFT authenticity or retrieving metadata about digital artifacts.", { args: getInscriptionArgsSchema, }, async ( { args }: { args: GetInscriptionArgs }, extra: RequestHandlerExtra, ) => { try { const { outpoint } = args; // Validate outpoint format if (!/^[0-9a-f]{64}_\d+$/i.test(outpoint)) { throw new Error("Invalid outpoint format. Expected 'txid_vout'"); } // Fetch inscription data from GorillaPool API const response = await fetch( `https://ordinals.gorillapool.io/api/inscriptions/${outpoint}`, ); if (response.status === 404) { return { content: [ { type: "text", text: JSON.stringify({ error: "Inscription not found" }), }, ], }; } if (!response.ok) { throw new Error( `API error: ${response.status} ${response.statusText}`, ); } const data = (await response.json()) as InscriptionResponse; return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: error instanceof Error ? error.message : String(error), }, ], isError: true, }; } }, );
- tools/ordinals/index.ts:14-14 (registration)Invokes registerGetInscriptionTool(server) as part of registering all ordinals tools.registerGetInscriptionTool(server);
- tools/index.ts:90-90 (registration)Invokes registerOrdinalsTools(server) as part of registering all tools.registerOrdinalsTools(server);