listRecentChanges
Track and display recent translation changes in Weblate projects, filter by user or timestamp, and manage updates efficiently.
Instructions
List recent changes across all projects in Weblate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of changes to return (default: 20) | |
| timestampAfter | No | Show changes after this timestamp (ISO format) | |
| timestampBefore | No | Show changes before this timestamp (ISO format) | |
| user | No | Filter by specific user |
Implementation Reference
- src/tools/changes.tool.ts:23-78 (handler)The handler function that executes the listRecentChanges tool logic: fetches changes from WeblateApiService, handles empty results and errors, formats output using helper methods.async listRecentChanges({ limit = 20, user, timestampAfter, timestampBefore, }: { limit?: number; user?: string; timestampAfter?: string; timestampBefore?: string; }) { try { const result = await this.weblateApiService.listRecentChanges( limit, user, timestampAfter, timestampBefore, ); if (result.results.length === 0) { return { content: [ { type: 'text', text: 'No recent changes found.', }, ], }; } const changesList = result.results .slice(0, limit) .map(change => this.formatChangeResult(change)) .join('\n\n---\n\n'); return { content: [ { type: 'text', text: `Found ${result.count} recent changes (showing ${Math.min(limit, result.results.length)}):\n\n${changesList}`, }, ], }; } catch (error) { this.logger.error('Failed to list recent changes', error); return { content: [ { type: 'text', text: `Error listing recent changes: ${error.message}`, }, ], isError: true, }; } }
- src/tools/changes.tool.ts:13-22 (schema)Tool decorator defining the name, description, and Zod input schema for parameters (limit, user, timestampAfter, timestampBefore).@Tool({ name: 'listRecentChanges', description: 'List recent changes across all projects in Weblate', parameters: z.object({ limit: z.number().optional().describe('Number of changes to return (default: 20)').default(20), user: z.string().optional().describe('Filter by specific user'), timestampAfter: z.string().optional().describe('Show changes after this timestamp (ISO format)'), timestampBefore: z.string().optional().describe('Show changes before this timestamp (ISO format)'), }), })
- src/app.module.ts:74-80 (registration)AppModule providers array includes WeblateChangesTool, registering all its tools (including listRecentChanges) with the MCP server via McpModule.WeblateProjectsTool, WeblateComponentsTool, WeblateLanguagesTool, WeblateTranslationsTool, WeblateChangesTool, WeblateStatisticsTool, ],