Skip to main content
Glama

cache_mset

Set multiple key-value pairs with individual TTL settings in a single Redis pipeline operation to reduce network round-trips and improve cache performance.

Instructions

Set multiple key-value pairs in a single pipeline round-trip. Supports per-key TTL – unlike native MSET. Uses one TCP round-trip for N keys via Redis pipeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesUUID of the cache instance
itemsYesKey-value pairs to set
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: the tool uses Redis pipeline for efficiency ('one TCP round-trip for N keys'), supports per-key TTL, and performs write operations. However, it doesn't mention error handling, performance characteristics, or what happens on partial failures, which are important for a mutation tool.

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 extremely concise and well-structured. Two sentences efficiently convey the core functionality, key differentiator (per-key TTL vs native MSET), and performance characteristic (Redis pipeline). Every word earns its place with zero wasted text.

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?

For a mutation tool with no annotations and no output schema, the description provides adequate but incomplete context. It covers the what and why efficiently but lacks details about return values, error conditions, or side effects. Given the complexity of a batch write operation, more behavioral transparency would be beneficial.

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 fully documents both parameters (instance_id and items array with key/value/ttl). The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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: 'Set multiple key-value pairs in a single pipeline round-trip.' It specifies the verb ('Set'), resource ('multiple key-value pairs'), and distinguishes from native MSET by mentioning per-key TTL support. This differentiates it from sibling cache_set (single set) and cache_mget (multiple get).

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 provides clear context for when to use this tool: when setting multiple keys efficiently via Redis pipeline. It explicitly contrasts with 'native MSET' by highlighting per-key TTL support. However, it doesn't explicitly state when NOT to use it or mention alternatives like cache_set for single sets, leaving some guidance implicit.

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