add_changelog_entry
Track project changes by adding detailed entries to the changelog, including descriptions, modified files, change type, and impact level, ensuring comprehensive project history management.
Instructions
Add an entry to the project changelog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakingChange | No | Whether this is a breaking change | |
| description | Yes | Description of the change | |
| filesChanged | Yes | Files that were changed | |
| impact | No | ||
| type | Yes |
Implementation Reference
- src/index.ts:868-887 (handler)MCP server tool handler case that extracts input parameters from the tool call, enriches with session context, and delegates execution to ChangelogManager.addChangelogEntry.case 'add_changelog_entry': { const currentMemory = await this.memoryManager.getProjectMemory(); const description = args.description as string; const filesChanged = args.filesChanged as string[]; const type = args.type as 'added' | 'changed' | 'deprecated' | 'removed' | 'fixed' | 'security'; const breakingChange = (args.breakingChange as boolean) || false; const impact = (args.impact as 'major' | 'minor' | 'patch') || 'minor'; await this.changelogManager.addChangelogEntry({ sessionId: currentMemory.currentSession.sessionId, task: currentMemory.currentSession.task, type, description, filesChanged, breakingChange, approvals: {}, impact }); return { content: [{ type: 'text', text: 'Changelog entry added successfully' }] }; }
- src/changelog-manager.ts:50-68 (handler)Core implementation that adds the new entry to the JSON changelog (prepending to top), persists it, updates the Markdown CHANGELOG.md, and logs success.async addChangelogEntry(entry: Omit<ChangelogEntry, 'date'>): Promise<void> { try { const changelog = await this.getChangelog(); const newEntry: ChangelogEntry = { ...entry, date: new Date().toISOString() }; changelog.unshift(newEntry); // Add to beginning await fs.writeJson(this.changelogPath, changelog, { spaces: 2 }); await this.updateMarkdownChangelog(changelog); console.log(chalk.green(`📝 Changelog entry added: ${entry.description}`)); } catch (error) { console.error(chalk.red('Error adding changelog entry:'), error); } }
- src/index.ts:687-701 (registration)Tool registration in the MCP server's ListTools response, defining the tool name, description, and input schema validation.{ name: 'add_changelog_entry', description: 'Add an entry to the project changelog', inputSchema: { type: 'object', properties: { description: { type: 'string', description: 'Description of the change' }, filesChanged: { type: 'array', items: { type: 'string' }, description: 'Files that were changed' }, type: { type: 'string', enum: ['added', 'changed', 'deprecated', 'removed', 'fixed', 'security'] }, breakingChange: { type: 'boolean', description: 'Whether this is a breaking change' }, impact: { type: 'string', enum: ['major', 'minor', 'patch'] } }, required: ['description', 'filesChanged', 'type'] } },
- src/index.ts:690-699 (schema)Input schema defining the expected parameters, types, enums, and required fields for the add_changelog_entry tool.inputSchema: { type: 'object', properties: { description: { type: 'string', description: 'Description of the change' }, filesChanged: { type: 'array', items: { type: 'string' }, description: 'Files that were changed' }, type: { type: 'string', enum: ['added', 'changed', 'deprecated', 'removed', 'fixed', 'security'] }, breakingChange: { type: 'boolean', description: 'Whether this is a breaking change' }, impact: { type: 'string', enum: ['major', 'minor', 'patch'] } }, required: ['description', 'filesChanged', 'type']