Skip to main content
Glama
Cicatriiz

Consumer Rights Wiki MCP Server

get_page_info

Retrieve metadata about consumer rights wiki pages to access information on privacy violations, dark patterns, and deceptive pricing practices.

Instructions

Get metadata about a wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title of the wiki page

Implementation Reference

  • The primary handler function for the 'get_page_info' tool. It extracts the page title from arguments, queries the wiki API for page info, revisions, and categories, handles errors if page not found, and returns formatted JSON metadata including title, pageid, length, categories, last revision, etc.
    private async getPageInfo(args: any) { const { title } = args; const data = await this.makeApiRequest({ action: 'query', titles: title, prop: 'info|revisions|categories', inprop: 'protection|talkid|watched|watchers|visitingwatchers|notificationtimestamp|subjectid|url|readable|preload|displaytitle', rvprop: 'timestamp|user|comment|size', rvlimit: '1', }); if (data.error) { throw new McpError(ErrorCode.InternalError, data.error.info); } const pages = data.query?.pages; const pageId = Object.keys(pages)[0]; const pageInfo = pages[pageId]; if (pageInfo.missing) { throw new McpError(ErrorCode.InvalidRequest, `Page '${title}' not found`); } return { content: [ { type: 'text', text: JSON.stringify({ title: pageInfo.title, pageid: pageInfo.pageid, namespace: pageInfo.ns, length: pageInfo.length, touched: pageInfo.touched, lastrevid: pageInfo.lastrevid, counter: pageInfo.counter, fullurl: pageInfo.fullurl, editurl: pageInfo.editurl, canonicalurl: pageInfo.canonicalurl, readable: pageInfo.readable, categories: pageInfo.categories?.map((cat: any) => cat.title) || [], lastRevision: pageInfo.revisions?.[0] || null, protection: pageInfo.protection || [], }, null, 2), }, ], }; }
  • Input schema definition for the 'get_page_info' tool, specifying an object with a required 'title' string property.
    inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'The title of the wiki page', }, }, required: ['title'], },
  • src/index.ts:100-113 (registration)
    Registration of the 'get_page_info' tool in the ListToolsRequest handler's tools array, including name, description, and input schema.
    { name: 'get_page_info', description: 'Get metadata about a wiki page', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'The title of the wiki page', }, }, required: ['title'], }, },
  • src/index.ts:173-174 (registration)
    Registration/dispatch in the CallToolRequestHandler switch statement that routes calls to the getPageInfo method.
    case 'get_page_info': return this.getPageInfo(request.params.arguments);

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