Home / Servers / Cloudflare API / spend_policies_create
Create Spend Policy
An MCP tool from the Cloudflare API server, hosted on mcp.hjlabs.in.
Create Spend Policy Creates a spend policy. Each account can have only one enabled usage_block policy per product. A… [POST /accounts/{account_id}/billing/spend-policies]
Name on the gateway: cloudflare_api__spend_policies_create · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
account_id required | string | account_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_create",
"arguments": {
"account_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 create spend policy tool with account_id set to ….