Skip to main content
Glama
cachly-dev

Cachly — AI Cognitive Brain

cache_set

Store a key-value pair in a running cache instance, overwriting any existing value. Accepts strings or JSON objects, with an optional TTL in seconds. Returns "OK" on success or an error if the instance is invalid or paused.

Instructions

Set a key-value pair in a running cache instance. Overwrites any existing value at the key — not idempotent for new data. Returns "OK" on success; returns an error if the instance_id is invalid or the instance is paused. Value can be a string or a JSON-serialized object. Optionally set a TTL in seconds (omit for no expiry). Use cache_mset instead for setting multiple keys in a single pipeline round-trip. Use cache_stream_set instead for caching LLM token streams (ordered string chunks).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesCache key
ttlNoTime-to-live in seconds (optional, omit for no expiry)
valueYesValue to store (string or JSON)
org_idNoOptional org ID — also writes the key to the shared org namespace org:{org_id}:sem:{key} with the same TTL
instance_idYesUUID of the cache instance (from list_instances)
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly states that the operation overwrites existing values, is not idempotent for new data, returns 'OK' on success, and errors on invalid/paused instances. It does not, however, mention any concurrency behavior or performance implications, which are minor.

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 three sentences long, front-loads the core purpose, and each sentence earns its place: first sentence defines the operation and non-idempotence, second explains return values and error cases, third clarifies value type and TTL. No redundancy.

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?

Given there is no output schema, the description compensates by specifying the return value ('OK' on success). The parameter set is well-documented via the schema. The only minor gap is no mention of max key/value sizes or character limits, but for a cache set operation this is adequate.

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

Parameters4/5

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

Schema coverage is 100% and explains all 5 parameters. The description adds value by explaining that 'value' can be a string or JSON-serialized object (not explicit in schema), and reinforces the TTL semantics (omit for no expiry). The schema does not mention JSON-serializable, so the description adds meaningful context beyond what's in the schema.

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 uses specific verbs ('Set', 'Overwrites') and clearly names the resource ('key-value pair in a running cache instance'). It distinguishes itself from siblings by explicitly naming cache_mset and cache_stream_set as alternatives.

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 provides explicit guidance on when to use this tool vs alternatives: it mentions cache_mset for setting multiple keys in one round-trip and cache_stream_set for caching LLM token streams. This directly helps the agent choose among sibling caching tools.

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