Skip to main content
Glama

set_agent_budget

Idempotent

Set or remove an agent's USD spending limit to control costs; raising a limit restarts a budget-stopped agent and returns the updated balance.

Instructions

Define ou remove o teto de gasto (USD) de um agente. limit_usd=null remove o teto (ilimitado). É também o laço de recuperação: elevar o teto faz um agente parado por budget voltar a rodar no próximo turno. Retorna o saldo recalculado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesUUID do agente
limit_usdYesTeto em USD (>= 0) ou null para remover o teto
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate idempotent and non-destructive behavior. The description adds valuable context beyond them: null removes the cap, the tool is the recovery loop for budget-stopped agents, and it returns the recalculated balance. No contradiction with annotations.

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 description is compact and front-loaded with the core purpose. The second sentence partially restates schema information about null, but the recovery-loop sentence adds distinctive value without bloat.

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?

Given only two required parameters and no output schema, the description covers the key behavior, the null case, the recovery-loop consequence, and the return value. It could mention permission requirements or invalid-agent behavior, but the essential information for a correct call is present.

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% and the schema already documents limit_usd and agent_id. The description adds meaningful behavioral nuance, especially that limit_usd=null means unlimited and that increasing the limit resumes a stopped agent.

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 ('Define ou remove') and identifies the exact resource (agent spending cap in USD). It also distinguishes the tool from the sibling getters get_agent_budget and list_agent_budgets by emphasizing the mutation and recovery-loop behavior.

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 clearly explains the context for use: setting or removing a cap, and raising a cap to resume a budget-stopped agent. It does not explicitly name get_agent_budget/list_agent_budgets as alternatives or state when not to use it, but the usage context is strong.

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

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/zihin-ai/zihin-mcp'

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