Skip to main content
Glama

delete_observations

Remove specific observations from entities by matching exact text entries on the Memento MCP server, enabling precise data cleanup and management.

Instructions

Remove specific observations from entities by matching text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletionsYesList of {entityName, observations} deletion requests.

Implementation Reference

  • src/server.js:142-156 (registration)
    MCP Server tool registration for 'delete_observations', including Zod input schema validation and thin handler that delegates to KnowledgeGraphManager.deleteObservations
    // Tool: delete_observations this.tool( 'delete_observations', 'Remove specific observations from entities by matching text.', { deletions: z.array(z.object({ entityName: z.string().describe('Name of the entity.'), observations: z.array(z.string()).describe('Exact observation texts to delete.') })).describe('List of {entityName, observations} deletion requests.') }, async ({ deletions }) => { await this.#knowledgeGraphManager.deleteObservations(deletions); return { content: [{ type: 'text', text: 'Observations deleted' }] }; } );
  • KnowledgeGraphManager.deleteObservations: resolves entity names to IDs and delegates deletions to the GraphRepository
    async deleteObservations(list) { for (const { entityName, observations } of list) { const entityId = await this.#repository.getEntityId(entityName); if (!entityId) continue; await this.#repository.deleteObservations(entityId, observations); } }
  • PostgresGraphRepository.deleteObservations: SQL DELETE query to remove matching observations by entity_id and content list
    async deleteObservations(entityId, observations) { if (!observations.length) { return; } await this.#query( `DELETE FROM observations WHERE entity_id = $1 AND content = ANY ($2)`, [ entityId, observations ] ); }
  • SqliteGraphRepository.deleteObservations: SQL DELETE query to remove matching observations by entity_id and content list
    async deleteObservations(entityId, observations) { if (!observations.length) { return; } const placeholders = observations.map(() => '?').join(','); await this.db.run( `DELETE FROM observations WHERE entity_id = ? AND content IN (${placeholders})`, [entityId, ...observations] ); }

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/iAchilles/memento'

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