Skip to main content
Glama

Posso comprar isso?

can_afford
Read-only

Simula uma despesa única a partir de hoje: verifica se o saldo atual (soma de contas não-cartão) cobre, o impacto no saldo projetado dos próximos 12 meses (reusando a mesma projeção materializada de cashflow_forecast, inclusive se algum mês passa a ficar negativo) e quanto meses cada meta ativa atrasaria dado o aporte mensal necessário dela. Não grava nada, é só simulação — para comparar cenários de liquidação de ativo ou amortização de dívida use cashflow_forecast com liquidationParams/simulationParams.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount": "<amount>"
    },
    "name": "can_afford"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesValor da compra simulada, em reais. Deve ser > 0

Output Schema

NameRequiredDescriptionDefault
textNo
amountNo
monthsNo
goalImpactsNo
canAffordNowNo
currentBalanceNo
newNegativeMonthsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / amount / description
      Previous value: -"Valor da compra em reais"New value: +"Valor da compra simulada, em reais. Deve ser > 0"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds meaningful behavior beyond that: it defines the balance check as 'soma de contas não-cartão', the 12-month projection horizon, reuse of cashflow_forecast's materialized projection, detection of months becoming negative, and goal delay calculation. It also explicitly states 'Não grava nada'.

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 dense but every clause carries load: what is simulated, the exact checks performed, the no-persistence guarantee, and the alternative tool when different scenarios must be modeled. It is structured with the core action first, followed by detail and routing.

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 a single well-documented parameter and an available output schema, the description provides all necessary context: scope of simulation, inputs it considers, time horizon, side-effect-free behavior, and when to use a different tool instead. Nothing essential is missing for correct invocation.

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?

The schema already covers the single required parameter 'amount' completely with type and a constraint that it must be greater than 0. The description adds the framing of a one-time expense from today, but does not need to compensate for any schema gap, so a baseline score is appropriate.

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 opens with a specific verb and resource: 'Simula uma despesa única a partir de hoje' and then details exactly what is checked. The final sentence differentiates it from the sibling cashflow_forecast, so an agent can reliably select can_afford over alternatives.

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

Usage Guidelines5/5

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

The description explicitly states that this is a read-only simulation and provides an exclusion condition: 'para comparar cenários de liquidação de ativo ou amortização de dívida use cashflow_forecast com liquidationParams/simulationParams'. This gives clear routing guidance versus the relevant sibling.

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.