Skip to main content
Glama

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
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 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)), }); }
  • 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, ],

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