Skip to main content
Glama

Remove document from local cache

remove_document_from_local_cache
Destructive

Removes a document from the local cache and releases its memory once a client is finished with it, freeing cached resources and eliminating the stored key.

Instructions

Remove a document from the local cache and release its memory.

Call this tool when a client is finished with a document and wants to release the memory it occupies. After a successful call the key is no longer present in the cache.

Input Schema

NameRequiredDescriptionDefault
document_keyYesThe unique identifier of the document to remove from the local cache.

Output Schema

NameRequiredDescriptionDefault
droppedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.2.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's added post-condition ('after a successful call the key is no longer present in the cache') is genuinely useful state-transition context. It stops short of covering the no-op/error case when the key is absent or whether the operation is idempotent.

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?

Two short sentences, front-loaded with the action and effect, with zero filler. Every sentence contributes action, trigger, and post-condition.

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?

An output schema exists, so return values need no explanation, and the description covers the trigger, effect, and post-state. Only the absent-key/error behavior is left unaddressed, which is a minor gap for a one-parameter cache removal.

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 parameter is documented as 'the unique identifier of the document to remove from the local cache'. The description adds no format, origin, or constraint detail beyond that, so baseline 3 applies.

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?

States a specific verb and resource: removing a document from the local cache and releasing its memory. It is clearly distinguishable from document-editing siblings like delete_document_items_at_anchors, and its cache-management kin (check_document_in_local_cache, list_cached_documents) are implicitly different in effect, though not named.

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

Usage Guidelines4/5

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

Gives a clear trigger condition: call when a client is finished with a document and wants to release memory. It does not name an alternative (e.g., check_document_in_local_cache to confirm presence first) or state when not to call, so it falls short of full routing guidance.

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