Skip to main content
Glama

lookup_minestom_api

Find Minestom API details including package names, related APIs, and Javadoc links to understand how to implement features in your Minecraft server.

Instructions

Use this when you need curated Minestom API matches with package names, why they matter, related APIs, and javadoc links.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesClass, interface, or API symbol to look up, such as EventNode or SchedulerManager.
topicNoOptional topic filter to keep the lookup scoped to one Minestom subsystem.

Implementation Reference

  • The handler function for the lookup_minestom_api tool, which performs a search against the apiCatalog based on the provided symbol and topic.
    }).server(async (args) => {
    	const { symbol, topic } = lookupMinestomApiInputSchema.parse(args);
    	const candidates = apiCatalog.filter(
    		(entry) => !topic || entry.topic === topic,
    	);
    
    	const rankedMatches = candidates
    		.map((entry) => ({
    			entry,
    			score: scoreTextQuery(symbol, [
    				entry.symbol,
    				entry.displayName,
    				entry.packageName,
    				entry.summary,
    				entry.whyItMatters,
    				...entry.relatedSymbols,
    				...entry.keywords,
    			]),
    		}))
    		.filter(({ score }) => score > 0)
    		.sort((left, right) => right.score - left.score)
    		.slice(0, 5)
    		.map(({ entry }) => entry);
    
    	const fallbackMatches =
    		rankedMatches.length > 0
    			? rankedMatches
    			: candidates.slice(0, Math.min(3, candidates.length));
    
    	const warning =
    		rankedMatches.length > 0
    			? undefined
    			: topic
    				? `No strong curated API match for "${symbol}" under ${topic}; returning the main APIs for that topic instead.`
    				: `No strong curated API match for "${symbol}" was found; returning the first curated Minestom APIs instead.`;
    
    	return lookupMinestomApiOutputSchema.parse({
    		bestMatches: fallbackMatches,
    		query: symbol,
    		topicFilter: topic,
    		warning,
    	});
    });
  • The input and output schemas for the lookup_minestom_api tool using Zod.
    const lookupMinestomApiInputSchema = z.object({
    	symbol: z
    		.string()
    		.describe(
    			"Class, interface, or API symbol to look up, such as EventNode or SchedulerManager.",
    		),
    	topic: minestomTopicSchema
    		.optional()
    		.describe(
    			"Optional topic filter to keep the lookup scoped to one Minestom subsystem.",
    		),
    });
    
    const lookupMinestomApiOutputSchema = z.object({
    	bestMatches: z.array(apiReferenceSchema),
    	query: z.string(),
    	topicFilter: minestomTopicSchema.optional(),
    	warning: z.string().optional(),
    });
  • The registration of the lookup_minestom_api tool as a TanStackServerTool.
    export const lookupMinestomApiTool: TanStackServerTool = toolDefinition({
    	description:
    		"Use this when you need curated Minestom API matches with package names, why they matter, related APIs, and javadoc links.",
    	inputSchema: lookupMinestomApiInputSchema,
    	name: "lookup_minestom_api",
    	outputSchema: lookupMinestomApiOutputSchema,

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/Azoraqua/minestom-mcp-server'

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