Home / Servers / Cloudflare API / spend_policies_update

Update Spend Policy

An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.

Update Spend Policy Replaces the whole spend policy. Every field is required, as on create; there are no partial… [PUT /accounts/{account_id}/billing/spend-policies/{policy_id}]

Name on the gateway: cloudflare_api__spend_policies_update · may change things.

Parameters

NameTypeDescription
account_id requiredstringaccount_id parameter
policy_id requiredstringpolicy_id parameter
action requirednotification | usage_blockThe action taken when the threshold is reached.…
enabled requiredbooleanWhether the policy is evaluated.
name requiredstringDisplay name of the policy. After surrounding…
notification_emailstringEmail address that receives notifications.…
product_id requiredworkers | durable_objectsThe product the policy applies to: workers or…
threshold_cents requiredintegerThe spend threshold for the current billing…

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:

call_tool arguments
{
  "name": "cloudflare_api__spend_policies_update",
  "arguments": {
    "account_id": "…",
    "policy_id": "…",
    "action": "…",
    "enabled": true,
    "name": "…",
    "product_id": "…",
    "threshold_cents": 0
  }
}

Or connect the Cloudflare API server directly, which lists 3,127 tools including this one:

Run in your terminal
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 update spend policy tool with account_id set to ….

More from Cloudflare API