← HomeFleetPay / MCP

Context for Your Agents.

Documents, receivables and operational information. Explore queries implemented in the core and evaluate an integration through Model Context Protocol.

01Your Agent
02Authorization
03FleetPay Query
01 / Reference

Four Queries. Useful Context.

Read queries: they do not execute Pix, TED, advances or payment releases. Data access depends on the authorized identity, permissions and company context.

Download Input Reference (JSON)

Download Output Shapes (JSON)

The output file maps data, meta and error in the reviewed JSON payloads. It distinguishes empty results from not_found and identifies unconfirmed types. It is not the server-advertised outputSchema or the MCP/JSON-RPC envelope; authorization and execution errors may use a different shape.

Document, account and payment status/type fields use numeric codes in the six reviewed enums. The JSON includes codes and technical case names in enumReferences; these names are not customer-facing labels. Values belong to the source version identified in the file.

Inherited company_cnpj and company_name parameters can resolve the company. Panel sessions pin their own company; resolution does not replace authorization. In document and receivable outputs, check company_ids_in_scope and scope_expanded: a shipper’s scope may include linked carriers and records from those carriers’ other shippers.

Extracted from versioned source code, not a live server connection. The file separates declared types from fields required during execution. Confirm the environment’s contract before generating a client.

01

Transport Documents

Find documents and track their status by company.

Tool
fleetpay_core_documents_list
Scope
read:documents.list
Parameters, Output and Limits
Parameters
company_idinteger · Optional
Authorized company ID. May be resolved from CNPJ or name; panel sessions use their pinned company. An authorized company context is required before the query.
company_cnpjstring · Optional
Alternative to the ID, with or without formatting. Identifying a company does not grant access to its data.
company_namestring · Optional
Name alternative with at least three characters. Ambiguous names require disambiguation. Priority: ID, CNPJ, name.
statusstring · Optional
Document status filter, using values accepted by the environment.
fromstring · YYYY-MM-DD · Optional
Start of the period, applied to payment_date / shipper_due_date.
tostring · YYYY-MM-DD · Optional
End of the period, applied to payment_date / shipper_due_date.
limitinteger · Optional
Items per page: default 25, maximum 100.
cursorinteger · Optional
Last item ID, used to request the next page.
Output

Document identifiers, status, amount and dates; pagination with cursor, has_more, limit and total.

Selected fields for interpreting the response; they do not replace a sandbox-validated output schema.

data[].iddata[].internal_iddata[].statusdata[].amount
Document identifier, status and amount. Document status does not replace payment evidence.
data[].sacado_payment_datedata[].sacado_due_datedata[].sacado_due_date_postponed
Debtor payment date, contractual due date and extended due date. Values may be null; the query does not calculate overdue days.
meta.pagination.cursormeta.pagination.has_moremeta.pagination.total
Use the returned cursor when has_more is true. On the last page, cursor is null. total counts documents across the full filtered scope.
meta.company_ids_in_scopemeta.scope_expandedmeta.scope_note
Companies actually included in the query. Check this scope before attributing results to a single shipper.
How to Interpret
25 items by default, up to 100 per page. payment_date and shipper_due_date represent the shipper’s due date. Actual debtor payment uses sacado_payment_date.

Input Example

Fictional identifiers. Method and parameters only; transport and authentication are confirmed during enablement. This page does not execute queries.

{
  "method": "tools/call",
  "params": {
    "name": "fleetpay_core_documents_list",
    "arguments": {
      "company_id": 101,
      "limit": 25
    }
  }
}

Empty Result Example

Synthetic data and fictional IDs. An empty list only describes the queried scope; it does not prove that no records exist outside the authorized scope. See the download for item fields, unconfirmed types and the not_found variant.

{
  "data": [],
  "meta": {
    "company_id": 101,
    "company_ids_in_scope": [
      101
    ],
    "scope_expanded": false,
    "scope_note": null,
    "field_semantics": "sacado_payment_date = dia em que o EMBARCADOR (sacado) pagou a fatura (pay_invoices.payment_date, via pay_payments SHIPPER_CARRIER_PAYMENT; null = em aberto). NÃO confunda com pay_documents.payment_date (= vencimento do embarcador, data futura) nem com pay_receivables.payment_date (= data em que o FIDC foi ressarcido). Atraso não é calculado aqui: use sacado_due_date (vencimento contratual) ou sacado_due_date_postponed (prorrogado) conforme a metodologia do score.",
    "pagination": {
      "cursor": null,
      "has_more": false,
      "limit": 25,
      "total": 0
    }
  },
  "error": null
}
02

Recorded Balances

Look up company accounts and the balance recorded in the operation.

Tool
fleetpay_core_account_balance
Scope
read:account.balance
Parameters, Output and Limits
Parameters
company_idinteger · Optional
Authorized company ID. May be resolved from CNPJ or name; panel sessions use their pinned company. An authorized company context is required before the query.
company_cnpjstring · Optional
Alternative to the ID, with or without formatting. Identifying a company does not grant access to its data.
company_namestring · Optional
Name alternative with at least three characters. Ambiguous names require disambiguation. Priority: ID, CNPJ, name.
account_idinteger · Optional
Specific account. When omitted, queries the company’s visible accounts.
Output

Account identifier and status, derived balance, persisted balance and the date of the latest available statement.

Selected fields for interpreting the response; they do not replace a sandbox-validated output schema.

data[].balancedata[].persisted_balancedata[].last_statement_at
balance uses the latest available statement balance or, if absent, persisted_balance. last_statement_at may be null; it does not represent a real-time bank update.
data[].account_iddata[].account_statusdata[].is_swap_blockedmeta.count
Identifiers and status of visible accounts. count is the number returned. An empty list does not prove that no account exists outside the authorized scope.
How to Interpret
The balance derives from the latest available statement entry, falling back to the persisted balance. This is not a real-time query to the banking provider.

Input Example

Fictional identifiers. Method and parameters only; transport and authentication are confirmed during enablement. This page does not execute queries.

{
  "method": "tools/call",
  "params": {
    "name": "fleetpay_core_account_balance",
    "arguments": {
      "company_id": 101,
      "account_id": 202
    }
  }
}

Empty Result Example

Synthetic data and fictional IDs. An empty list only describes the queried scope; it does not prove that no records exist outside the authorized scope. See the download for item fields, unconfirmed types and the not_found variant.

{
  "data": [],
  "meta": {
    "company_id": 101,
    "count": 0
  },
  "error": null
}
03

Driver Payments

Review a driver’s payment records, grouped by date.

Tool
fleetpay_core_drivers_payments_list
Scope
read:drivers.payments.list
Parameters, Output and Limits
Parameters
company_idinteger · Optional
Authorized company ID. May be resolved from CNPJ or name; panel sessions use their pinned company. An authorized company context is required before the query.
company_cnpjstring · Optional
Alternative to the ID, with or without formatting. Identifying a company does not grant access to its data.
company_namestring · Optional
Name alternative with at least three characters. Ambiguous names require disambiguation. Priority: ID, CNPJ, name.
driver_idinteger · Required
Driver user identifier.
Output

Date groups with count, total amount and payment records, including status and operational references.

Selected fields for interpreting the response; they do not replace a sandbox-validated output schema.

data[].datedata[].countdata[].total_amountdata[].payments[]
Each item groups payments by date. date may be null. The total sums records in that group; it does not mean all were settled.
data[].payments[].statusmeta.countmeta.truncated
Interpret each payment’s status. count counts payments, not groups. truncated becomes true at 200 records; it signals the query cap without proving that an additional record exists.
How to Interpret
Limited to the 200 most recent records in the selected scope. This is not a complete export. Interpret each record according to its status.

Input Example

Fictional identifiers. Method and parameters only; transport and authentication are confirmed during enablement. This page does not execute queries.

{
  "method": "tools/call",
  "params": {
    "name": "fleetpay_core_drivers_payments_list",
    "arguments": {
      "company_id": 101,
      "driver_id": 303
    }
  }
}

Empty Result Example

Synthetic data and fictional IDs. An empty list only describes the queried scope; it does not prove that no records exist outside the authorized scope. See the download for item fields, unconfirmed types and the not_found variant.

{
  "data": [],
  "meta": {
    "driver_id": 303,
    "company_id": 101,
    "count": 0,
    "truncated": false
  },
  "error": null
}
04

Receivables

Query receivables linked to company documents and totals for the period.

Tool
fleetpay_core_receivables_list
Scope
read:receivables.list
Parameters, Output and Limits
Parameters
company_idinteger · Optional
Authorized company ID. May be resolved from CNPJ or name; panel sessions use their pinned company. An authorized company context is required before the query.
company_cnpjstring · Optional
Alternative to the ID, with or without formatting. Identifying a company does not grant access to its data.
company_namestring · Optional
Name alternative with at least three characters. Ambiguous names require disambiguation. Priority: ID, CNPJ, name.
fromstring · YYYY-MM-DD · Optional
Start of the period, applied to created_at.
tostring · YYYY-MM-DD · Optional
End of the period, applied to created_at.
limitinteger · Optional
Items per page: default 25, maximum 100.
cursorinteger · Optional
Last item ID, used to request the next page.
Output

Paginated receivables and aggregate period totals: count, face value, present value and monthly breakdown.

Selected fields for interpreting the response; they do not replace a sandbox-validated output schema.

data[].valuedata[].current_valuedata[].fund_reimbursed_date
Face value, present value and fund reimbursement date. Legacy payment_date has the same meaning as fund_reimbursed_date, not debtor payment.
data[].sacado_payment_datedata[].sacado_due_datedata[].sacado_due_date_postponed
Debtor payment date, contractual due date and extended due date. Values may be null; the query does not calculate overdue days.
meta.date_basismeta.totalsmeta.totals.in_invoicemeta.totals.by_month
Totals use created_at and cover the entire period, independently of the cursor. in_invoice includes receivables with payment_id; inclusion in an invoice does not prove settlement.
meta.company_ids_in_scopemeta.scope_expandedmeta.scope_note
Companies actually included in the query. Check this scope before attributing results to a single shipper.
How to Interpret
25 items by default, up to 100 per page. Totals cover the period, not just the page. payment_date represents reimbursement to the fund; sacado_payment_date represents debtor payment.

Input Example

Fictional identifiers. Method and parameters only; transport and authentication are confirmed during enablement. This page does not execute queries.

{
  "method": "tools/call",
  "params": {
    "name": "fleetpay_core_receivables_list",
    "arguments": {
      "company_id": 101,
      "from": "2026-09-01",
      "to": "2026-09-30",
      "limit": 25
    }
  }
}

Empty Result Example

Synthetic data and fictional IDs. An empty list only describes the queried scope; it does not prove that no records exist outside the authorized scope. See the download for item fields, unconfirmed types and the not_found variant.

{
  "data": [],
  "meta": {
    "company_id": 101,
    "company_ids_in_scope": [
      101
    ],
    "scope_expanded": false,
    "scope_note": null,
    "field_semantics": "sacado_payment_date = dia em que o EMBARCADOR (sacado) pagou a fatura (pay_invoices.payment_date, via pay_payments SHIPPER_CARRIER_PAYMENT; null = em aberto). NÃO confunda com pay_documents.payment_date (= vencimento do embarcador, data futura) nem com pay_receivables.payment_date (= data em que o FIDC foi ressarcido). Atraso não é calculado aqui: use sacado_due_date (vencimento contratual) ou sacado_due_date_postponed (prorrogado) conforme a metodologia do score.",
    "pagination": {
      "cursor": null,
      "has_more": false,
      "limit": 25
    },
    "date_basis": "created_at",
    "totals": {
      "count": 0,
      "invoices_count": 0,
      "sum_value": 0,
      "sum_current_value": 0,
      "in_invoice": {
        "count": 0,
        "sum_value": 0,
        "sum_current_value": 0,
        "note": "Somente recebíveis com payment_id (já incluídos numa fatura FleetPay). É este o recorte do nível 2 do funil de originação."
      },
      "by_month": []
    }
  },
  "error": null
}
02 / Interpretation

Reading Responses and Errors

In the reviewed version, Response::json serializes the payload inside a text block in result.content. It does not create structuredContent. Reading the response requires three separate checks.

  1. JSON-RPC Error

    Check top-level error before accessing result. A protocol problem is not a query result.

  2. Tool Error

    If result.isError is true, handle the error. Its text may be a plain message; do not automatically parse it as a successful JSON payload.

  3. Payload Error

    For the reviewed JSON responses, parse the text block with error handling and check the payload error field. not_found may arrive with isError: false. An empty list with error: null is a different case.

Download Envelope Examples (JSON)

View a Synthetic not_found Example
{
  "jsonrpc": "2.0",
  "id": "example-1",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":null,\"meta\":null,\"error\":{\"code\":\"not_found\",\"message\":\"Company não encontrada.\"}}"
      }
    ],
    "isError": false
  }
}

Examples are derived from source code and use a fictional ID. They are not live calls and do not validate HTTP, OAuth, SSE or gateway responses. Confirm the contract in the authorized environment before integrating.

03 / Access

Permissions before Answers

  1. Define the Query

    Describe the agent’s purpose, required data and companies involved. The catalog above is a selection; it does not imply automatic access to all tools.

  2. Confirm Access

    Enablement defines identity, permissions and company context. Authentication or OAuth consent alone does not grant query access. Do not assume REST API credentials are compatible with MCP.

  3. Validate in the Sandbox

    Verify allowed and denied queries, limits, pagination and date interpretation. Keep credentials out of browsers, shared prompts and application logs.

Editorial reference based on core source code 368eda3. It does not establish deployment or enablement in your environment. Parameter descriptions are a summary, not a complete schema.