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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"value": "<value>",
"namespace": "<namespace>"
},
"name": "cf_kv_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| ttl | No | ||
| value | Yes | ||
| is_json | No | ||
| namespace | Yes | ||
| metadata_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | ||
| result | No |