Skip to main content
Glama
b-open-io

Bitcoin SV MCP Server

by b-open-io

ordinals_searchInscriptions

Search Bitcoin SV ordinals inscriptions by address, content, MIME type, or MAP fields. Filter and retrieve detailed NFT data to explore the ordinals ecosystem efficiently.

Instructions

Searches for Bitcoin SV ordinal inscriptions using flexible criteria. This powerful search tool supports filtering by address, inscription content, MIME type, MAP fields, and other parameters. Results include detailed information about each matched inscription. Ideal for discovering NFTs and exploring the ordinals ecosystem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • The main handler function that executes the tool logic: constructs API URL with search parameters, fetches data from GorillaPool ordinals API, and returns JSON response or error.
    async (
    	{ args }: { args: SearchInscriptionsArgs },
    	extra: RequestHandlerExtra,
    ) => {
    	try {
    		const { limit, offset, dir, num, origin, address, map, terms, mime } =
    			args;
    
    		// Build the URL with query parameters
    		const url = new URL(
    			"https://ordinals.gorillapool.io/api/inscriptions/search",
    		);
    		url.searchParams.append("limit", limit.toString());
    		url.searchParams.append("offset", offset.toString());
    		url.searchParams.append("dir", dir);
    
    		if (num) url.searchParams.append("num", num);
    		if (origin) url.searchParams.append("origin", origin);
    		if (address) url.searchParams.append("address", address);
    		if (map) url.searchParams.append("map", map);
    		if (terms) url.searchParams.append("terms", terms);
    		if (mime) url.searchParams.append("mime", mime);
    
    		// Fetch inscriptions data from GorillaPool API
    		const response = await fetch(url.toString());
    
    		if (!response.ok) {
    			throw new Error(
    				`API error: ${response.status} ${response.statusText}`,
    			);
    		}
    
    		const data = (await response.json()) as InscriptionSearchResponse;
    
    		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 defining input parameters for the ordinals_searchInscriptions tool, including limits, filters, and pagination.
    export const searchInscriptionsArgsSchema = z.object({
    	limit: z
    		.number()
    		.int()
    		.min(1)
    		.max(100)
    		.default(20)
    		.describe("Number of results (1-100, default 20)"),
    	offset: z.number().int().min(0).default(0).describe("Pagination offset"),
    	dir: z
    		.enum(["asc", "desc"])
    		.default("desc")
    		.describe("Sort direction (asc or desc)"),
    	num: z.string().optional().describe("Inscription number"),
    	origin: z.string().optional().describe("Origin outpoint"),
    	address: z.string().optional().describe("Bitcoin address"),
    	map: z.string().optional().describe("Map field"),
    	terms: z.string().optional().describe("Search terms"),
    	mime: z.string().optional().describe("MIME type filter"),
    });
  • Function that registers the ordinals_searchInscriptions tool with the MCP server, providing name, description, schema, and handler.
    export function registerSearchInscriptionsTool(server: McpServer): void {
    	server.tool(
    		"ordinals_searchInscriptions",
    		"Searches for Bitcoin SV ordinal inscriptions using flexible criteria. This powerful search tool supports filtering by address, inscription content, MIME type, MAP fields, and other parameters. Results include detailed information about each matched inscription. Ideal for discovering NFTs and exploring the ordinals ecosystem.",
    		{
    			args: searchInscriptionsArgsSchema,
    		},
    		async (
    			{ args }: { args: SearchInscriptionsArgs },
    			extra: RequestHandlerExtra,
    		) => {
    			try {
    				const { limit, offset, dir, num, origin, address, map, terms, mime } =
    					args;
    
    				// Build the URL with query parameters
    				const url = new URL(
    					"https://ordinals.gorillapool.io/api/inscriptions/search",
    				);
    				url.searchParams.append("limit", limit.toString());
    				url.searchParams.append("offset", offset.toString());
    				url.searchParams.append("dir", dir);
    
    				if (num) url.searchParams.append("num", num);
    				if (origin) url.searchParams.append("origin", origin);
    				if (address) url.searchParams.append("address", address);
    				if (map) url.searchParams.append("map", map);
    				if (terms) url.searchParams.append("terms", terms);
    				if (mime) url.searchParams.append("mime", mime);
    
    				// Fetch inscriptions data from GorillaPool API
    				const response = await fetch(url.toString());
    
    				if (!response.ok) {
    					throw new Error(
    						`API error: ${response.status} ${response.statusText}`,
    					);
    				}
    
    				const data = (await response.json()) as InscriptionSearchResponse;
    
    				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,
    				};
    			}
    		},
    	);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It mentions 'results include detailed information' but doesn't specify what that includes, format, or any limitations. No information about rate limits, authentication needs, error conditions, or pagination behavior beyond what's implied in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste - first states purpose, second enumerates capabilities, third provides usage context. Well-structured and appropriately sized for a search tool with multiple parameters. Could be slightly more front-loaded with explicit sibling differentiation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex search tool with 9 nested parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain return format, error handling, performance characteristics, or provide examples. The 'detailed information' claim is too vague for an agent to understand what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by listing supported filter criteria: 'address, inscription content, MIME type, MAP fields, and other parameters.' This provides meaningful context about what the args object contains, though it doesn't explain individual parameter purposes or relationships. The description adds value beyond the bare schema but doesn't fully document all 9 nested parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'searches for Bitcoin SV ordinal inscriptions using flexible criteria' with specific verb+resource. It distinguishes from siblings like ordinals_getInscription (specific retrieval) and ordinals_marketListings (market-focused), though not explicitly named. However, it doesn't fully differentiate from potential general search tools like bsv_explore.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('ideal for discovering NFTs and exploring the ordinals ecosystem') but doesn't explicitly state when to use this tool versus alternatives. It mentions 'powerful search tool' but provides no guidance on when to choose it over other search or retrieval tools in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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