Skip to main content
Glama
Cicatriiz

Consumer Rights Wiki MCP Server

get_page_sections

Extract section structure from Consumer Rights Wiki pages to navigate content on privacy violations, dark patterns, and deceptive pricing practices.

Instructions

Get the section structure of a wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title of the wiki page

Implementation Reference

  • The handler function that executes the tool logic: fetches page sections via MediaWiki API parse action, processes the sections data, and returns a structured JSON response.
    private async getPageSections(args: any) {
      const { title } = args;
    
      const data = await this.makeApiRequest({
        action: 'parse',
        page: title,
        prop: 'sections',
      });
    
      if (data.error) {
        throw new McpError(ErrorCode.InternalError, data.error.info);
      }
    
      const sections = data.parse?.sections || [];
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              title: data.parse?.title,
              sections: sections.map((section: any) => ({
                index: section.index,
                level: parseInt(section.level),
                line: section.line,
                number: section.number,
                anchor: section.anchor,
                byteoffset: section.byteoffset,
              })),
            }, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the tool, specifying the required 'title' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        title: {
          type: 'string',
          description: 'The title of the wiki page',
        },
      },
      required: ['title'],
    },
  • src/index.ts:179-180 (registration)
    Tool dispatcher in the CallToolRequestHandler switch statement, routing calls to the getPageSections method.
    case 'get_page_sections':
      return this.getPageSections(request.params.arguments);
  • src/index.ts:150-163 (registration)
    Tool metadata registration in the ListToolsRequestHandler response, including name, description, and schema.
    {
      name: 'get_page_sections',
      description: 'Get the section structure of a wiki page',
      inputSchema: {
        type: 'object',
        properties: {
          title: {
            type: 'string',
            description: 'The title of the wiki page',
          },
        },
        required: ['title'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' data, implying a read-only operation, but doesn't specify permissions, rate limits, error handling, or what the output looks like (e.g., format of section structure). This leaves significant gaps for a tool with no structured safety hints.

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 purpose, making it efficient and easy to parse, which is ideal for conciseness.

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, no output schema, and a simple parameter schema, the description is incomplete. It doesn't explain what 'section structure' entails (e.g., hierarchical data, metadata), potential errors, or usage context, which is inadequate for a tool that might return complex data without structured output documentation.

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?

The input schema has 100% description coverage, with the single parameter 'title' documented as 'The title of the wiki page'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage without compensating value.

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 ('Get') and resource ('section structure of a wiki page'), making the purpose understandable. However, it doesn't differentiate from siblings like 'get_page_content' or 'get_page_info' which might also retrieve page-related data, so it's not fully specific about what distinguishes this tool.

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 like 'get_page_content' or 'get_page_info'. It lacks explicit context, prerequisites, or exclusions, leaving the agent to infer usage based on the name alone.

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/Cicatriiz/consumer-rights-wiki-mcp'

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