Skip to main content
Glama

FalaZuki Finance BR

calculate_average_price

Calcula o novo preço médio de ações ou FIIs depois de uma compra: posição atual (quantidade + preço médio) mais a compra nova (quantidade + preço + custos). Pra várias compras, encadeie chamadas usando o resultado como posição seguinte. Venda não altera o preço médio. Parâmetros obrigatórios: buy_quantity, buy_price. Opcionais: current_quantity, current_average_price, fees. Use exatamente estes nomes, em inglês.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feesNoCorretagem e emolumentos da compra em R$ (entram no médio)
buy_priceYesPreço pago por unidade em R$
buy_quantityYesQuantidade comprada agora
current_quantityNoQuantidade que já possui (0 se é a primeira compra)
current_average_priceNoPreço médio atual em R$ (0 se é a primeira compra)

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It explains the calculation inputs and the rule that sales don't affect the average, and that fees enter the average. However, it does not disclose the output format, rounding behavior, or edge cases such as inconsistent current_quantity/current_average_price values, so some behavioral uncertainty remains.

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 compact and well-structured: it starts with the purpose, then the calculation inputs, then usage notes, then parameter requirements. Every sentence earns its place and there is no redundant filler.

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 the moderate complexity and full schema coverage, the description covers the essential context: when to use it, how to chain multiple purchases, the sale caveat, and which parameters matter. The only notable gap is the absence of any description of the return value or format, especially since no output schema is provided.

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 description coverage is 100%, so the baseline is 3. The description adds value by grouping parameters into required vs optional and instructing the agent to use exact English names, but it does not add new meaning beyond the schema's parameter descriptions.

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 states a specific verb ('Calcula') and resource: the new average price of stocks or FIIs after a purchase. It clearly distinguishes itself from the many sibling financial calculators by specifying the exact scenario (post-purchase average price) and even notes that sales do not change the average price.

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 provides clear when-to-use guidance: after a purchase, and for multiple purchases it instructs chaining calls. It also gives a when-not case ('Venda não altera o preço médio'). It does not explicitly name an alternative tool, but the context is specific enough that an agent can select it correctly.

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.

TDQS

B3.2/5.0
Disambiguation2/5

Many tools are clearly distinct, but the set contains several near-identical clusters: calculate_dividend_income_goal and calculate_dividend_yield both answer 'how much capital is needed to reach a dividend income target', and calculate_real_salary, calculate_raise_vs_inflation, and calculate_salary_time_value overlap heavily on salary/inflation comparisons. Generic tools like compare_investments and compare_with_cdb also blur the boundary with the many specific yield calculators.

Naming Consistency3/5

Most tools follow a clear verb_noun snake_case pattern with verbs like calculate_, get_, check_, compare_, and advise_. However, the object language is inconsistent (calculate_ganho_capital_imovel alongside calculate_car_affordability), and can_i_quit_job breaks the command-style pattern with a question.

Tool Count1/5

At 114 tools, the server is extremely over-scoped for an MCP surface; an agent cannot reasonably hold all these options in context. The inclusion of a search_calculator tool to route among the others is a strong signal that the tool set itself needs partitioning.

Completeness4/5

The surface is very comprehensive for Brazilian personal finance: employment, taxes, investments, debt, real estate, vehicles, small business, insurance, and market-data queries are all covered. A few minor gaps exist, such as no dedicated generic boleto-fine calculator or consolidated investment comparison engine, but no core workflow feels badly stranded.

Resources