Skip to main content
Glama

update_usage_limit

Update a cumulative usage-limit policy by modifying its name, conditions, credit limit, alert threshold, reset schedule, or next reset time, and reset usage for a selected grouped value.

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.

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
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. 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"
      +}
  3. 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"
  4. Addedv1.0.1
  5. Removed
  6. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, and destructiveHint=false. The description adds useful behavioral context beyond annotations: periodic_reset and periodic_reset_days are mutually exclusive, and conditions replace the existing set rather than merge with it. It does not describe permissions or rate limits, but it meaningfully improves transparency around replacement semantics.

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

Conciseness5/5

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

The description is two sentences and front-loads the tool's scope before adding key constraints. The long list of updatable fields is necessary and efficiently organized, and there is no extraneous text.

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

Completeness4/5

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

The tool has 10 parameters, full schema coverage, and an output schema, so the description need not explain return values. It covers the updatable fields and important replacement/mutual-exclusivity behavior. It could be more complete by clarifying when to use this versus reset_usage_limit_entity or by mentioning required permission context, but it is sufficient for correct invocation.

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?

With 100% schema description coverage, the baseline is 3. The description enumerates all updatable fields and adds a meaningful constraint not clearly stated in the schema: periodic_reset and periodic_reset_days are mutually exclusive. It also clarifies that conditions replace the existing set and that one grouped value's usage can be reset, though additional condition syntax details are left to the schema.

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

Purpose4/5

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

The description states a specific verb and resource (update a cumulative usage-limit policy) and enumerates the fields that can be changed. It is clear enough to distinguish an update from create/delete/list/get, but it does not explicitly differentiate itself from the sibling reset_usage_limit_entity tool even though it includes resetting a grouped value's usage.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance or mention of alternatives. The description gives parameter-level constraints such as mutual exclusivity and replacement behavior, but an agent must infer that this tool is for modifying an existing policy rather than using create_usage_limit or reset_usage_limit_entity. The overlap with reset_usage_limit_entity is especially unclear.

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