Skip to main content
Glama
nlqueries

NLQueries

Official

invalidate_cache

Clear the semantic cache for an agent to force fresh SQL generation after schema changes or data refreshes. The cache rebuilds automatically with new queries.

Instructions

Drop the entire semantic cache for an agent.

Use this after a schema change or data refresh to force fresh SQL
generation on the next query.  The cache is rebuilt automatically
as new queries arrive.

Args:
    agent_id: Agent whose cache should be cleared.

Returns:
    Confirmation string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden. It states the effect ('Drop the entire semantic cache') and that the cache is rebuilt automatically. It also mentions the return type (confirmation string). It does not cover permission requirements or irreversibility, but is sufficient given the tool's simplicity.

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 description is concise (5 short sentences including structured Args/Returns) and front-loads the main action. The Args/Returns section is slightly redundant but acceptable.

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?

Given the tool's simplicity (one parameter, no nested objects, no output schema), the description covers all necessary aspects: action, usage context, behavior, parameter meaning, and return type. It is complete for an agent to correctly invoke the tool.

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

Parameters5/5

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

Schema description coverage is 0% for agent_id, but the description adds 'Agent whose cache should be cleared.' This fully explains the parameter's purpose, compensating for the lack of schema description.

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?

The description clearly states the tool's purpose: 'Drop the entire semantic cache for an agent.' It uses a specific verb and resource, and distinguishes itself from sibling tools like get_cache_stats and get_query_history which are read-only.

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?

The description explicitly says when to use: 'Use this after a schema change or data refresh to force fresh SQL generation.' It implies when not to use (only when invalidation is needed), but does not mention alternatives. However, no alternative tool exists for invalidation.

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/nlqueries/nlqueries'

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