Skip to main content
Glama
cachly-dev

Cachly — AI Cognitive Brain

cache_warmup

Pre-warm semantic cache with prompt/value pairs to seed FAQ responses and known-good LLM answers before user traffic.

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, the description carries the full burden. It discloses key behaviors: computes embeddings, checks similarity ≥ 0.98, writes to Valkey and pgvector index, and requires an API key. It does not mention what happens when a similar entry exists (likely skipped), nor return values or error conditions, but the core process is transparent.

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 four sentences, each providing distinct information: what it does, the algorithmic steps, typical use cases, and a prerequisite. There is no fluff or repetition; every sentence earns its place.

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

Completeness3/5

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

The description explains the tool's core functionality but omits several aspects: no output schema or return value description, no mention of idempotency or handling of duplicate entries, no prerequisites beyond API key, and no comparison with sibling cache tools. For a tool with no output schema and moderate complexity, these gaps reduce completeness.

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?

Input schema coverage is 100%, so each parameter already has a description. The tool description adds context by explaining how parameters like entries and namespace are used in the process (e.g., per-entry namespace override, auto-namespace). This adds some value beyond schema, but not significantly; baseline 3 is appropriate.

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 action ('Pre-warm the semantic cache') and specifies the resource ('list of prompt/value pairs'). It details the internal process (computes embedding, checks similarity, writes to Valkey + pgvector), which leaves no ambiguity about the tool's function. It also distinguishes itself from sibling cache tools by focusing on bulk pre-warming with similarity checks.

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?

Explicit use cases are given: 'seed FAQ responses, product descriptions, or known-good LLM answers before the first real user traffic.' The description also notes the requirement for OPENAI_API_KEY. However, it does not directly contrast with sibling tools like cache_set or cache_mset for single-item caching, which would help an agent decide between them.

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