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
| Name | Type | Description |
|---|---|---|
account_id required | string | account_id parameter |
policy_id required | string | policy_id parameter |
action required | notification | usage_block | The action taken when the threshold is reached.… |
enabled required | boolean | Whether the policy is evaluated. |
name required | string | Display name of the policy. After surrounding… |
notification_email | string | Email address that receives notifications.… |
product_id required | workers | durable_objects | The product the policy applies to: workers or… |
threshold_cents required | integer | The 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:
{
"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:
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 ….