Skip to main content
Glama
brunovicco

openfinance-br-mcp

by brunovicco

start_consent

Initiates an Open Finance Brasil consent flow by creating a consent resource and returning a bank authorization URL the user must open to approve data-sharing scopes.

Instructions

Starts the Open Finance Brasil consent flow for a user at a bank.

Creates a consent resource at the bank, then builds a FAPI-BR compliant (PAR + JAR) authorization URL. The user must open this URL in a browser, log in, and authorize the requested scopes at the bank. Once redirected back, call complete_consent with the resulting URL to finish the flow.

Args: subject_id: User's CPF (digits only) or internal ID. bank: Identifier of the participating bank. scopes: Desired data-sharing scopes, e.g. ['accounts', 'balances', 'transactions', 'overdraft_limits', 'credit_card_accounts', 'credit_card_limits', 'credit_card_bills', 'credit_card_transactions', 'bank_fixed_incomes', 'funds', 'variable_incomes', 'treasure_titles']. Does NOT include 'pix'/payments - payment initiation uses a separate, dedicated payment consent (Payments API), not this data-sharing consent; see tools/pix.py. ctx: MCP request context, providing access to shared dependencies. request_url_elicitation: Ask a compatible MCP client to open the bank authorization URL using URL-mode elicitation. The URL is always returned as well, so clients without elicitation support can continue with the existing copy-and-open flow.

Returns: The consent ID and the URL the user must open to authorize it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankYes
scopesYes
subject_idYes
request_url_elicitationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankYes
consent_idYes
authorization_urlYes
expires_in_minutesYes
Behavior5/5

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

The description discloses key behavioral traits: it creates a consent resource at the bank, builds a FAPI-BR compliant authorization URL, requires the user to authorize in a browser, and returns a consent ID and URL. It also explains the request_url_elicitation behavior. This goes well beyond the minimal annotations and gives the agent a clear picture of side effects and dependencies.

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?

The description is well-structured with a summary, Args section, and Returns note. It is longer than average but every part carries useful information, such as the scope list and the explicit payment-consent distinction. No filler or redundant content appears.

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?

Given the complexity of a multi-step consent flow, the description provides a complete picture: how to invoke it, what the user must do, how to finish via complete_consent, and how it relates to payment consent. The presence of an output schema means detailed return types are not required in the description, and the high-level return description is sufficient.

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?

Even though schema description coverage is 0%, the description thoroughly explains every schema parameter: subject_id (CPF or internal ID), bank (participating bank), scopes (with explicit examples and exclusion of payments), and request_url_elicitation (with behavior and fallback). This compensates fully for the lack of schema descriptions.

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 purpose: 'Starts the Open Finance Brasil consent flow for a user at a bank.' It specifies the concrete actions (creating a consent resource, building a PAR+JAR authorization URL) and distinguishes itself from payment consent by saying this is not for 'pix'/payments. This makes it easy to differentiate from sibling tools like start_payment_consent and complete_consent.

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 gives explicit usage guidance: it explains when to use the tool, what the user must do with the returned URL, and that the flow should be completed by calling complete_consent. It also explicitly warns that payment initiation uses a separate dedicated consent flow, steering the agent away from misuse.

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