Skip to main content
Glama

delete_observations

Remove specific observations from entities in a knowledge graph to maintain accurate remote memory data for collaborative projects.

Instructions

엔티티에서 특정 관찰 내용을 삭제합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletionsYes

Implementation Reference

  • The primary handler function for the 'delete_observations' tool. It invokes the memory manager to delete the specified observations, optionally performs a sync with a descriptive commit message, and returns a structured success response.
    private async handleDeleteObservations(args: any) { this.memoryManager.deleteObservations(args.deletions); const totalDeleted = args.deletions.reduce((sum: number, del: any) => sum + del.observations.length, 0); const commitMessage = `feat: Delete ${totalDeleted} observations from ${args.deletions.length} entities`; await this.syncWithMessage(commitMessage); return { content: [{ type: 'text', text: JSON.stringify({ success: true, message: 'Deleted observations', deletions: args.deletions, }, null, 2), }], };
  • The input schema for the 'delete_observations' tool, defining the expected structure: an array of deletions, each specifying entityName and observations to delete.
    { name: 'delete_observations', description: '엔티티에서 특정 관찰 내용을 삭제합니다', inputSchema: { type: 'object', properties: { deletions: { type: 'array', items: { type: 'object', properties: { entityName: { type: 'string' }, observations: { type: 'array', items: { type: 'string' }, }, }, required: ['entityName', 'observations'], }, }, }, required: ['deletions'], }, },
  • src/index.ts:388-389 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to handleDeleteObservations.
    case 'delete_observations': return await this.handleDeleteObservations(args);
  • The underlying helper method in MemoryGraphManager that implements the observation deletion logic by filtering out specified observations from the target entities and updating timestamps.
    deleteObservations(deletions: { entityName: string; observations: string[] }[]): void { const now = new Date().toISOString(); deletions.forEach(({ entityName, observations }) => { const entity = this.graph.entities.get(entityName); if (entity) { entity.observations = entity.observations.filter( obs => !observations.includes(obs) ); entity.updatedAt = now; } }); this.updateMetadata(); }

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/YeomYuJun/remote-memory-mcp-server'

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