{
  "sourceRepository": "FleetPayLLC/core",
  "sourceCommit": "368eda327e1573949322035b6c131d540fddd20d",
  "status": "editorial-execute-payload-shapes-not-advertised-output-schema",
  "sources": [
    {
      "path": "src/app/Mcp/Tools/BaseSupervisorTool.php",
      "sha256": "4a05365a7479f5b86e8074b1a2f3ba16f192015c923588185e6a25c8c772ae81"
    },
    {
      "path": "src/app/Mcp/Tools/Concerns/ResolvesCompany.php",
      "sha256": "7e59b36cf5c2db88b11cf56780fa836b6e3cf418b6a9c8a84f1beb811c1af3ee"
    },
    {
      "path": "src/app/Models/Traits/TenantRepositoryTrait.php",
      "sha256": "5c2f29528e2f27554219d51d5bf9e9a0e006d64031913e2bcde45d1b74c2ac7d"
    },
    {
      "path": "src/app/Models/Traits/TableCustomNameTrait.php",
      "sha256": "1fc609cc78d88412834cd5167b8727898a8df478cfc54948e21060b328cb07d9"
    },
    {
      "path": "src/app/Models/Traits/RepositoryTrait.php",
      "sha256": "1755945929819dc32c74ca95b5f584b78fa1c91596871236a31b8aa1b8281ab9"
    },
    {
      "path": "src/Illuminate/Database/Eloquent/Model.php",
      "sha256": "8186c638799dc3441a42e996a6af5ebe138eb67f6e7d0f88bfec98e498f6345b",
      "repository": "laravel/framework",
      "commit": "cdd8b33c246719acdd118c705ce8c7ab5ef48a96"
    },
    {
      "path": "src/Illuminate/Database/Eloquent/Factories/HasFactory.php",
      "sha256": "b6cb2b164e90168e80963a5549541f5f3188a3ec8cfd368bf3611bd94fbd46a7",
      "repository": "laravel/framework",
      "commit": "cdd8b33c246719acdd118c705ce8c7ab5ef48a96"
    },
    {
      "path": "src/Traits/LogsActivity.php",
      "sha256": "405d0dcd20bf1b8ce7c5365c9f79b4a46a0e29b75a8e796eecd9a0ca8c766b62",
      "repository": "spatie/laravel-activitylog",
      "commit": "2a2024fcac05628b0d1bfdbb1b94dda8b0661dc0"
    },
    {
      "path": "src/app/Enums/AccountStatusEnum.php",
      "sha256": "f071ace867550c8a6ed1cc9e90e6c97032787d4007a95be84c701f89e75ac947"
    },
    {
      "path": "src/app/Enums/AccountTypeEnum.php",
      "sha256": "7183e663839247e6c008aa460b6e4740384b36166a4f486c5bee210516992f3b"
    },
    {
      "path": "src/app/Enums/HostBankEnum.php",
      "sha256": "b70342fcf874bcd2606dffe18304679e6da4ddabfb0a86cb9fee0c9213ab936f"
    },
    {
      "path": "src/app/Enums/Payments/DocumentStatusEnum.php",
      "sha256": "2e9ee000da58b1e44e91226ea1d052979f6220be8ece574b6446a167a384861d"
    },
    {
      "path": "src/app/Enums/Payments/PaymentStatusEnum.php",
      "sha256": "0cd8617d05655f1d8e6ad617b8eea171c2c981f3bca5b7cb08b0afad0066cbd3"
    },
    {
      "path": "src/app/Enums/Payments/PaymentTypeEnum.php",
      "sha256": "bcb8b65ea4a549ddceb6c0d79e8851e2f909e48da1c192b10ff7bbde53766f3b"
    },
    {
      "path": "src/composer.lock",
      "sha256": "2fa0ceabd9d4a93f3f6caf9dad7fbb3d6a2e9875e1328fda35e7e0d7b9cf8432"
    },
    {
      "path": "src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php",
      "repository": "laravel/framework",
      "commit": "cdd8b33c246719acdd118c705ce8c7ab5ef48a96",
      "sha256": "1cabf1764355b8a8a6ac7c26c11d6826252e035c51cf77d678f0e16a1c4f06b5"
    },
    {
      "path": "src/app/Mcp/Tools/Documents/ListDocumentsTool.php",
      "sha256": "7ccf96ad6e097cf68cd52ad79d57967139d116468d4e1d36d94b8ba9947dc0e9"
    },
    {
      "path": "src/app/Mcp/Tools/Account/GetAccountBalanceTool.php",
      "sha256": "bf3513daafb6a77196e7f7c4161eeac18c25eeed0174dd4b7126e3599bc0550a"
    },
    {
      "path": "src/app/Mcp/Tools/Drivers/GetDriverPaymentsTool.php",
      "sha256": "3f3a0cec1f41fe6495f27408cbcb72137ba6fddd9be46138cb39af99fffc9ff6"
    },
    {
      "path": "src/app/Mcp/Tools/Receivables/ListReceivablesTool.php",
      "sha256": "c146d4664d4bafff993812fea6beb48368810ffdae9d5889208ab5b64719195e"
    },
    {
      "path": "src/app/Services/Mcp/SacadoSettlementQuery.php",
      "sha256": "64b649918eb3b645621594147248b8776560f8d3ede327b8eb3640860baa19ac"
    },
    {
      "path": "src/app/Models/Account.php",
      "sha256": "fca21a8bc0d4245fe05d9de06049128e3e586eb2516bdf8d08dfa9085cf7c636"
    },
    {
      "path": "src/app/Models/Payments/Document.php",
      "sha256": "bcd529fc55b3a1f19892601bc0e60f8bb6066bce99abe17d576e627b06c6b808"
    },
    {
      "path": "src/app/Models/Payments/Payment.php",
      "sha256": "ae0674e45b5eff43d1a0fb37d68f0e153d966a8223577e2b889e4cea0e48693e"
    },
    {
      "path": "src/app/Models/Payments/Receivable.php",
      "sha256": "164478733e238f85c87bbe850827babb8bcc80721d85945fe208b517b24fd09d"
    },
    {
      "path": "src/app/Mcp/Tools/Concerns/ScopesDriverToCompany.php",
      "sha256": "fad40245310cf444dd1cfdd1b1916b40a2da70a2b086503942ea882e46fa0b68"
    }
  ],
  "enumReferences": [
    {
      "name": "AccountStatusEnum",
      "source": "src/app/Enums/AccountStatusEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "CREATED",
          "value": 1
        },
        {
          "name": "IN_ANALYSIS",
          "value": 2
        },
        {
          "name": "APPROVED",
          "value": 3
        },
        {
          "name": "REPROVED",
          "value": 4
        },
        {
          "name": "CLOSED",
          "value": 5
        }
      ]
    },
    {
      "name": "AccountTypeEnum",
      "source": "src/app/Enums/AccountTypeEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "LINKED",
          "value": 1
        },
        {
          "name": "OPERATION",
          "value": 2
        },
        {
          "name": "FEE",
          "value": 3
        },
        {
          "name": "DEBENTURE",
          "value": 4
        },
        {
          "name": "EXTERNAL",
          "value": 5
        },
        {
          "name": "TOLL_VPO",
          "value": 6
        },
        {
          "name": "VIRTUAL",
          "value": 128
        }
      ]
    },
    {
      "name": "HostBankEnum",
      "source": "src/app/Enums/HostBankEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "STARKBANK",
          "value": 1
        },
        {
          "name": "SWAP",
          "value": 2
        },
        {
          "name": "NONE",
          "value": 3
        },
        {
          "name": "EXTERNAL",
          "value": 99
        }
      ]
    },
    {
      "name": "DocumentStatusEnum",
      "source": "src/app/Enums/Payments/DocumentStatusEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "AWAITING",
          "value": 1
        },
        {
          "name": "RECEIVABLE",
          "value": 2
        },
        {
          "name": "PICKED",
          "value": 3
        },
        {
          "name": "EXPIRED",
          "value": 4
        },
        {
          "name": "PAYMENT_BLOCKED",
          "value": 7
        },
        {
          "name": "INVALID_DOCUMENT",
          "value": 8
        },
        {
          "name": "PAID",
          "value": 9
        },
        {
          "name": "SETTLED",
          "value": 10
        }
      ]
    },
    {
      "name": "PaymentStatusEnum",
      "source": "src/app/Enums/Payments/PaymentStatusEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "AWAITING",
          "value": 1
        },
        {
          "name": "BORROWED",
          "value": 2
        },
        {
          "name": "TRANSACTIONS_GENERATED",
          "value": 3
        },
        {
          "name": "PAID",
          "value": 4
        },
        {
          "name": "DUPLICATE",
          "value": 5
        },
        {
          "name": "INVALID",
          "value": 256
        },
        {
          "name": "ERROR_1406",
          "value": 128
        },
        {
          "name": "PAYMENT_BLOCKED",
          "value": 6
        }
      ]
    },
    {
      "name": "PaymentTypeEnum",
      "source": "src/app/Enums/Payments/PaymentTypeEnum.php",
      "backingType": "integer",
      "values": [
        {
          "name": "SHIPPER_CARRIER_PAYMENT",
          "value": 1
        },
        {
          "name": "SERVICE",
          "value": 2
        },
        {
          "name": "DRIVER_LOAN_RECEIVED",
          "value": 3
        },
        {
          "name": "DRIVER_CARRIER_REDIRECT",
          "value": 4
        },
        {
          "name": "CARRIER_LOAN_RECEIVED",
          "value": 5
        },
        {
          "name": "CARRIER_FUND_REDIRECT",
          "value": 6
        },
        {
          "name": "FLEETPAY_LOAN_FEE",
          "value": 7
        },
        {
          "name": "SHIPPER_REBATE_PAYMENT",
          "value": 8
        },
        {
          "name": "FLEETPAY_LICENSING_FEE",
          "value": 9
        },
        {
          "name": "CARRIER_REBATE_PAYMENT",
          "value": 10
        },
        {
          "name": "DRIVER_FACTORING_FEE",
          "value": 11
        },
        {
          "name": "CARRIER_FACTORING_PAYMENT",
          "value": 12
        },
        {
          "name": "CARRIER_PROFIT",
          "value": 30
        },
        {
          "name": "CARRIER_DOCUMENT_PAYMENT",
          "value": 80
        },
        {
          "name": "SHIPPER_CARRIER_REDIRECT",
          "value": 14
        },
        {
          "name": "SHIPPER_DEBIT_NOTE",
          "value": 15
        },
        {
          "name": "CARRIER_DEBIT_NOTE",
          "value": 16
        },
        {
          "name": "CARRIER_FUND_INTEREST",
          "value": 13
        },
        {
          "name": "CARRIER_DISCOUNT_REBATE",
          "value": 17
        },
        {
          "name": "DRIVER_LICENSING_FEE",
          "value": 18
        },
        {
          "name": "DUPLICATE",
          "value": 256
        },
        {
          "name": "DRIVER_INTEREST_PAYMENT",
          "value": 50
        },
        {
          "name": "CARRIER_INTEREST_PAYMENT",
          "value": 60
        }
      ]
    }
  ],
  "notes": [
    "Documents the JSON payload passed to Response::json in four reviewed execute implementations, not the JSON-RPC/MCP result envelope or a tools/list outputSchema.",
    "Covers successful payloads (including empty results) and explicit not_found payloads. Response::error, inherited resolution/authorization failures, exceptions and transport errors are outside these shapes.",
    "All mapped fields are required in the reviewed branch; nullable is distinct from omitted. Uncast model/database values remain unconstrained and are listed in unresolvedTypes. Six nullable integer enums are constrained to backed values in the pinned snapshot; enumReferences preserves source case names without claiming customer-facing labels. Additional properties are permitted for forward compatibility.",
    "Primary IDs in the four reviewed models inherit the Eloquent integer key cast; their mapped output fields and the two ID-based pagination cursors allow integer or null. This is source-level evidence, not a database integrity guarantee. Foreign keys and other uncast attributes remain unverified; do not infer their types from the primary key cast.",
    "Date-like values are documented as strings, not format-validated dates; settlement helpers truncate source strings. Do not generate a strict client until concrete types and envelopes are verified in the target sandbox.",
    "Examples are synthetic empty datasets with fictional company/driver IDs, not captured customer records. No endpoint, credentials or external availability are asserted."
  ],
  "tools": [
    {
      "id": "documents",
      "name": "fleetpay_core_documents_list",
      "source": "src/app/Mcp/Tools/Documents/ListDocumentsTool.php",
      "payloadShape": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "internal_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "company_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "service_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "status": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "enum": [
                        1,
                        2,
                        3,
                        4,
                        7,
                        8,
                        9,
                        10,
                        null
                      ],
                      "description": "Backed values of DocumentStatusEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                    },
                    "amount": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "payment_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shipper_due_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_payment_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_due_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_due_date_postponed": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_invoice_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "sacado_invoice_payment_status_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "internal_id",
                    "company_id",
                    "service_id",
                    "status",
                    "amount",
                    "payment_date",
                    "shipper_due_date",
                    "sacado_payment_date",
                    "sacado_due_date",
                    "sacado_due_date_postponed",
                    "sacado_invoice_id",
                    "sacado_invoice_payment_status_id"
                  ],
                  "additionalProperties": true
                }
              },
              "meta": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "integer"
                  },
                  "company_ids_in_scope": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "scope_expanded": {
                    "type": "boolean"
                  },
                  "scope_note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "field_semantics": {
                    "type": "string"
                  },
                  "pagination": {
                    "type": "object",
                    "properties": {
                      "cursor": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "has_more": {
                        "type": "boolean"
                      },
                      "limit": {
                        "type": "integer",
                        "maximum": 100
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cursor",
                      "has_more",
                      "limit",
                      "total"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "company_id",
                  "company_ids_in_scope",
                  "scope_expanded",
                  "scope_note",
                  "field_semantics",
                  "pagination"
                ],
                "additionalProperties": true
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "null"
              },
              "meta": {
                "type": "null"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "const": "not_found"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          }
        ]
      },
      "unresolvedTypes": [
        "data[].internal_id",
        "data[].company_id",
        "data[].service_id"
      ],
      "examples": {
        "emptySuccess": {
          "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
        },
        "notFound": {
          "data": null,
          "meta": null,
          "error": {
            "code": "not_found",
            "message": "Company não encontrada."
          }
        }
      }
    },
    {
      "id": "balances",
      "name": "fleetpay_core_account_balance",
      "source": "src/app/Mcp/Tools/Account/GetAccountBalanceTool.php",
      "payloadShape": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "name": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "kyc_status": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "driver_user_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "company_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "bank_branch": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "bank_account_number": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "account_status": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "enum": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        null
                      ],
                      "description": "Backed values of AccountStatusEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                    },
                    "account_type": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "enum": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        128,
                        null
                      ],
                      "description": "Backed values of AccountTypeEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                    },
                    "host_bank": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "enum": [
                        1,
                        2,
                        3,
                        99,
                        null
                      ],
                      "description": "Backed values of HostBankEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                    },
                    "balance": {
                      "type": "number"
                    },
                    "persisted_balance": {
                      "type": "number"
                    },
                    "is_swap_blocked": {
                      "type": "boolean"
                    },
                    "last_statement_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "account_id",
                    "name",
                    "kyc_status",
                    "driver_user_id",
                    "company_id",
                    "bank_branch",
                    "bank_account_number",
                    "account_status",
                    "account_type",
                    "host_bank",
                    "balance",
                    "persisted_balance",
                    "is_swap_blocked",
                    "last_statement_at",
                    "updated_at"
                  ],
                  "additionalProperties": true
                }
              },
              "meta": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "integer"
                  },
                  "count": {
                    "type": "integer"
                  }
                },
                "required": [
                  "company_id",
                  "count"
                ],
                "additionalProperties": true
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "null"
              },
              "meta": {
                "type": "null"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "const": "not_found"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          }
        ]
      },
      "unresolvedTypes": [
        "data[].name",
        "data[].kyc_status",
        "data[].driver_user_id",
        "data[].company_id",
        "data[].bank_branch",
        "data[].bank_account_number"
      ],
      "examples": {
        "emptySuccess": {
          "data": [],
          "meta": {
            "company_id": 101,
            "count": 0
          },
          "error": null
        },
        "notFound": {
          "data": null,
          "meta": null,
          "error": {
            "code": "not_found",
            "message": "Company não encontrada."
          }
        }
      }
    },
    {
      "id": "driver-payments",
      "name": "fleetpay_core_drivers_payments_list",
      "source": "src/app/Mcp/Tools/Drivers/GetDriverPaymentsTool.php",
      "payloadShape": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "count": {
                      "type": "integer"
                    },
                    "total_amount": {
                      "type": "number"
                    },
                    "payments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "service_id": {
                            "x-type-review": "unverified-model-or-database-value"
                          },
                          "document_id": {
                            "x-type-review": "unverified-model-or-database-value"
                          },
                          "invoice_id": {
                            "x-type-review": "unverified-model-or-database-value"
                          },
                          "factoring_id": {
                            "x-type-review": "unverified-model-or-database-value"
                          },
                          "status": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              256,
                              128,
                              6,
                              null
                            ],
                            "description": "Backed values of PaymentStatusEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                          },
                          "type": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              6,
                              7,
                              8,
                              9,
                              10,
                              11,
                              12,
                              30,
                              80,
                              14,
                              15,
                              16,
                              13,
                              17,
                              18,
                              256,
                              50,
                              60,
                              null
                            ],
                            "description": "Backed values of PaymentTypeEnum in the pinned source snapshot. Null is preserved. See enumReferences for source case names; these are not customer-facing status labels."
                          },
                          "display_id": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "service_id",
                          "document_id",
                          "invoice_id",
                          "factoring_id",
                          "status",
                          "type",
                          "display_id",
                          "amount"
                        ],
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "date",
                    "count",
                    "total_amount",
                    "payments"
                  ],
                  "additionalProperties": true
                }
              },
              "meta": {
                "type": "object",
                "properties": {
                  "driver_id": {
                    "type": "integer"
                  },
                  "company_id": {
                    "type": "integer"
                  },
                  "count": {
                    "type": "integer"
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "driver_id",
                  "company_id",
                  "count",
                  "truncated"
                ],
                "additionalProperties": true
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "null"
              },
              "meta": {
                "type": "null"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "const": "not_found"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          }
        ]
      },
      "unresolvedTypes": [
        "data[].payments[].service_id",
        "data[].payments[].document_id",
        "data[].payments[].invoice_id",
        "data[].payments[].factoring_id"
      ],
      "examples": {
        "emptySuccess": {
          "data": [],
          "meta": {
            "driver_id": 303,
            "company_id": 101,
            "count": 0,
            "truncated": false
          },
          "error": null
        },
        "notFound": {
          "data": null,
          "meta": null,
          "error": {
            "code": "not_found",
            "message": "Company não encontrada."
          }
        }
      }
    },
    {
      "id": "receivables",
      "name": "fleetpay_core_receivables_list",
      "source": "src/app/Mcp/Tools/Receivables/ListReceivablesTool.php",
      "payloadShape": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "document_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "payment_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "debenture_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "holder_company_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "carrier_company_id": {
                      "x-type-review": "unverified-model-or-database-value"
                    },
                    "value": {
                      "type": "number"
                    },
                    "current_value": {
                      "type": "number"
                    },
                    "date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "due_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payment_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fund_reimbursed_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_payment_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_due_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_due_date_postponed": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sacado_invoice_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "sacado_invoice_payment_status_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "document_id",
                    "payment_id",
                    "debenture_id",
                    "holder_company_id",
                    "carrier_company_id",
                    "value",
                    "current_value",
                    "date",
                    "due_date",
                    "payment_date",
                    "fund_reimbursed_date",
                    "sacado_payment_date",
                    "sacado_due_date",
                    "sacado_due_date_postponed",
                    "sacado_invoice_id",
                    "sacado_invoice_payment_status_id",
                    "created_at"
                  ],
                  "additionalProperties": true
                }
              },
              "meta": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "integer"
                  },
                  "company_ids_in_scope": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "scope_expanded": {
                    "type": "boolean"
                  },
                  "scope_note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "field_semantics": {
                    "type": "string"
                  },
                  "pagination": {
                    "type": "object",
                    "properties": {
                      "cursor": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "has_more": {
                        "type": "boolean"
                      },
                      "limit": {
                        "type": "integer",
                        "maximum": 100
                      }
                    },
                    "required": [
                      "cursor",
                      "has_more",
                      "limit"
                    ],
                    "additionalProperties": true
                  },
                  "date_basis": {
                    "const": "created_at"
                  },
                  "totals": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "invoices_count": {
                        "type": "integer"
                      },
                      "sum_value": {
                        "type": "number"
                      },
                      "sum_current_value": {
                        "type": "number"
                      },
                      "in_invoice": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer"
                          },
                          "sum_value": {
                            "type": "number"
                          },
                          "sum_current_value": {
                            "type": "number"
                          },
                          "note": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "count",
                          "sum_value",
                          "sum_current_value",
                          "note"
                        ],
                        "additionalProperties": true
                      },
                      "by_month": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "period": {
                              "type": "string"
                            },
                            "count": {
                              "type": "integer"
                            },
                            "invoices_count": {
                              "type": "integer"
                            },
                            "sum_value": {
                              "type": "number"
                            },
                            "sum_current_value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "period",
                            "count",
                            "invoices_count",
                            "sum_value",
                            "sum_current_value"
                          ],
                          "additionalProperties": true
                        }
                      }
                    },
                    "required": [
                      "count",
                      "invoices_count",
                      "sum_value",
                      "sum_current_value",
                      "in_invoice",
                      "by_month"
                    ],
                    "additionalProperties": true
                  }
                },
                "required": [
                  "company_id",
                  "company_ids_in_scope",
                  "scope_expanded",
                  "scope_note",
                  "field_semantics",
                  "pagination",
                  "date_basis",
                  "totals"
                ],
                "additionalProperties": true
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "null"
              },
              "meta": {
                "type": "null"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "const": "not_found"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "data",
              "meta",
              "error"
            ],
            "additionalProperties": true
          }
        ]
      },
      "unresolvedTypes": [
        "data[].document_id",
        "data[].payment_id",
        "data[].debenture_id",
        "data[].holder_company_id",
        "data[].carrier_company_id"
      ],
      "examples": {
        "emptySuccess": {
          "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
        },
        "notFound": {
          "data": null,
          "meta": null,
          "error": {
            "code": "not_found",
            "message": "Company não encontrada."
          }
        }
      }
    }
  ]
}
