List every Minecraft version + namespace linkie carries
mc_list_versionsCheck which Minecraft versions exist for each mappings namespace (e.g., Yarn, Mojang). Filter by namespace, version prefix, and optionally include unstable releases like snapshots.
Instructions
Live call to https://linkieapi.shedaniel.me/api/namespaces. Returns every mappings namespace (yarn, mojang, mojang_raw, quilt-mappings, mcp, legacy-yarn, feather, ...) and which Minecraft versions each one currently has. Use to confirm a version exists before searching it. By default filters to stable releases — pass includeUnstable=true to see snapshots, pre-releases, RCs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | Filter to one namespace. Omit to list all. | |
| versionPrefix | No | Filter to versions starting with this string (e.g. '1.21' or '26.1'). | |
| includeUnstable | No | Include snapshots/pre/rc. Default false. | |
| limit | No | Max versions per namespace. Default 30. |
Implementation Reference
- src/index.ts:628-679 (handler)The mc_list_versions tool handler. It calls listNamespaces() from linkie.ts, applies optional filters (namespace, versionPrefix, includeUnstable, limit), and formats the output.
"mc_list_versions", { title: "List every Minecraft version + namespace linkie carries", description: "Live call to https://linkieapi.shedaniel.me/api/namespaces. Returns " + "every mappings namespace (yarn, mojang, mojang_raw, quilt-mappings, " + "mcp, legacy-yarn, feather, ...) and which Minecraft versions each one " + "currently has. Use to confirm a version exists before searching it. " + "By default filters to stable releases — pass includeUnstable=true to " + "see snapshots, pre-releases, RCs.", inputSchema: { namespace: LinkieNamespaceSchema.optional().describe( "Filter to one namespace. Omit to list all.", ), versionPrefix: z .string() .optional() .describe("Filter to versions starting with this string (e.g. '1.21' or '26.1')."), includeUnstable: z.boolean().optional().describe("Include snapshots/pre/rc. Default false."), limit: z.number().int().positive().max(500).optional().describe("Max versions per namespace. Default 30."), }, }, async ({ namespace, versionPrefix, includeUnstable, limit }) => { const cap = limit ?? 30; let namespaces; try { namespaces = await listNamespaces(); } catch (err) { return text(`Failed to reach linkie: ${(err as Error).message}`); } const filtered = namespace ? namespaces.filter((n) => n.id === namespace) : namespaces; const lines: string[] = []; for (const ns of filtered) { const versions = ns.versions .filter((v) => includeUnstable || v.stable) .filter((v) => !versionPrefix || v.version.startsWith(versionPrefix)) .slice(0, cap) .map((v) => (v.stable ? v.version : `${v.version} _(unstable)_`)); if (versions.length === 0) continue; lines.push(`## ${ns.id} (${versions.length}${versions.length === cap ? "+" : ""} versions)`); lines.push(versions.map((v) => `- ${v}`).join("\n")); lines.push(""); } if (lines.length === 0) { return text( `No matches. Try without filters, or check namespace name. ` + `Available namespaces: ${namespaces.map((n) => n.id).join(", ")}.`, ); } return text(lines.join("\n").trim()); }, ); - src/index.ts:627-649 (schema)Input schema definition for mc_list_versions: optional namespace, versionPrefix, includeUnstable, and limit fields.
server.registerTool( "mc_list_versions", { title: "List every Minecraft version + namespace linkie carries", description: "Live call to https://linkieapi.shedaniel.me/api/namespaces. Returns " + "every mappings namespace (yarn, mojang, mojang_raw, quilt-mappings, " + "mcp, legacy-yarn, feather, ...) and which Minecraft versions each one " + "currently has. Use to confirm a version exists before searching it. " + "By default filters to stable releases — pass includeUnstable=true to " + "see snapshots, pre-releases, RCs.", inputSchema: { namespace: LinkieNamespaceSchema.optional().describe( "Filter to one namespace. Omit to list all.", ), versionPrefix: z .string() .optional() .describe("Filter to versions starting with this string (e.g. '1.21' or '26.1')."), includeUnstable: z.boolean().optional().describe("Include snapshots/pre/rc. Default false."), limit: z.number().int().positive().max(500).optional().describe("Max versions per namespace. Default 30."), }, }, - src/index.ts:627-628 (registration)Tool registration via server.registerTool('mc_list_versions', ...) at line 627-628.
server.registerTool( "mc_list_versions", - src/linkie.ts:74-80 (helper)The listNamespaces() helper function that fetches namespace+version data from linkie's API, with caching.
export async function listNamespaces(): Promise<LinkieNamespace[]> { return cached("linkie", "namespaces", 60 * 60 * 1000, async () => { const res = await fetch(`${LINKIE_API_BASE}/api/namespaces`); if (!res.ok) throw new Error(`linkie /api/namespaces: HTTP ${res.status}`); return (await res.json()) as LinkieNamespace[]; }); } - src/linkie.ts:68-71 (schema)The LinkieNamespace interface used by mc_list_versions to represent namespace/version data.
export interface LinkieNamespace { id: string; versions: { version: string; stable: boolean }[]; }