Skip to main content
Glama

kb_get_history

Retrieve recent knowledge base change history to track updates and maintain context across sessions.

Instructions

Get recent history of knowledge base changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of history entries to return

Implementation Reference

  • The main handler for the 'kb_get_history' tool. It extracts the optional 'limit' parameter (default 20), calls KnowledgeManager.getHistory(limit), and returns the history entries as a JSON-formatted text response.
    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) } ] }; }
  • Tool schema definition including name, description, and input schema with optional 'limit' parameter (default: 20). This is part of the tools array used for tool listing.
    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/index.ts:423-425 (registration)
    Registration of all tools (including kb_get_history) via the ListToolsRequestHandler, which returns the complete 'tools' array containing the kb_get_history definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Helper method in KnowledgeManager that retrieves the most recent 'limit' history entries from the internal knowledge base history array.
    getHistory(limit: number = 20): HistoryEntry[] { return this.kb.history.slice(-limit); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlsitechio/mcp-instruct'

If you have feedback or need assistance with the MCP directory API, please join our Discord server