Skip to main content
Glama

create_budget_gate

Set a monthly LLM spend limit to block over-limit calls before execution. Supports account-wide, project-specific, or tag-based caps.

Instructions

Create a runtime budget gate (Pro+ only). Sets a monthly LLM spend limit (USD) for the account; the SDK (budgetGate opt-in) blocks over-limit calls before execution. Enforcement is optimistic (spend is cached for 60 seconds and in-flight calls pass, so the limit is a guideline that can be exceeded, not a strict hard cap). enforceMode = fail_open (default; calls pass when the backend is unreachable) / fail_closed (calls are blocked when unreachable; a cold start where the SDK has never fetched the config additionally requires the SDK-side failClosed opt-in). Omitting projectId = an account-wide gate (only one; 409 if one exists). Specifying projectId = a gate for that project only (ANDed with the account gate — the strictest limit wins; one per project). Specifying tagKey + tagValue = a gate for calls carrying that tag (e.g. tagKey=service / tagValue=checkout caps the monthly spend of service=checkout. ANDed with the account gate; one per (tagKey,tagValue)). tagKey/tagValue must be specified together and are mutually exclusive with projectId. Example phrasing: "create a budget gate at $50/month" / "cap project X at $10/month" / "cap the service=checkout tag at $20/month"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagKeyNoTag key for a per-tag gate (e.g. service). Must be specified together with tagValue; mutually exclusive with projectId. 1-128 chars
enabledNoWhether the gate is enabled (default true)
tagValueNoTag value for a per-tag gate (e.g. checkout). Must be specified together with tagKey. 1-128 chars
projectIdNoproj_-style project ID (omit for an account-wide gate). The project must belong to your account and not be archived
enforceModeNoBehavior when the backend is unreachable (default fail_open)
monthlyLimitUsdYesMonthly limit in USD (0.01 - 1000000, $0.01 increments). E.g. 50 / 100.5
Behavior5/5

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

With no annotations, the description fully bears the burden of behavioral disclosure. It explains optimistic enforcement, caching, in-flight pass, enforceMode behaviors, and scoping rules—all critical for safe invocation.

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?

Packs extensive detail into a single paragraph without fluff. Every sentence adds value: scope variants, enforcement modes, error conditions, and example phrasings. Front-loaded with core purpose.

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?

Given the tool's complexity (6 params, scoping, enforcement, caching) and no output schema, the description covers all necessary aspects: side effects, error cases, inter-dependencies, and operational semantics. Nothing obvious is omitted.

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

Parameters5/5

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

Despite 100% schema coverage, the description enriches each parameter with context: inter-parameter relationships (tagKey/tagValue mutual exclusivity, projectId omission for account-wide), example values, and implicit behavior (e.g., 409 for duplicate account gate). This goes well beyond 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 clearly states it creates a runtime budget gate, specifying the verb and resource. It distinguishes from siblings like delete/update/get budget gates by explaining the creation-specific details, but does not explicitly contrast with them.

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?

Provides extensive context on when to use (creating a budget gate with various scopes) and constraints (e.g., duplicate account gate causes 409, tag params mutually exclusive with projectId). However, lacks explicit directive on when not to use (e.g., to update an existing gate).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/argosvix/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server