MinecraftWiki_listCategoryMembers
Easily retrieve all pages within a specific category on the Minecraft Wiki, such as 'Items', 'Blocks', or 'Entities', with customizable limits for efficient browsing.
Instructions
List all pages that are members of a specific category on the Minecraft Wiki.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | The name of the category to list members from (e.g., 'Items', 'Blocks', 'Entities', 'Structure Blueprints'). | |
| limit | No | The maximum number of pages to return (default: 100, max: 500). |
Implementation Reference
- src/services/wiki.service.ts:78-99 (handler)The handler function that executes the tool logic by querying the MediaWiki API for category members.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)), }); }
- src/types/tools.ts:41-59 (schema)Defines the tool's name, description, and input schema for validation.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)Registers the execution handler for the tool in the MCP server's CallToolRequestSchema.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:49-60 (registration)Registers the tool in the ListToolsRequestSchema for tool discovery.server.setRequestHandler(ListToolsRequestSchema, async () => ({ 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, ],