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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get' implies a read-only operation, the description doesn't specify what 'recent' means (time window? last N entries?), what format the history entries have, whether there's pagination, authentication requirements, or rate limits. For a tool with zero annotation coverage, this leaves significant behavioral aspects undocumented that an agent would need to know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's front-loaded with the essential information ('Get recent history of knowledge base changes') and contains no redundant phrases. Every word earns its place in conveying the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there are no annotations and no output schema, the description is incomplete for effective tool use. While the purpose is clear, the description doesn't explain what the history entries contain, their format, or what 'changes' specifically refers to (edits, additions, deletions?). For a history retrieval tool with no structured output documentation, the description should provide more context about what information is returned and in what structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage (the 'limit' parameter is fully documented in the schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's in the schema - it mentions 'recent history' but doesn't clarify how this relates to the 'limit' parameter or if there are other implicit parameters. The description provides no additional parameter semantics, but doesn't need to since the schema documentation is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('recent history of knowledge base changes'), making the purpose immediately understandable. It distinguishes from siblings like kb_get_all (which retrieves all knowledge base content) or kb_search (which searches content) by focusing specifically on change history. However, it doesn't specify what constitutes 'recent' or the exact nature of 'changes' beyond the knowledge base context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate (e.g., for auditing changes, tracking updates) or when not to use it (e.g., for retrieving actual knowledge base content). With siblings like kb_get_all, kb_get_context, and kb_search that also retrieve knowledge base information, the lack of differentiation leaves the agent guessing about the appropriate context for this specific history-focused tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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