Home / Servers / Cloudflare API / workers_kv_namespace_write_key_value_pair_with_metadata
Write a key-value pair with optional metadata
An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.
Write a key-value pair with optional metadata Writes a value under the specified key in the Workers KV namespace, creating the key-value pair or… [PUT /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}]
Name on the gateway: cloudflare_api__workers_kv_namespace_write_key_value_pair_with_metadata · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
account_id required | string | account_id parameter |
namespace_id required | string | namespace_id parameter |
key_name required | string | key_name parameter |
expiration | number | Expires the key at a certain time, measured in… |
expiration_ttl | number | Number of seconds until the key expires. Must be… |
metadata | string | Associates arbitrary JSON data with a key/value… |
value required | string | A byte sequence to be stored, up to 25 MiB in… |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "cloudflare_api__workers_kv_namespace_write_key_value_pair_with_metadata",
"arguments": {
"account_id": "…",
"namespace_id": "…",
"key_name": "…",
"value": "…"
}
}Or connect the Cloudflare API server directly, which lists 3,127 tools including this one:
claude mcp add --transport http hj-cloudflare-api https://mcp.hjlabs.in/mcp/cloudflare-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the write a key-value pair with optional metadata tool with account_id set to ….