Skip to main content
Glama

delete_temporal

Remove specific temporal data from the MemoryMesh knowledge graph by specifying its name. Ensures precise deletion of outdated or unnecessary entries.

Instructions

Delete an existing temporal from the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delete_temporalYesDelete parameters for temporal

Implementation Reference

  • Core handler function that performs the actual deletion of a 'temporal' node. Checks if the node exists in the graph, deletes it using ApplicationManager.deleteNodes, and returns formatted success/error response.
    export async function handleSchemaDelete(
        nodeName: string,
        nodeType: string,
        applicationManager: ApplicationManager
    ): Promise<ToolResponse> {
        try {
            const graph = await applicationManager.readGraph();
            const node = graph.nodes.find((n: Node) => n.name === nodeName && n.nodeType === nodeType);
    
            if (!node) {
                return formatToolError({
                    operation: 'deleteSchema',
                    error: `${nodeType} "${nodeName}" not found`,
                    context: {nodeName, nodeType},
                    suggestions: ["Verify node name and type"]
                });
            }
    
            await applicationManager.deleteNodes([nodeName]);
    
            return formatToolResponse({
                actionTaken: `Deleted ${nodeType}: ${nodeName}`
            });
        } catch (error) {
            return formatToolError({
                operation: 'deleteSchema',
                error: error instanceof Error ? error.message : 'Unknown error occurred',
                context: {nodeName, nodeType},
                suggestions: [
                    "Check node exists",
                    "Verify delete permissions"
                ],
                recoverySteps: [
                    "Ensure no dependent nodes exist",
                    "Try retrieving node first"
                ]
            });
        }
    }
  • Tool dispatch handler specific to delete_* tools. Extracts the node name from input arguments and calls the core handleSchemaDelete function.
    case 'delete': {
        const {name} = args[`delete_${schemaName}`];
        if (!name) {
            return formatToolError({
                operation: toolName,
                error: `Name is required to delete a ${schemaName}`,
                suggestions: ["Provide the 'name' parameter"]
            });
        }
        return handleSchemaDelete(name, schemaName, knowledgeGraphManager);
    }
  • Dynamically generates the input schema and tool definition for delete_temporal, requiring a 'name' parameter within a delete_temporal object.
    const deleteSchema: Tool = {
        name: `delete_${schemaName}`,
        description: `Delete
        an existing
        ${schemaName}
        from
        the
        knowledge
        graph`,
        inputSchema: {
            type: "object",
            properties: {
                [`delete_${schemaName}`]: {
                    type: "object",
                    description: `Delete parameters for ${schemaName}`,
                    properties: {
                        name: {
                            type: "string",
                            description: `The name of the ${schemaName} to delete`
                        }
                    },
                    required: ["name"]
                }
            },
            required: [`delete_${schemaName}`]
        }
    };
    
    tools.push(deleteSchema);
  • Registers all dynamically generated schema tools (including delete_temporal for temporal schema) by adding them to the internal toolsCache Map, making them available via getTools().
    for (const [schemaName, schema] of this.schemas.entries()) {
        const tools = await this.generateToolsForSchema(schemaName, schema);
        tools.forEach(tool => this.toolsCache.set(tool.name, tool));
    }
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. It states this is a deletion operation, implying it's destructive, but doesn't clarify permanence, side effects (e.g., impact on related graph elements), authentication needs, or error handling. For a destructive tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness3/5

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

The description is a single, fragmented sentence ('Delete an existing temporal from the knowledge graph') with awkward line breaks, suggesting poor formatting rather than intentional brevity. While it's short, the structure is messy and doesn't front-load key information effectively. It earns its place but could be cleaner.

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 this is a destructive tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as what happens post-deletion, whether the action is reversible, potential dependencies, or what the return value might be. For a mutation operation in a knowledge graph context, more behavioral detail is warranted.

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

Parameters4/5

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

The input schema has 100% description coverage, clearly documenting the single required parameter 'name' as 'The name of the temporal to delete'. The description adds no parameter details beyond what the schema provides, but with only one parameter and high schema coverage, the baseline is strong. No additional semantic value is needed here.

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

Purpose3/5

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

The description states the action ('Delete') and resource ('an existing temporal from the knowledge graph'), which is clear but basic. It doesn't distinguish this tool from other delete_* siblings beyond specifying 'temporal' as the target, which is already evident from the tool name. The purpose is understandable but lacks specificity about what a 'temporal' is or why one would delete it.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing temporal), exclusions, or comparisons with related tools like 'update_temporal' or 'add_temporal'. Without such context, the agent must infer usage from the tool name alone.

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

Related 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/CheMiguel23/MemoryMesh'

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