Skip to main content
Glama
brunovicco

openfinance-br-mcp

by brunovicco

initiate_pix

DestructiveIdempotent

Initiates a PIX payment through Open Finance Brasil with an authorized consent. Uses an idempotency key to avoid duplicate charges.

Instructions

Initiates a PIX payment via Open Finance Brasil. Requires an active payment consent. The idempotency_key field prevents duplicate charges on retries.

Outside environment='mock', requires an AUTHORISED payment consent for this subject/bank, obtained beforehand via start_payment_consent + complete_payment_consent (tools/payments.py) - a data-sharing consent alone is not sufficient. In mock mode this check is skipped entirely, since the mock adapter has no payment-consent resource to check against.

Args: subject_id: Payer's CPF. bank: Identifier of the participating bank. amount: Canonical amount in BRL (e.g. "150.00"). creditor_key: PIX key of the recipient. creditor_key_type: Type of the recipient's key. debtor_account_id: ID of the account to debit, returned by list_accounts. idempotency_key: Client-generated UUID to prevent duplicates. ctx: MCP request context, providing access to shared adapters and the persistent idempotency store. description: Payment description/reason (max 140 chars). consent_id: Payment consent returned by start_payment_consent. Required outside mock mode.

Returns: Status of the initiated (or previously cached) payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankYes
amountYesBRL amount serialized with exactly two decimal places.
consent_idNo
subject_idYes
descriptionNo
creditor_keyYes
idempotency_keyYes
creditor_key_typeYes
debtor_account_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankYes
paymentYes
Behavior4/5

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

Annotations already indicate idempotent and destructive hints, but the description adds rich context: it explains the role of idempotency_key in preventing duplicate charges, the requirement for an AUTHORISED consent, and the mock mode exception. This goes beyond the annotations, though it does not detail all side effects like account balance changes.

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?

The description is well-structured with an overview, prerequisite details, and a clear argument list. It is longer than strictly necessary but every sentence adds value; the arg descriptions are concise and the return note is useful. Slightly verbose but not wasteful.

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 tool with 9 parameters, an output schema, and complex prerequisites, the description is complete. It explains the consent flow, mock mode behavior, idempotency, and the meaning of each parameter, making the tool usable without external context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 11%, but the description provides meaningful explanations for nearly every parameter (subject_id, bank, amount, creditor_key, creditor_key_type, debtor_account_id, idempotency_key, description, consent_id). It also clarifies the format for amount and the source for debtor_account_id, fully compensating for the sparse schema.

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 clearly states the tool's function: 'Initiates a PIX payment via Open Finance Brasil.' This specific verb+resource (initiate payment) distinguishes it from sibling tools like start_payment_consent, which handle the consent flow, not the actual payment.

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?

The description provides explicit when-to-use guidance: it requires an AUTHORISED payment consent obtained via start_payment_consent + complete_payment_consent, and explicitly warns that a data-sharing consent alone is insufficient. It also clarifies behavior in mock mode, which is critical for correct usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brunovicco/openfinance-br-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server