Skip to main content
Glama

MinecraftWiki_listCategoryMembers

Retrieve pages from specific Minecraft Wiki categories like Items, Blocks, or Entities to organize information and support research.

Instructions

List all pages that are members of a specific category on the Minecraft Wiki.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesThe name of the category to list members from (e.g., 'Items', 'Blocks', 'Entities', 'Structure Blueprints').
limitNoThe maximum number of pages to return (default: 100, max: 500).

Implementation Reference

  • The handler function `listCategoryMembers` in WikiService that performs the API call to list members of a Minecraft Wiki category and returns formatted JSON results.
    async listCategoryMembers(category: string, limit: number = 100): Promise<string> { const response = await apiService.get<WikiResponse, Record<string, unknown>>("", { action: "query", list: "categorymembers", cmtitle: `Category:${category}`, cmlimit: limit, }); const members = response.query?.categorymembers?.map((item) => item.title); if (!members?.length) { return JSON.stringify({ category: formatMCPText(category), members: [], }); } return JSON.stringify({ category: formatMCPText(category), members: members.map((member) => formatMCPText(member)), }); }
  • The Tool schema definition for MinecraftWiki_listCategoryMembers, including name, description, and input schema.
    export const LIST_CATEGORY_MEMBERS_MINECRAFTWIKI_TOOL: Tool = { name: "MinecraftWiki_listCategoryMembers", description: "List all pages that are members of a specific category on the Minecraft Wiki.", inputSchema: { type: "object", properties: { category: { type: "string", description: "The name of the category to list members from (e.g., 'Items', 'Blocks', 'Entities', 'Structure Blueprints').", }, limit: { type: "number", description: "The maximum number of pages to return (default: 100, max: 500).", }, }, required: ["category"], }, };
  • src/server.ts:90-96 (registration)
    Tool registration in the MCP server's CallToolRequestSchema handler switch statement, dispatching to the wikiService handler.
    case LIST_CATEGORY_MEMBERS_MINECRAFTWIKI_TOOL.name: { if (!isListCategoryMembersArgs(args)) { throw new Error("Invalid arguments for listCategoryMembers"); } const results = await wikiService.listCategoryMembers(args.category, args.limit); return { content: [{ type: "text", text: results }] }; }
  • src/server.ts:50-60 (registration)
    Tool listed in the ListToolsRequestSchema handler response, making it discoverable.
    tools: [ SEARCH_WIKI_MINECRAFTWIKI_TOOL, GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL, GET_SECTIONS_IN_PAGE_MINECRAFTWIKI_TOOL, GET_PAGE_SECTION_MINECRAFTWIKI_TOOL, GET_PAGE_CONTENT_MINECRAFTWIKI_TOOL, RESOLVE_REDIRECT_MINECRAFTWIKI_TOOL, LIST_CATEGORY_MEMBERS_MINECRAFTWIKI_TOOL, LIST_ALL_CATEGORIES_MINECRAFTWIKI_TOOL, GET_CATEGORIES_FOR_PAGE_MINECRAFTWIKI_TOOL, ],
  • Type guard function `isListCategoryMembersArgs` used to validate input arguments before calling the handler.
    export function isListCategoryMembersArgs( args: unknown ): args is { category: string; limit?: number } { return ( typeof args === "object" && args !== null && "category" in args && typeof (args as { category: string }).category === "string" && ("limit" in args ? typeof (args as { limit: number }).limit === "number" : true) ); }

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/L3-N0X/Minecraft-Wiki-MCP'

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