kb_get_history
Retrieve recent changes to your knowledge base to track updates and maintain awareness of modifications.
Instructions
Get recent history of knowledge base changes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of history entries to return |
Implementation Reference
- src/index.ts:818-829 (handler)Handler for the kb_get_history tool. Extracts the optional 'limit' parameter (default 20), retrieves history using KnowledgeManager.getHistory(), and returns it as formatted JSON text content.case 'kb_get_history': { const limit = (args as any).limit || 20; const history = km.getHistory(limit); return { content: [ { type: 'text', text: JSON.stringify(history, null, 2) } ] }; }
- src/index.ts:288-300 (schema)Tool schema and registration definition including name, description, and inputSchema for the kb_get_history tool, registered in the tools list for MCP ListToolsRequest.{ name: 'kb_get_history', description: 'Get recent history of knowledge base changes', inputSchema: { type: 'object', properties: { limit: { type: 'number', default: 20, description: 'Number of history entries to return' } } }
- src/KnowledgeManager.ts:355-357 (helper)Core helper method in KnowledgeManager that implements the history retrieval logic by slicing the last 'limit' entries from the internal kb.history array.getHistory(limit: number = 20): HistoryEntry[] { return this.kb.history.slice(-limit); }