Skip to main content
Glama

Delete a folder's index

forget_folder
DestructiveIdempotent

Delete the cached search index for a folder after it is moved, renamed, or no longer needs indexing; the folder’s files remain untouched, and searching it again rebuilds the index.

Instructions

Delete the search index search_folder built for a folder, for example after the folder was moved or renamed, or to free disk space. Only the index in Kjarni's cache is deleted; the folder and its files are never touched, and the next search_folder there indexes it again. Returns whether there was an index to delete. A folder searched through the index of a folder containing it has no index of its own: forget that containing folder, as list_indexes shows it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "forget_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the folder whose index to delete, as list_indexes shows it; it may no longer exist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.5

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, so the description's job is to say what is actually destroyed, and it does: only the cached index, never the folder or its files, and the next search_folder re-indexes it. That materially de-risks a destructive tool. It does not say where the cache lives or whether deletion can fail on permission grounds, so it stops short of full disclosure.

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

Conciseness4/5

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

The safety-critical point (files are untouched) is front-loaded right after the purpose, and the return value is stated in one clause. The closing sentence about nested-index folders is worth keeping but is the most tangled phrasing in the definition.

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

Completeness5/5

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

For a one-parameter destructive tool with no output schema, everything needed is present: what it deletes, what it does not, whether it is repeatable, what it returns, and how to resolve the ambiguous nested-folder case.

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 coverage is 100% and the single path parameter is already documented there, including that it may no longer exist. The description only restates the 'as list_indexes shows it' framing, adding no new syntax or format detail, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource: delete the search index that search_folder built for a folder. That clearly separates it from search_folder (which builds the index) and list_indexes (which enumerates them), so an agent can pick it without opening the schema.

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?

Gives concrete triggering situations (folder moved or renamed, freeing disk space) and a genuine exclusion: a subfolder covered by a containing folder's index has no index of its own, so the containing folder should be forgotten instead. It also points at list_indexes to determine which case applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.