Skip to main content
Glama

Set Budget Limit

set_budget
Destructive

Control AI model session costs by setting a maximum spending limit in USD and a warning threshold percentage.

Instructions

Set a session-wide spending limit (in USD) and warning threshold

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_dollarsNoThe maximum amount to spend this session
warn_at_percentNoPercentage of budget used before issuing warnings
Behavior3/5

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

Annotations already flag destructiveHint=true, indicating a state-changing operation. The description adds the 'session-wide' scope but does not disclose whether the budget overrides existing settings, whether repeated calls reset usage, or what the effective behavior is. This meets a basic level but lacks deeper behavioral context.

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 a single, well-formed sentence that front-loads the action and includes both key parameters without unnecessary words. It earns its place and is immediately scannable.

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 simple setter with two optional parameters (indicated by required: 0), the description covers the primary inputs and scope. It does not explain return values or repeat-call behavior, but given the annotations and schema, it is adequately complete for an agent to invoke the tool 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% with each parameter described, but the description adds value by specifying the currency unit 'in USD' for max_dollars and consolidating both parameters as a 'warning threshold'. This goes slightly beyond the schema descriptions, which omit currency and only hint at the warning aspect.

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 uses a specific verb 'Set' and clearly identifies the resource: 'a session-wide spending limit (in USD) and warning threshold'. It effectively distinguishes from sibling read tools like get_budget_status and get_session_usage, serving as the write counterpart.

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?

The description implies usage when the user needs to establish a budget for a session, but it does not explicitly state when to use it relative to alternatives or provide exclusions. The sibling list suggests a companion read tool, but the description alone offers no explicit guidance.

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/villagertim/universal-mcp-for-openrouter'

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