kv_put
Write a value to a key in a Cloudflare KV namespace with optional TTL. Requires human approval to execute the mutation.
Instructions
Write a value to a key in a KV namespace, with optional TTL. Requires confirm:true (human-approval gate); without it returns a preview only.
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": {
"namespace_id": "<namespace_id>",
"key": "<key>",
"value": "<value>"
},
"name": "kv_put"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Cloudflare account ID. Falls back to CLOUDFLARE_ACCOUNT_ID env var when omitted. | |
| namespace_id | Yes | KV namespace ID. | |
| key | Yes | The key to write. | |
| value | Yes | The value to store. | |
| expiration_ttl | No | Seconds until the key expires. | |
| confirm | No | Human-approval gate: must be true to actually perform this mutating operation. Omit or set false to get a non-executing preview of what would happen (with secrets redacted). A human should approve before this is set to true. |