Skip to main content
Glama
Cicatriiz

Consumer Rights Wiki MCP Server

get_page_content

Retrieve complete content from Consumer Rights Wiki pages to access detailed information about privacy violations, dark patterns, and deceptive pricing practices.

Instructions

Get the full content of a specific wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title of the wiki page
sectionNoOptional section number to retrieve

Implementation Reference

  • The core handler function that executes the get_page_content tool logic: fetches wiki page content via API, strips HTML, processes entities, and returns structured JSON response.
    private async getPageContent(args: any) {
      const { title, section } = args;
    
      const params: Record<string, string> = {
        action: 'parse',
        page: title,
        prop: 'text|sections|categories|links|externallinks',
        disablelimitreport: '1',
        disableeditsection: '1',
      };
    
      if (section !== undefined) {
        params.section = section.toString();
      }
    
      const data = await this.makeApiRequest(params);
    
      if (data.error) {
        throw new McpError(ErrorCode.InternalError, data.error.info);
      }
    
      const parse = data.parse;
      if (!parse) {
        throw new McpError(ErrorCode.InvalidRequest, `Page '${title}' not found`);
      }
    
      // Extract text content and remove HTML
      const htmlContent = parse.text['*'];
      const textContent = htmlContent
        .replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
        .replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, '')
        .replace(/<[^>]*>/g, '')
        .replace(/ /g, ' ')
        .replace(/&/g, '&')
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/"/g, '"')
        .replace(/'/g, "'")
        .replace(/\n\s*\n/g, '\n\n')
        .trim();
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              title: parse.title,
              pageid: parse.pageid,
              content: textContent,
              categories: parse.categories?.map((cat: any) => cat['*']) || [],
              sections: parse.sections || [],
              internalLinks: parse.links?.map((link: any) => link['*']) || [],
              externalLinks: parse.externallinks || [],
              url: `${WIKI_BASE_URL}/${title.replace(/ /g, '_')}`,
            }, null, 2),
          },
        ],
      };
    }
  • src/index.ts:82-99 (registration)
    Tool registration in the listTools handler, including name, description, and input schema definition.
    {
      name: 'get_page_content',
      description: 'Get the full content of a specific wiki page',
      inputSchema: {
        type: 'object',
        properties: {
          title: {
            type: 'string',
            description: 'The title of the wiki page',
          },
          section: {
            type: 'number',
            description: 'Optional section number to retrieve',
          },
        },
        required: ['title'],
      },
    },
  • Dispatch case in the central CallToolRequestSchema handler that routes calls to the getPageContent method.
    case 'get_page_content':
      return this.getPageContent(request.params.arguments);
  • Utility helper function used by getPageContent to perform API requests to the wiki endpoint.
    private async makeApiRequest(params: Record<string, string>): Promise<WikiResponse> {
      try {
        const response = await axios.get(API_ENDPOINT, {
          params: {
            format: 'json',
            ...params,
          },
        });
        return response.data;
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to make API request: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieving 'full content' but doesn't specify format (e.g., HTML, plain text), pagination, error handling, or authentication requirements. This leaves significant gaps for a read operation tool.

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 and appropriately sized for a simple retrieval tool, making it easy to parse quickly.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'full content' includes (e.g., text, images, metadata), return format, or error scenarios. Given the complexity of wiki content retrieval and lack of structured data, more context is needed.

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%, so the schema already documents both parameters (title and optional section). The description adds no additional parameter semantics beyond implying retrieval of content, which aligns with the schema but doesn't provide extra value like format details or examples.

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 the full content') and resource ('a specific wiki page'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like get_page_info or get_page_sections, which also retrieve page-related information but with different scopes.

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_info (which might return metadata) or get_page_sections (which might list sections). It simply states what the tool does without context about appropriate use cases or exclusions.

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