Skip to main content
Glama

get_entity_history

Retrieve the version history of an entity within a scalable, high-performance knowledge graph memory system for temporal awareness and data tracking.

Instructions

Get the version history of an entity from your Memento MCP knowledge graph memory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityNameYesThe name of the entity to retrieve history for

Implementation Reference

  • MCP tool handler implementation for 'get_entity_history'. Validates arguments implicitly via args.entityName access, calls KnowledgeGraphManager.getEntityHistory, serializes result to JSON, handles errors.
    case 'get_entity_history': try { const history = await knowledgeGraphManager.getEntityHistory(args.entityName); return { content: [{ type: 'text', text: JSON.stringify(history, null, 2) }] }; } catch (error: Error | unknown) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error retrieving entity history: ${errorMessage}` }], }; }
  • Tool schema definition including name, description, and input schema requiring 'entityName' string.
    { name: 'get_entity_history', description: 'Get the version history of an entity from your Memento MCP knowledge graph memory', inputSchema: { type: 'object', properties: { entityName: { type: 'string', description: 'The name of the entity to retrieve history for', }, }, required: ['entityName'], }, },
  • Registration of the 'get_entity_history' tool in the temporalTools array returned by handleListToolsRequest.
    { name: 'get_entity_history', description: 'Get the version history of an entity from your Memento MCP knowledge graph memory', inputSchema: { type: 'object', properties: { entityName: { type: 'string', description: 'The name of the entity to retrieve history for', }, }, required: ['entityName'], }, },
  • Helper method in KnowledgeGraphManager that delegates getEntityHistory call to the underlying storage provider after checking support.
    async getEntityHistory(entityName: string): Promise<Entity[]> { if (!this.storageProvider || typeof this.storageProvider.getEntityHistory !== 'function') { throw new Error('Storage provider does not support entity history operations'); } return this.storageProvider.getEntityHistory(entityName); }

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/gannonh/memento-mcp'

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