Skip to main content
Glama

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
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • 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, }; } },
  • 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'"), });
  • 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, }; } }, );
  • 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);

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/b-open-io/bsv-mcp'

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