Skip to main content
Glama

update_usage_limit

Destructive

Modify a cumulative usage-limit policy by changing its name, conditions, credit limit, alert threshold, reset schedule, or grouped value usage to keep usage controls current.

Instructions

Update a cumulative usage-limit policy's name, description, complete condition set, credit limit, alert threshold, reset schedule, next reset time, or one grouped value's usage. periodic_reset and periodic_reset_days are mutually exclusive; conditions replace the existing set.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "update_usage_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesUsage-limit policy UUID
nameNoReplacement display name
conditionsNoComplete replacement condition set
descriptionNoReplacement description, or null to clear it
credit_limitNoReplacement cumulative maximum
periodic_resetNoReplacement reset schedule
alert_thresholdNoReplacement alert threshold
next_usage_reset_atNoNext reset timestamp in ISO 8601 format, or null to clear it
periodic_reset_daysNoCustom reset interval in days, or null to clear it
reset_usage_for_valueNoGrouped value whose usage should reset

Output Schema

NameRequiredDescriptionDefault
okYesCall succeeded
dataNoSuccess payload
errorNoFailure details

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.16.5
    • changedOutput schema / properties / data / description
      Previous value: -"Structured success payload when ok is true"New value: +"Success payload"
    • changedOutput schema / properties / error / description
      Previous value: -"Structured error payload when ok is false"New value: +"Failure details"
    • changedOutput schema / properties / error / properties / details / description
      Previous value: -"Optional structured error details"New value: +"Extra error details"
    • changedOutput schema / properties / error / properties / message / description
      Previous value: -"Human-readable error message"New value: +"Error message"
    • changedOutput schema / properties / ok / description
      Previous value: -"Whether the tool call succeeded and returned structured data"New value: +"Call succeeded"
  2. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed5 schema fields changedv0.12.2
    • addedInput schema / properties / conditions
      Added value: +{
      +  "description": "Complete replacement condition set",
      +  "items": {
      +    "properties": {
      +      "excludes": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ],
      +        "description": "Values to exclude"
      +      },
      +      "key": {
      +        "description": "Match key such as api_key, virtual_key, provider, config, prompt, model, endpoint_type, mcp_server, mcp_tool, workspace_id, or metadata.*",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ],
      +        "description": "One value or several OR-matched values; use * for wildcard matching"
      +      }
      +    },
      +    "required": [
      +      "key",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Replacement description, or null to clear it"
      +}
    • addedInput schema / properties / name / maxLength
      Added value: +255
    • addedInput schema / properties / next_usage_reset_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Next reset timestamp in ISO 8601 format, or null to clear it"
      +}
    • addedInput schema / properties / periodic_reset_days
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 365,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Custom reset interval in days, or null to clear it"
      +}
  4. Changed14 schema fields changedv0.11.5
    • addedInput schema / properties / alert_threshold / anyOf
      Added value: +[
      +  {
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / alert_threshold / description
      Previous value: -"New alert threshold percentage (0-100)"New value: +"Replacement alert threshold"
    • removedInput schema / properties / alert_threshold / type
      Removed value: -"number"
    • changedInput schema / properties / credit_limit / description
      Previous value: -"New maximum allowed usage value"New value: +"Replacement cumulative maximum"
    • removedInput schema / properties / credit_limit / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / credit_limit / minimum
      Added value: +0
    • changedInput schema / properties / id / description
      Previous value: -"The unique identifier of the usage limit"New value: +"Usage-limit policy UUID"
    • addedInput schema / properties / id / minLength
      Added value: +1
    • changedInput schema / properties / name / description
      Previous value: -"New name for the usage limit"New value: +"Replacement display name"
    • addedInput schema / properties / periodic_reset / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "monthly",
      +      "weekly"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / periodic_reset / description
      Previous value: -"New periodic reset schedule"New value: +"Replacement reset schedule"
    • removedInput schema / properties / periodic_reset / enum
      Removed value: -[
      -  "monthly",
      -  "weekly"
      -]
    • removedInput schema / properties / periodic_reset / type
      Removed value: -"string"
    • changedInput schema / properties / reset_usage_for_value / description
      Previous value: -"Reset usage counters for a specific group_by value"New value: +"Grouped value whose usage should reset"
  5. Addedv1.0.1
  6. Removed
  7. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructive=true, idempotent=false and openWorld=true, so the safety profile is covered; the description adds real value on top by disclosing that conditions are a complete replacement set (destructive in a non-obvious way) and that periodic_reset and periodic_reset_days cannot be combined. It does not state whether omitted fields are left untouched, which is the one behavioral trait an agent most needs for a 10-parameter destructive update.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that enumerates only mutable fields, followed immediately by the two hard constraints. Dense but every clause carries information; the long field list is marginally heavy but justified for a 10-parameter update.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema existence relieves it of describing return values, and the schema is fully described, so the definition is functional. However, for a destructive, non-idempotent update it omits partial-update semantics (whether unspecified fields are preserved) and does not clarify the relationship between reset_usage_for_value and the sibling reset_usage_limit_entity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so 3 is the baseline; the description earns an extra point by stating the mutual exclusivity between periodic_reset and periodic_reset_days and by clarifying that conditions overwrite rather than merge. It adds no detail on required id or on what reset_usage_for_value's grouped value means beyond the field name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Update a cumulative usage-limit policy') and enumerates exactly which fields are mutable, which distinguishes it from the rate-limit siblings that share the same update verb. An agent can tell what this tool touches without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the 'update' verb; there is no explicit statement of when to choose this over reset_usage_limit_entity (which overlaps with the reset_usage_for_value parameter) or create_usage_limit. The mutual-exclusivity rule for periodic_reset/periodic_reset_days is a constraint rather than selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools