Skip to main content
Glama
marerem

longmem

delete_solution

Permanently delete saved entries that are incorrect or irrelevant, freeing memory space without option to undo.

Instructions

Permanently delete a saved entry.

Use this to remove entries that were saved incorrectly, contain wrong information that can't be fixed with correct_solution, or are no longer relevant. This cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe id of the entry to delete.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The delete_solution tool handler function. It receives an entry_id, calls the store's delete_solution, and returns a JSON response indicating success or failure.
    @mcp.tool()
    async def delete_solution(
        entry_id: Annotated[
            str,
            Field(description="The id of the entry to delete."),
        ],
    ) -> str:
        """
        Permanently delete a saved entry.
    
        Use this to remove entries that were saved incorrectly, contain wrong
        information that can't be fixed with correct_solution, or are no longer
        relevant. This cannot be undone.
        """
        try:
            store, *_ = await _get_deps()
            deleted = await store.delete_solution(entry_id)
    
            if not deleted:
                return json.dumps({"deleted": False, "error": f"Entry {entry_id!r} not found."}, indent=2)
    
            return json.dumps({
                "deleted": True,
                "id": entry_id,
                "message": "Entry permanently deleted.",
            }, indent=2)
        except Exception as exc:
            return _db_error(exc)
  • The entry_id parameter definition with Field annotation describing it as 'The id of the entry to delete.'
    async def delete_solution(
        entry_id: Annotated[
            str,
            Field(description="The id of the entry to delete."),
        ],
  • Tool registration via @mcp.tool() decorator on the delete_solution async function.
    @mcp.tool()
  • The store-level delete_solution method that actually performs the database deletion. Queries for the entry, deletes it if found, and also removes it from the FTS index if applicable.
    async def delete_solution(self, entry_id: str) -> bool:
        """Delete an entry by id. Returns True if it existed, False if not found."""
        sid = self._safe_id(entry_id)
        rows = await (
            self._table.query()
            .where(f"id = '{sid}'")
            .limit(1)
            .to_list()
        )
        if not rows:
            return False
        await self._table.delete(f"id = '{sid}'")
        if self._fts:
            await self._fts.remove(entry_id)
        return True
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose all behavioral traits. It states permanence and irreversibility but does not mention side effects, permissions, or return values (despite having an output schema). Adequate but not comprehensive.

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

Conciseness5/5

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

The description is two concise sentences. The first sentence front-loads the core purpose, and the second adds usage context without redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple signature (one required parameter) and the presence of an output schema, the description covers purpose, usage, and irreversibility. It lacks detail on error scenarios or permissions, but is fairly complete for a delete tool.

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?

The description does not add meaning beyond the input schema, which already has 100% coverage for the single parameter 'entry_id' with a clear description. Baseline score is appropriate.

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

Purpose4/5

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

The description clearly states 'Permanently delete a saved entry,' which is a specific verb and resource. It distinguishes from siblings like 'correct_solution' and 'save_solution' but could be more explicit about the domain (e.g., 'saved solution' instead of 'saved entry').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use scenarios (incorrect, unfixable, irrelevant) and names an alternative tool ('correct_solution'). This gives clear guidance for tool selection.

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

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/marerem/longmem'

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