get_file_changelog
Retrieve changelog entries for a specific file to track modifications and maintain project awareness during coding sessions.
Instructions
Get changelog entries for a specific file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file |
Implementation Reference
- src/index.ts:703-712 (registration)Tool registration including name, description, and input schema for get_file_changelog
name: 'get_file_changelog', description: 'Get changelog entries for a specific file', inputSchema: { type: 'object', properties: { filePath: { type: 'string', description: 'Path to the file' } }, required: ['filePath'] } }, - src/index.ts:889-893 (handler)Tool handler that extracts filePath argument and delegates to ChangelogManager.getChangelogForFile, returning JSON stringified result
case 'get_file_changelog': { const filePath = args.filePath as string; const fileChangelog = await this.changelogManager.getChangelogForFile(filePath); return { content: [{ type: 'text', text: JSON.stringify(fileChangelog, null, 2) }] }; } - src/changelog-manager.ts:82-89 (helper)Core helper method that loads full changelog, computes relative file path, and filters entries where the file appears in filesChanged array
async getChangelogForFile(filePath: string): Promise<ChangelogEntry[]> { const changelog = await this.getChangelog(); const relativePath = path.relative(this.projectRoot, filePath); return changelog.filter(entry => entry.filesChanged.some(file => file === relativePath) ); }