Skip to main content
Glama

MinecraftWiki_getSectionsInPage

Retrieve all section headings from a Minecraft Wiki page to navigate content and locate specific information efficiently.

Instructions

Retrieves an overview of all sections in the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the page to retrieve sections for.

Implementation Reference

  • The core handler function `getSectionsInPage` that queries the MediaWiki API for sections in the given page and returns formatted JSON with title and list of sections.
    async getSectionsInPage(title: string): Promise<string> {
      const response = await apiService.get<WikiResponse, Record<string, unknown>>("", {
        action: "parse",
        page: title,
        prop: "sections",
      });
    
      if (!response.parse?.sections?.length) {
        return JSON.stringify({
          title: formatMCPText(title),
          sections: [],
        });
      }
    
      return JSON.stringify({
        title: formatMCPText(title),
        sections: response.parse.sections.map((section) => ({
          index: parseInt(section.index),
          title: formatMCPText(section.line),
        })),
      });
    }
  • The Tool schema definition exported as GET_SECTIONS_IN_PAGE_MINECRAFTWIKI_TOOL, including name, description, and input schema matching the handler.
    export const GET_SECTIONS_IN_PAGE_MINECRAFTWIKI_TOOL: Tool = {
      name: "MinecraftWiki_getSectionsInPage",
      description: "Retrieves an overview of all sections in the page.",
      inputSchema: {
        type: "object",
        properties: {
          title: {
            type: "string",
            description: "Title of the page to retrieve sections for.",
          },
        },
        required: ["title"],
      },
    };
  • src/server.ts:130-136 (registration)
    Registration in the CallToolRequestHandler switch statement that validates arguments using the type guard and delegates to the wikiService handler.
    case GET_SECTIONS_IN_PAGE_MINECRAFTWIKI_TOOL.name: {
      if (!isGetSectionsInPageArgs(args)) {
        throw new Error("Invalid arguments for getSectionsInPage");
      }
      const results = await wikiService.getSectionsInPage(args.title);
      return { content: [{ type: "text", text: results }] };
    }
  • Type guard helper function used to validate the input arguments for the getSectionsInPage tool before calling the handler.
    export function isGetSectionsInPageArgs(args: unknown): args is { title: string } {
      return (
        typeof args === "object" &&
        args !== null &&
        "title" in args &&
        typeof (args as { title: string }).title === "string"
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states it 'retrieves an overview' but doesn't clarify what 'overview' entails (e.g., section titles, IDs, hierarchy), whether it's read-only, if there are rate limits, or authentication needs. This leaves key operational traits undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that likely returns structured section data. It doesn't explain the return format (e.g., list of sections with metadata), leaving the agent guessing about output behavior despite the simple input schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'title' well-documented in the schema. The description adds no additional parameter semantics beyond implying it's for a page, which the schema already covers. This meets the baseline for high schema coverage but doesn't enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieves an overview') and resource ('all sections in the page'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'MinecraftWiki_getPageSection' (which gets specific section content) or 'MinecraftWiki_getPageContent' (which gets full page content), missing the opportunity for perfect sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'MinecraftWiki_getPageSection' for detailed content or 'MinecraftWiki_getPageContent' for full text, leaving the agent to infer usage from tool names alone without explicit context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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