Skip to main content
Glama

get_minecraft_version

Retrieve Minecraft version data from indexed modding documentation to access current version information or complete version lists for development reference.

Instructions

Get Minecraft version information from the indexed documentation. Returns either the latest version or all available versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of version info: 'latest' for newest version, 'all' for complete listlatest

Implementation Reference

  • The main handler function that executes the logic for the 'get_minecraft_version' tool. It retrieves Minecraft version information (latest or all) from the ExampleService based on the input parameter.
    export function handleGetMinecraftVersion(params: GetMinecraftVersionParams): CallToolResult { try { const exampleService = new ExampleService(); const { type = 'latest' } = params; if (type === 'all') { const topics = exampleService.getAvailableTopics(); exampleService.close(); if (topics.versions.length === 0) { return { content: [ { type: 'text', text: 'No Minecraft versions found in the indexed documentation. Please run the indexer first.', }, ], }; } let output = `## Available Minecraft Versions\n\n`; output += `Found ${topics.versions.length} version(s) in the documentation:\n\n`; for (const version of topics.versions) { output += `- ${version}\n`; } output += `\n**Latest:** ${topics.versions[0] || 'unknown'}\n`; return { content: [ { type: 'text', text: output, }, ], }; } // Default: return latest version const latestVersion = exampleService.getLatestMinecraftVersion(); exampleService.close(); return { content: [ { type: 'text', text: `The latest Minecraft version in the documentation is: **${latestVersion}**`, }, ], }; } catch (error) { console.error('[get_minecraft_version] Error:', error); return { content: [ { type: 'text', text: `Error retrieving Minecraft version: ${error instanceof Error ? error.message : 'Unknown error'}\n\nThe documentation database may not be initialized.`, }, ], }; } }
  • TypeScript interface defining the input parameters for the get_minecraft_version tool handler.
    export interface GetMinecraftVersionParams { type?: 'latest' | 'all'; }
  • src/index.ts:156-171 (registration)
    Tool registration in the BASE_TOOLS array, including name, description, and input schema for the ListToolsRequestHandler.
    { name: 'get_minecraft_version', description: 'Get Minecraft version information from the indexed documentation. Returns either the latest version or all available versions.', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['latest', 'all'], description: "Type of version info: 'latest' for newest version, 'all' for complete list", default: 'latest', }, }, }, },
  • Dispatcher case in the central CallToolRequestHandler switch statement that invokes the specific handler for get_minecraft_version.
    case 'get_minecraft_version': { return handleGetMinecraftVersion({ type: (args?.type as 'latest' | 'all') || 'latest', }); }

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/OGMatrix/mcmodding-mcp'

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