Skip to main content
Glama

Fatos contábeis de uma empresa

fatos_contabeis
Read-onlyIdempotent

Receita, EBIT, lucro, patrimônio, dívida e caixa de uma AÇÃO em R$, por ano ou trimestre, com a conta CVM de cada número. Use quando: "qual foi a receita líquida e o lucro da WEG em 2025?"; "lucro do 2T da Petrobras"; "caixa da Magalu no último balanço". NÃO use para: ROE, margem, dívida/EBITDA já calculados → indicadores_anuais; versões republicadas → reapresentacoes; informe de FII → fii. Fonte e fórmula: DFP (anual) ou ITR (trimestral=True, 1T a 3T isolados) da CVM, versão vigente; origem = conta CVM exata. O balanço numa data passada (as_of) e versões antigas só na REST, com chave. Retorna: fatos: uma linha por período com as contas padronizadas em R$ e origem; citacao. Vazio ou erro: o 4º trimestre não vem no trimestral (é a DFP anual). Erro de código traz sugestoes; FII aponta para fii. Acesso: ABERTA: qualquer ticker, sem chave, um por vez (sem chave: 2000 consultas por hora e 20000 por dia, por endereço; com chave_api vale o limite da chave). Traz citacao: cite-a ao usar o número.

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": {
      "ticker": "<ticker>"
    },
    "name": "fatos_contabeis"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickerYesCódigo de AÇÃO na B3, ex.: PETR4, VALE3, ITUB4. Aceita petr4, PETR4.SA, BVMF:PETR4, PETR4F (fracionário) e código antigo (vira o atual). Código de FII, ETF ou BDR devolve erro com `tente_assim`.
chave_apiNoChave de API opcional. Vazia = acesso aberto: a descrição da ferramenta diz se devolve amostra ou exige chave (chave grátis, sem cartão).
trimestralNoFalse (padrão) = DFP anual; True = ITR trimestral (1T a 3T isolados).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / ticker / description
      Previous value: -"Ticker da B3, como PETR4, VALE3 ou WEGE3 (sem distinção de caixa; aceita o sufixo .SA)."New value: +"Código de AÇÃO na B3, ex.: PETR4, VALE3, ITUB4. Aceita petr4, PETR4.SA, BVMF:PETR4, PETR4F (fracionário) e código antigo (vira o atual). Código de FII, ETF ou BDR devolve erro com `tente_assim`."
    • addedInput schema / properties / ticker / examples
      Added value: +[
      +  "PETR4",
      +  "VALE3",
      +  "ITUB4"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / chave_api / description
      Added value: +"Chave de API opcional. Vazia = acesso aberto: a descrição da ferramenta diz se devolve amostra ou exige chave (chave grátis, sem cartão)."
    • addedInput schema / properties / ticker / description
      Added value: +"Ticker da B3, como PETR4, VALE3 ou WEGE3 (sem distinção de caixa; aceita o sufixo .SA)."
    • addedInput schema / properties / trimestral / description
      Added value: +"False (padrão) = DFP anual; True = ITR trimestral (1T a 3T isolados)."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavior: source is DFP (annual) or ITR (trimestral, 1T–3T isolated), only the current version, open access without a key at 2000/hour and 20000/day per address, and that the response carries a `citacao` that must be cited. It also discloses that `as_of` historical views and old versions are REST-only, preventing a false attempt via this tool.

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?

Dense but well front-loaded, with labeled sections (use, don't use, source, returns, empty/error, access) that let an agent skim to what it needs. The one marginal line is the REST/`as_of` note, which is useful mainly as a negative constraint but adds length.

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?

Although there is no output schema, the description covers the return shape (`fatos` with one row per period plus `origem`, and `citacao`), the empty-result case (4T absent from quarterly data), and error behavior (`sugestoes`, FII redirection to `fii`). Nothing an agent needs to call this correctly is missing.

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%, so the baseline is 3; the description still adds real meaning by explaining that trimestral=True yields isolated 1T–3T ITR figures while the 4th quarter only exists as the annual DFP, and that `origem` is the exact CVM account. It does not deepen `chave_api` beyond what the schema already says.

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?

Names the exact metrics returned (Receita, EBIT, lucro, patrimônio, dívida, caixa) in R$, for an AÇÃO, by year or quarter, plus the CVM account per number. This is specific verb+resource+scope and is immediately distinguishable from siblings like indicadores_anuais and fii.

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?

Provides literal 'Use quando' example queries (WEG revenue/profit 2025, Petrobras 2T profit, Magalu cash) and an explicit 'NÃO use para' block routing to indicadores_anuais, reapresentacoes and fii. Both the inclusion and exclusion conditions are spelled out with named alternatives.

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.