Skip to main content
Glama

Set AI spend cap

set_ai_spend_cap
Destructive

Change the organisation's AI spend cap (the twin of ankra org ai-spend-cap set). A partial write: only the fields passed change, and null clears one. daily_chat_usd_cap is the daily chat cap in US dollars (null: the plan default applies); daily_token_soft_cap and daily_token_hard_cap are the daily token caps for unattended runs (null: no cap); the hard cap may not be below the soft cap. get_ai_spend_cap reads them. Needs billing.manage.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
daily_chat_usd_capNoThe daily chat cap in US dollars, greater than zero; null returns to the plan default.
daily_token_hard_capNoTokens a day after which new unattended runs are refused; null removes it.
daily_token_soft_capNoTokens a day after which unattended runs degrade to the quick tier; null removes it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only say write, non-idempotent, destructive; the description adds real value on top by explaining partial-write semantics, that null clears a cap, the hard>=soft invariant, and the required scope. It does not spell out how quickly changes take effect on in-flight or currently running workloads, which matters for a destructiveHint=true tool.

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?

Dense and front-loaded: identity, write semantics, field meanings, invariant, counterpart, and permission in that order. Parenthetical restatements of null behavior duplicate the schema and could be trimmed without loss.

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?

For a 3-optional-field mutation with no output schema, the description covers semantics, invariants, permissions, and the read counterpart, which is enough to call it correctly. It leaves the response shape and the effect on already-running workloads unstated.

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

Parameters3/5

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

Schema coverage is 100%, so per-field meanings are already documented; the description mostly restates them. Its one genuine addition beyond the schema is the cross-parameter constraint that the hard cap may not be below the soft cap, which justifies staying at the baseline rather than below it.

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 ('Change the organisation's AI spend cap') and immediately names the CLI twin and the read counterpart get_ai_spend_cap, so the agent can separate it from the many other AI-settings tools 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 Guidelines4/5

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

It explicitly routes reads to get_ai_spend_cap and states the permission prerequisite ('Needs billing.manage'), giving clear context for when this tool applies. It stops short of explicit when-not-to-use guidance, e.g. that it should not be used to inspect current caps or that it affects unattended runs going forward.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.