Skip to main content
Glama
enzoemir1

invoiceflow-mcp

Reconcile Payment

payment_reconcile

Match an incoming payment to an open invoice using payer email and amount. On match, mark invoice paid and update payment history.

Instructions

Match an incoming external payment (e.g. Stripe webhook, PayPal IPN, bank transfer) to an open invoice. Matching rule: the payer_email must equal the invoice client_email (case-insensitive) AND the payment_amount must equal the invoice amount_due within one cent. On match the invoice is marked paid, amount_paid/amount_due are updated, and client payment_history is recomputed exactly like invoice_mark_paid. Returns a reconciliation message on match or a "no match" message otherwise (no error). If multiple invoices match, the first one is reconciled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
referenceNoExternal payment reference or transaction ID for your records
payer_emailYesEmail of the payer (matched against invoice client_email, case-insensitive)
payment_amountYesAmount received from the payer, in the invoice currency
payment_methodNoPayment channel (stripe|paypal|bank_transfer|etc.)
Behavior5/5

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

The description thoroughly discloses behavioral traits: on match, the invoice is marked paid, amounts are updated, and payment_history is recomputed. It also notes that no error is thrown on no match, and that the first invoice is reconciled when multiple match. This exceeds annotations which only indicate non-readonly and non-destructive.

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 concise, front-loaded with purpose, then matching rule, then effects, then return behavior. Every sentence adds value without redundancy.

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?

The description covers matching logic, effects, return behavior, and touches on edge cases (multiple matches). However, it does not explain the fate of 'reference' and 'payment_method' parameters (e.g., stored or ignored), and lacks detail on validation errors.

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 input schema covers 100% of parameters with descriptions. The description adds beyond schema by specifying the tolerance (within one cent) and case-insensitivity for email, providing additional context not in the 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 matches an incoming external payment to an open invoice, using specific verbs and resources. It distinguishes itself from siblings like invoice_mark_paid by focusing on reconciliation from external sources.

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 description explains the matching rule and behavior when multiple invoices match, but does not explicitly state when to use this tool versus alternatives like invoice_mark_paid. The context of external payments vs manual marking is implied but not stated.

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/enzoemir1/invoiceflow-mcp'

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