Skip to main content
Glama

Parse boleto

parse_boleto
Read-onlyIdempotent

Decode a boleto linha digitável with 47 or 48 digits to extract bank, amount, due date and check-digit results, including the 2025 due-factor reset handling.

Instructions

Decode a boleto linha digitável: 47 digits (bank) or 48 digits starting with 8 (utilities/taxes). Returns bank, amount, due date (handles the 2025 due-factor reset) and check-digit results.

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": {
      "line": "<line>"
    },
    "name": "parse_boleto"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineYesDigits; spaces and dots are ignored
reference_dateNoDate used to pick between the two due-date cycles (default: today)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered structurally. The description adds real value by enumerating the returned fields and disclosing a non-obvious edge case, the 2025 due-factor reset, but says nothing about how malformed input or failed check digits are reported.

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?

Two front-loaded sentences with no filler: format constraints first, then the return fields and the notable edge case. Nothing is repeated from the schema or annotations.

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?

With no output schema, the description responsibly lists what comes back (bank, amount, due date, check-digit results) and covers the tricky due-date-cycle behavior. Only error/failure semantics for invalid lines are left unaddressed.

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 earns an extra point by explaining the digit-count and prefix rules that constrain the `line` value, context the schema only gestures at with 'digits; spaces and dots are ignored'.

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?

States a specific verb (decode) and resource (boleto linha digitável), and pins down the accepted inputs precisely: 47 digits for bank boletos or 48 digits starting with 8 for utilities/taxes. It also names the decoded outputs, so an agent knows exactly what the tool produces and can distinguish it from siblings like parse_nfe_key or lookup_cep.

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?

The digit-count rules act as a clear applicability test: the agent knows to use this only for 47-digit or 8-prefixed 48-digit lines. What is missing is any explicit exclusion or routing to an alternative when the input does not match those formats.

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