Skip to main content
Glama

Contar transações órfãs de cartão

invoice_orphan_count
Read-only

Conta despesas de cartão (Transaction.type = EXPENSE com cardId preenchido) que não têm nenhum vínculo em CreditCardInvoiceTransaction — normalmente transações antigas lançadas antes do sistema de faturas existir, ou importadas sem gerar o vínculo.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "invoice_orphan_count"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
orphanCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, and the description adds value beyond them by defining exactly what qualifies as an orphan and what the count represents. It also provides business context for why such records exist, which helps the agent interpret the result. No contradiction with annotations.

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?

A single information-dense sentence that front-loads the action and uses the remainder to specify the exact predicate and a brief rationale. Every clause earns its place; the explanation of why orphan records exist is useful context, not padding.

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?

For a zero-parameter, read-only aggregation with an output schema available, the description is complete: it defines precisely what is counted and why such records occur. An agent can select and invoke this tool correctly from the description alone.

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?

The tool takes zero parameters, which sets the baseline at 4. The description compensates fully by defining the exact scope of the count — the predicate on Transaction.type, cardId, and the absence of an invoice link — so nothing about the aggregate's meaning is left ambiguous.

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 names a specific verb ('Conta' — counts) and a precisely scoped resource: card expenses with Transaction.type = EXPENSE and cardId filled that lack any CreditCardInvoiceTransaction link. This unambiguous predicate distinguishes it from every sibling, particularly list_transactions and validate_current_invoices, without needing to open anything else.

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 description conveys when the tool is relevant by explaining that orphans are normally legacy transactions from before the invoice system existed, or imports that never generated the link. However, it never explicitly names an alternative or states when not to use it, leaving routing decisions to inference.

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.