Skip to main content
Glama

cf_kv_set

Writes a key/value pair into a Cloudflare Workers KV namespace, with optional TTL, metadata, and JSON validation before storing.

Instructions

Write one key/value pair into a Workers KV namespace. Optional ttl in seconds (max 604800) and JSON metadata; set is_json when the value is a JSON document that should be validated before write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
ttlNo
valueYes
is_jsonNo
namespaceYes
metadata_jsonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
errorNo
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/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 does disclose the ttl ceiling (604800 seconds) and that is_json triggers pre-write validation, which is genuine behavioral context. However, it omits overwrite semantics for an existing key, permission/namespace prerequisites, and any failure modes — meaningful gaps 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with no filler, front-loading the core action before the optional parameters. Every clause carries information; nothing is repeated from the schema titles.

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?

An output schema exists, so return values need not be described. For a mutation tool with no annotations and a fully undocumented schema, the description covers the value/ttl/metadata surface but leaves the overwrite and authorization story unstated. Adequate but with clear gaps.

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 0%, so the description must compensate. It clarifies ttl units and maximum, that metadata is JSON, and the exact meaning of is_json; key, value, and namespace remain undocumented but are largely self-evident. Partial compensation for a 6-parameter, zero-coverage schema, hence a mid-range score rather than higher.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: 'Write one key/value pair into a Workers KV namespace.' An agent can immediately distinguish it from the read-oriented cf_kv_get and unrelated siblings. It stops short of explicitly naming the counterpart tool, so it is clear but not sibling-differentiating in the strongest sense.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied ('set is_json when the value is a JSON document that should be validated before write') rather than stated as a when-to-use rule. There is no guidance on prerequisites such as the namespace existing or on when to prefer this over other write paths. The is_json conditional is useful but is parameter-level, not tool-selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.