MCP serverAvailable tools
Adjust account balance
Correct one receivable or payable balance with an auditable reason. kind selects the account family; balanceType selects an operational document or fiscal PPD balance.
MCP tool
adjust_account_balancePurpose
Correct one operational or fiscal account balance with an auditable reason.
- Use when
- A documented accounting correction is required.
- Do not use when
- The change represents a payment, sale, expense, or other normal business event.
- Required permissions
- Side effects
- Destructive
- Idempotency
- Idempotent
Input schema
JSON Schema{ "type": "object", "properties": { "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request." }, "input": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "receivable" }, "balanceType": { "type": "string", "const": "operational" }, "customerId": { "type": "string" }, "documentRef": { "type": "string", "pattern": "^sales_receipt:.+$" }, "targetBalance": { "type": "number", "minimum": 0 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "kind", "balanceType", "customerId", "documentRef", "targetBalance", "reason" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "receivable" }, "balanceType": { "type": "string", "const": "fiscalPpd" }, "customerId": { "type": "string" }, "documentRef": { "type": "string", "pattern": "^cfdi:.+$" }, "targetBalance": { "type": "number", "minimum": 0 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "kind", "balanceType", "customerId", "documentRef", "targetBalance", "reason" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "payable" }, "balanceType": { "type": "string", "const": "operational" }, "supplierId": { "type": "string" }, "documentRef": { "type": "string", "pattern": "^expense:.+$" }, "targetBalance": { "type": "number", "minimum": 0 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "kind", "balanceType", "supplierId", "documentRef", "targetBalance", "reason" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "payable" }, "balanceType": { "type": "string", "const": "fiscalPpd" }, "supplierId": { "type": "string" }, "documentRef": { "type": "string", "pattern": "^cfdi:.+$" }, "targetBalance": { "type": "number", "minimum": 0 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "kind", "balanceType", "supplierId", "documentRef", "targetBalance", "reason" ], "additionalProperties": false } ] } }, "required": [ "idempotencyKey", "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false}Output schema
JSON Schema{ "type": "object", "properties": { "data": { "anyOf": [ { "type": "object", "properties": { "previousBalance": { "type": "number" }, "previousDocumentBalance": { "type": "number" }, "adjustmentAmount": { "type": "number" }, "newBalance": { "type": "number" }, "newDocumentBalance": { "type": "number" } }, "required": [ "previousBalance", "previousDocumentBalance", "adjustmentAmount", "newBalance", "newDocumentBalance" ], "additionalProperties": false }, { "type": "object", "properties": { "previousBalance": { "type": "number" }, "previousDocumentBalance": { "type": "number" }, "adjustmentAmount": { "type": "number" }, "newBalance": { "type": "number" }, "newDocumentBalance": { "type": "number" } }, "required": [ "previousBalance", "previousDocumentBalance", "adjustmentAmount", "newBalance", "newDocumentBalance" ], "additionalProperties": false } ] }, "error": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "code": { "type": "string", "enum": [ "validation_error", "unauthenticated", "forbidden", "not_found", "method_not_allowed", "conflict", "idempotency_conflict", "operation_in_progress", "recovery_required", "rate_limited", "provider_unavailable", "internal" ] }, "message": { "type": "string" }, "details": { "type": "object", "properties": { "issues": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "path", "message" ], "additionalProperties": false } }, "retryable": { "type": "boolean" }, "retryAfterSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": [ "code", "message" ], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}Related workflow
See the canonical workflows in the introductionRelated tools
Record payment
Record money received from a customer or paid to a supplier and allocate it to open balances. Use the same idempotencyKey when retrying the exact payment.
Reschedule receivable plan
Replace the installment schedule for an unpaid receivable plan. Use the same idempotencyKey when retrying the exact schedule change.