Skip to main content
Glama

cache_warmup

Pre-warm semantic cache with prompt/answer pairs to seed FAQ responses, product descriptions, or known-good LLM answers before user traffic arrives.

Instructions

Pre-warm the semantic cache with a list of prompt/value pairs. For each entry: computes an embedding, checks if a similar entry already exists (similarity ≥ 0.98), and writes new entries to Valkey + pgvector index. Use this to seed FAQ responses, product descriptions, or known-good LLM answers before the first real user traffic. Requires OPENAI_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesUUID of the cache instance
entriesYesList of prompt/value pairs to pre-warm into the cache
namespaceNoDefault namespace for all entries (default: cachly:sem)
ttlNoTime-to-live in seconds for warmed entries (omit for no expiry)
auto_namespaceNoAuto-detect the namespace per prompt using text heuristics. Overrides `namespace` when no per-entry namespace is set.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the similarity threshold (≥0.98), the dual storage mechanism (Valkey + pgvector), and the requirement for OPENAI_API_KEY. However, it doesn't mention potential side effects like overwriting existing entries or performance implications for large entry lists.

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 efficiently structured in three sentences: the core operation, the use case examples, and the prerequisite. Every sentence adds value without redundancy, making it easy to parse while being comprehensive.

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?

For a mutation tool with no annotations and no output schema, the description does well by explaining the operation, use cases, and prerequisites. However, it doesn't describe the return value or error conditions, which would be helpful given the complexity of the embedding computation and similarity checking process.

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%, so the schema already documents all 5 parameters thoroughly. The description doesn't add significant semantic information beyond what's in the schema descriptions, though it implies the entries parameter is central to the pre-warming operation. The baseline of 3 is appropriate when schema does the heavy lifting.

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 with specific verbs ('pre-warm', 'computes', 'checks', 'writes') and resources ('semantic cache', 'Valkey + pgvector index'). It distinguishes from siblings like cache_set or cache_mset by emphasizing the pre-warming function with similarity checking and embedding computation, not just simple storage.

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 explicitly states when to use this tool ('to seed FAQ responses, product descriptions, or known-good LLM answers before the first real user traffic') and provides a clear prerequisite ('Requires OPENAI_API_KEY'). It differentiates from cache_set/cache_mset by focusing on pre-warming with similarity checks rather than direct storage.

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/cachly-dev/cachly-mcp'

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