add_changelog_entry
Adds a new entry to the project changelog to document code changes, including type, description, and affected files for tracking modifications.
Instructions
Add an entry to the project changelog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Description of the change | |
| filesChanged | Yes | Files that were changed | |
| type | Yes | ||
| breakingChange | No | Whether this is a breaking change | |
| impact | No |
Implementation Reference
- src/index.ts:868-887 (handler)MCP tool handler that processes the tool call, enriches with current session context, and delegates to ChangelogManager.addChangelogEntrycase '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/index.ts:690-700 (schema)Input JSON schema for the add_changelog_entry tool defining parameters and validation rulesinputSchema: { 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:688-701 (registration)Tool registration in MCP server's tools list, including name, description, and schemaname: '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/changelog-manager.ts:50-68 (helper)Core helper method in ChangelogManager that persists the changelog entry to JSON file and regenerates Markdown changelogasync 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); } }