Skip to main content
Glama

Set custom role credit limit

set_role_credit_limit
Destructive

Set or clear a custom role's monthly credit limit per member, applying changes immediately; send null to revert members to the organization default.

Instructions

This endpoint sets or clears the monthly credit limit of a custom role. The limit applies to each member of the role individually and takes effect immediately: member allowances are recalculated while preserving credits already used in the current billing cycle. Send "monthly_credit_limit": null to clear the role-level limit so members revert to the organization default. When a user belongs to multiple roles, the highest limit across their roles wins. Requests that do not change the stored value are no-ops. Changes are recorded in the organization audit trail. Explicit confirmation is required for this exact account operation. Runs can spend credits or trigger downstream actions; never resubmit unknown outcomes automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoNamed private Gumloop account; selects private credentials and user/team identity.
confirmNoSet true only when the user asked for exactly this action.
payloadNoComplete JSON request body instead of body flags. Preserves current endpoint fields and values.
role_idYesThe ID of the custom role (the same ID used as `group_id` by the Manage custom role users endpoint).
user_idNoYour user id -- you must be an organization admin to manage custom role credit limits.
payload_fileNoRegular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload.
organization_idYesThe ID of the organization the custom role belongs to.
monthly_credit_limitNoThe monthly credit limit applied to each member of this role, or null to clear the role-level limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.0
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true for this exact requested account change, agent/flow execution, upload or deletion."New value: +"Set true only when the user asked for exactly this action."
  2. First observedv2.0.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag it as a destructive, non-idempotent, open-world write. The description adds substantial context beyond that: immediate effect, per-member application, recalculation preserving already-used credits, highest-limit-wins across multiple roles, no-op behavior, and audit-trail recording. This is exactly the extra behavioral detail the annotations cannot convey.

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?

The core purpose and null semantics are front-loaded and each operational sentence earns its place. However, the closing boilerplate about 'runs can spend credits or trigger downstream actions' is generic and tangential to a credit-limit setter, slightly padding the description.

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

Completeness5/5

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

For a mutation tool with no output schema, the definition is complete: it covers effect timing, recalculation semantics, role precedence, no-op behavior, audit recording, and confirmation. An agent has everything needed to invoke it correctly.

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 the baseline is 3, but the description adds genuine meaning the schema lacks: the per-member scope of the limit and the multi-role precedence rule ('highest limit across their roles wins'). The null-clearing semantics are already in the schema, so this is additive rather than duplicative.

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?

States a specific verb and resource: 'sets or clears the monthly credit limit of a custom role'. This clearly distinguishes it from the read siblings get_role_credit_limit and list_role_credit_limits without needing to see their schemas.

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

Usage Guidelines4/5

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

Explains the key usage condition ('send monthly_credit_limit: null to clear the role-level limit') and the confirmation requirement, giving clear context for when to invoke. It does not explicitly name the read alternatives (get_role_credit_limit/list_role_credit_limits), so routing is implied rather than spelled out.

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