Skip to navigation

write_usage_limit

Create, update, activate or archive usage limits

Live server: test server (test.mcp.solvimon.com) only.

Creates and updates a customer’s usage limits, and activates or archives them.

Actions: create, update, status (ACTIVE or ARCHIVED)

  • scope: SELF caps the customer’s own usage. scope: CHILDREN is the default cap for each child customer.
  • limit is exactly one of number, amount or credits, matching the meter value’s type.
  • Alerts need a USAGE workflow with a send-webhook action. Every result reminds you.
Cap each child customer at 1M events
{"action": "create", "customer_id": "cust_AbD3DqausjOYiMNDZY11F", "meter_value_calculation_id": "mvc_Jh5tRw9PnX3kMq7VbYd28", "scope": "CHILDREN", "limit": {"number": "1000000"}}

Example prompts

  • “Cap Acme Inc. at 500,000 API requests per billing period.”
  • “Give every end user of our platform customer a default cap of 1M events.”
  • “Raise Acme Inc.’s API request limit to 2M.”
  • “Stop tracking the old token limit for Acme Inc.”

Example output

Prompt: “Cap Acme Inc. at 500,000 API requests per billing period.”

Tool call:

{
"action": "create",
"customer_id": "cust_gwD6720vzh8etnCOhw1l",
"meter_value_calculation_id": "mvca_SwDpzo0vA1bBwlCZ7s1j",
"scope": "SELF",
"limit": {"number": "500000"}
}

Response (trimmed):

{
"object_type": "USAGE_LIMIT",
"id": "ulim_BwDpzo0vA1bGTLCi7x17",
"status": "ACTIVE",
"customer_id": "cust_gwD6720vzh8etnCOhw1l",
"scope": "SELF",
"limit": {"number": "500000"},
"meter_value_calculation_name": "Docs example API requests SUM",
"meter_name": "Docs example API requests",
"note": "Usage limits are soft caps: nothing is blocked. Alerts on them come only from a USAGE workflow with a SEND_WEBHOOK action (see get_workflows); without one, crossing the limit is only visible in get_usage_limits resource_type=status."
}

Claude’s answer: The 500,000 API request limit for Acme Inc. is active and tracked from now on. It is a soft cap, so usage isn’t blocked, and nobody is alerted yet: add a USAGE workflow with a webhook action if you want a warning when it is crossed.