Skip to main content
Glama

Format Equation

format_equation

Formats mathematical equations to ABNT NBR 14724: centers and numbers them, defines variables without indent, prevents orphaned page breaks, and outputs Typst, LaTeX, or Markdown snippets.

Instructions

Formata equações e fórmulas matemáticas segundo a ABNT NBR 14724 (item 5.9 e regra NBR14724-R04):

  • Equações centralizadas e destacadas do texto com numeração consecutiva entre parênteses à margem direita.

  • Definição das variáveis ('onde:' ou 'em que:') sem recuo de parágrafo (first-line-indent: 0cm).

  • Blindagem contra quebras órfãs de página em Typst via #block(breakable: false).

  • Gera snippets prontos para Typst, LaTeX e Markdown.

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": {
      "expression": "<expression>"
    },
    "name": "format_equation"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNo
expressionYes
target_formatNotypst
equation_numberNo
variable_definitionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses centering, consecutive parenthetical numbering at the right margin, zero first-line indent on variable definitions, and orphan-line protection via #block(breakable: false). It still omits whether anything is written to disk versus returned as a string, and what happens on an invalid expression.

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?

Front-loaded with the standard and purpose, then four dense bullets that each carry distinct information (layout, definitions, page-break protection, output formats). No filler and no repetition of the tool name.

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?

An output schema exists, so return-value description is correctly omitted, and the pure-formatting nature of the tool makes safety/annotation disclosure less critical. The remaining gap is the undocumented 'label' parameter and per-target caveats (e.g., how numbering behaves in Markdown versus Typst).

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 0%, so the description must compensate. It maps loosely onto three of five parameters (target_format via the Typst/LaTeX/Markdown list, equation_number via 'numeração consecutiva', variable_definitions via the 'onde:'/'em que:' convention) but says nothing about the 'label' parameter or about equation_number accepting either an integer or a string.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (formats) and resource (equations and math formulas) plus the governing standard (ABNT NBR 14724, item 5.9 / rule R04) and the three output targets. The resource is clearly distinct from the formatting siblings (format_citation, format_reference, format_table, format_figure), but the description never names them, so differentiation is implicit rather than stated.

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 ABNT standard reference and the 'snippets ready for Typst, LaTeX and Markdown' line imply the academic-document context, but there is no explicit when-to-use, when-not-to-use, or pointer to the sibling formatting tools. An agent must infer that this is the tool for display equations rather than inline text or tables.

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