Skip to main content
Glama
Cicatriiz

Consumer Rights Wiki MCP Server

get_recent_changes

Retrieve recent edits to the Consumer Rights Wiki, allowing users to monitor updates on main articles or specific namespaces with customizable limits.

Instructions

Get recent changes to the wiki

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent changes to return (default: 10, max: 50)
namespaceNoFilter by namespace (0 = main articles)

Implementation Reference

  • The main handler function implementing the logic to fetch recent changes from the Consumer Rights Wiki using the MediaWiki API.
    private async getRecentChanges(args: any) { const { limit = 10, namespace } = args; const params: Record<string, string> = { action: 'query', list: 'recentchanges', rcprop: 'title|timestamp|user|comment|sizes|flags', rclimit: Math.min(limit, 50).toString(), }; if (namespace !== undefined) { params.rcnamespace = namespace.toString(); } const data = await this.makeApiRequest(params); if (data.error) { throw new McpError(ErrorCode.InternalError, data.error.info); } const changes = data.query?.recentchanges || []; return { content: [ { type: 'text', text: JSON.stringify({ recentChanges: changes.map((change: any) => ({ title: change.title, timestamp: change.timestamp, user: change.user, comment: change.comment, oldSize: change.oldlen, newSize: change.newlen, sizeChange: change.newlen - change.oldlen, type: change.type, isNew: change.new === '', isMinor: change.minor === '', isBot: change.bot === '', url: `${WIKI_BASE_URL}/${change.title.replace(/ /g, '_')}`, })), }, null, 2), }, ], }; }
  • The input schema and metadata for the get_recent_changes tool, registered in the ListTools response.
    { name: 'get_recent_changes', description: 'Get recent changes to the wiki', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Number of recent changes to return (default: 10, max: 50)', default: 10, }, namespace: { type: 'number', description: 'Filter by namespace (0 = main articles)', }, }, }, },
  • src/index.ts:175-176 (registration)
    The switch case in the CallToolRequestHandler that dispatches to the getRecentChanges method.
    case 'get_recent_changes': return this.getRecentChanges(request.params.arguments);

Other Tools

Related 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