Skip to main content
Glama

delete_quest

Remove a specific quest from the knowledge graph by specifying its name using the delete_quest tool on the MemoryMesh MCP server.

Instructions

Delete an existing quest from the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delete_questYesDelete parameters for quest

Implementation Reference

  • Core handler function that implements the deletion logic for 'delete_quest'. It verifies the quest node exists by name and type='quest', then deletes it and associated edges using ApplicationManager.deleteNodes.
    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"
                ]
            });
        }
    }
  • Dynamically generates the schema (inputSchema, description, name='delete_quest') for the delete_quest tool when processing the 'quest' schema.
    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);
  • Generates the add/update/delete_quest tools for the 'quest' schema and returns them for registration in toolsCache.
    private async generateToolsForSchema(schemaName: string, schema: SchemaBuilder): Promise<Tool[]> {
        const tools: Tool[] = [];
        const baseSchema = schema.build();
    
        // Add tool
        tools.push(baseSchema as unknown as Tool);
    
        // Update tool
        const updateSchema = schema.createUpdateSchema();
        tools.push(updateSchema as unknown as Tool);
    
        // Delete tool
        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);
        return tools;
    }
  • Registers all dynamic tools, including 'delete_quest', into the central ToolsRegistry Map used for tool lookup and list_tools.
    // Initialize and register dynamic tools
    await dynamicToolManager.initialize();
    dynamicToolManager.getTools().forEach(tool => {
        this.tools.set(tool.name, tool);
    });
  • Handler dispatch for delete_quest: extracts node name from args.delete_quest.name and invokes the core handleSchemaDelete.
    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);
    }
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. It states this is a deletion operation, implying it's destructive and likely irreversible, but doesn't disclose behavioral traits like permissions needed, side effects (e.g., impact on related graph elements), error handling, or rate limits. 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.

Conciseness2/5

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

The description is poorly structured with unnecessary line breaks ('Delete\n an existing\n quest\n from\n the\n knowledge\n graph'), making it harder to parse. While it's brief, the formatting wastes space and reduces clarity. A single, clean sentence would be more effective.

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 the complexity of a destructive deletion tool with no annotations and no output schema, the description is incomplete. It lacks critical context like what happens upon deletion (e.g., success/failure responses, error cases), dependencies, or safety warnings. For a tool that permanently removes data, this is inadequate.

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?

Schema description coverage is 100%, with the parameter 'name' clearly documented in the schema as 'The name of the quest to delete'. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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 quest from the knowledge graph'), which provides a basic purpose. However, it's somewhat vague about what 'quest' means in this context and doesn't differentiate from sibling delete tools (e.g., delete_artifact, delete_npc) beyond specifying the resource type. It's not tautological but lacks specificity.

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 prerequisites (e.g., quest must exist), consequences (e.g., irreversible deletion), or when to choose other tools like update_quest. Without any usage context, the agent has minimal direction.

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