{
  "tools": [
    {
      "name": "prorekins_capabilities",
      "method": "capabilities",
      "description": "Discover available tools, real styles/catalogue and sanitized plan allowances; no invoice content or credentials.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": false,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_list_invoices",
      "method": "list_invoices",
      "description": "Page the selected company invoice archive. No raw PDF or filesystem paths.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "query": {
            "type": "string",
            "maxLength": 200
          },
          "status": {
            "type": "string",
            "enum": [
              "all",
              "draft",
              "open",
              "overdue",
              "paid",
              "cancelled"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "in",
              "out"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "all",
              "thisMonth",
              "lastMonth",
              "thisYear",
              "lastYear"
            ]
          },
          "partner_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_get_invoice",
      "method": "get_invoice",
      "description": "Read selected-company invoice facts, totals and validation, optionally original XML; PDF delivery is only through export_invoice.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "include_xml": {
            "type": "boolean"
          }
        },
        "required": [
          "invoice_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_calculate",
      "method": "calculate",
      "description": "Calculate exact invoice totals and findings through the real core. Never reads file paths.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "maxLength": 64
              },
              "type": {
                "type": "string",
                "enum": [
                  "380",
                  "381",
                  "386"
                ]
              },
              "number": {
                "type": "string",
                "maxLength": 100
              },
              "issue_date": {
                "type": "string",
                "maxLength": 10
              },
              "supply_date": {
                "type": "string",
                "maxLength": 10
              },
              "period": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "end": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "due_date": {
                "type": "string",
                "maxLength": 10
              },
              "currency": {
                "type": "string",
                "maxLength": 3
              },
              "tax_currency": {
                "type": "string",
                "maxLength": 3
              },
              "exchange_rate": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "tax_currency_vat": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "buyer_reference": {
                "type": "string",
                "maxLength": 256
              },
              "order_reference": {
                "type": "string",
                "maxLength": 256
              },
              "contract_reference": {
                "type": "string",
                "maxLength": 256
              },
              "preceding_invoice": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [
                  "number"
                ],
                "additionalProperties": false
              },
              "seller": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "item_code": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "item_description": {
                      "type": "string",
                      "maxLength": 100000
                    },
                    "quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "unit": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "price": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base_quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "discount": {
                      "type": "object",
                      "properties": {
                        "percent": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        },
                        "amount": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    },
                    "allowances_charges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "charge": {
                            "type": "boolean"
                          },
                          "amount": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "percent": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "base": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "reason": {
                            "type": "string",
                            "maxLength": 10000
                          },
                          "reason_code": {
                            "type": "string",
                            "maxLength": 16
                          }
                        },
                        "required": [],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "maxLength": 10
                        },
                        "end": {
                          "type": "string",
                          "maxLength": 10
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "description",
                    "quantity",
                    "unit",
                    "price",
                    "vat"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 1000
              },
              "allowances_charges": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "charge": {
                      "type": "boolean"
                    },
                    "amount": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "percent": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "reason": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "reason_code": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "prepaid": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "rounding": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100000
                },
                "maxItems": 100
              },
              "exemption_reasons": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "code": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "payment": {
                "type": "object",
                "properties": {
                  "means": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 256
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "attachments": {
                "type": "array",
                "maxItems": 0
              }
            },
            "required": [
              "issue_date",
              "seller",
              "buyer",
              "lines"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "invoice"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": false,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_validate",
      "method": "validate",
      "description": "Validate inline UTF-8 invoice XML, supplied as xml or data_base64. Paths and entity declarations are rejected.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "xml": {
            "type": "string"
          },
          "data_base64": {
            "type": "string"
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": false,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_save_draft",
      "method": "save_draft",
      "description": "Create or replace an unissued outgoing draft for the selected company after confirmation. Raw invoice attachments/file paths are refused.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "maxLength": 64
              },
              "type": {
                "type": "string",
                "enum": [
                  "380",
                  "381",
                  "386"
                ]
              },
              "number": {
                "type": "string",
                "maxLength": 100
              },
              "issue_date": {
                "type": "string",
                "maxLength": 10
              },
              "supply_date": {
                "type": "string",
                "maxLength": 10
              },
              "period": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "end": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "due_date": {
                "type": "string",
                "maxLength": 10
              },
              "currency": {
                "type": "string",
                "maxLength": 3
              },
              "tax_currency": {
                "type": "string",
                "maxLength": 3
              },
              "exchange_rate": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "tax_currency_vat": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "buyer_reference": {
                "type": "string",
                "maxLength": 256
              },
              "order_reference": {
                "type": "string",
                "maxLength": 256
              },
              "contract_reference": {
                "type": "string",
                "maxLength": 256
              },
              "preceding_invoice": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [
                  "number"
                ],
                "additionalProperties": false
              },
              "seller": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "item_code": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "item_description": {
                      "type": "string",
                      "maxLength": 100000
                    },
                    "quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "unit": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "price": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base_quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "discount": {
                      "type": "object",
                      "properties": {
                        "percent": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        },
                        "amount": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    },
                    "allowances_charges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "charge": {
                            "type": "boolean"
                          },
                          "amount": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "percent": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "base": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "reason": {
                            "type": "string",
                            "maxLength": 10000
                          },
                          "reason_code": {
                            "type": "string",
                            "maxLength": 16
                          }
                        },
                        "required": [],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "maxLength": 10
                        },
                        "end": {
                          "type": "string",
                          "maxLength": 10
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "description",
                    "quantity",
                    "unit",
                    "price",
                    "vat"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 1000
              },
              "allowances_charges": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "charge": {
                      "type": "boolean"
                    },
                    "amount": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "percent": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "reason": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "reason_code": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "prepaid": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "rounding": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100000
                },
                "maxItems": 100
              },
              "exemption_reasons": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "code": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "payment": {
                "type": "object",
                "properties": {
                  "means": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 256
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "attachments": {
                "type": "array",
                "maxItems": 0
              }
            },
            "required": [
              "issue_date",
              "seller",
              "buyer",
              "lines"
            ],
            "additionalProperties": false
          },
          "series_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "partner_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "style": {
            "type": "object",
            "properties": {
              "template": {
                "type": "string",
                "maxLength": 64
              },
              "scheme": {
                "type": "string",
                "maxLength": 64
              },
              "font": {
                "type": "string",
                "maxLength": 128
              },
              "lang": {
                "type": "string",
                "enum": [
                  "lv",
                  "en",
                  "lv-en"
                ]
              },
              "qr": {
                "type": "boolean"
              },
              "amount_words": {
                "type": "boolean"
              },
              "e_notice": {
                "type": "boolean"
              },
              "show_logo": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "invoice"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_preview",
      "method": "preview",
      "description": "Render a free PNG page for an invoice or inline draft; never returns or exports the underlying PDF.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "maxLength": 64
              },
              "type": {
                "type": "string",
                "enum": [
                  "380",
                  "381",
                  "386"
                ]
              },
              "number": {
                "type": "string",
                "maxLength": 100
              },
              "issue_date": {
                "type": "string",
                "maxLength": 10
              },
              "supply_date": {
                "type": "string",
                "maxLength": 10
              },
              "period": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "end": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "due_date": {
                "type": "string",
                "maxLength": 10
              },
              "currency": {
                "type": "string",
                "maxLength": 3
              },
              "tax_currency": {
                "type": "string",
                "maxLength": 3
              },
              "exchange_rate": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "tax_currency_vat": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "buyer_reference": {
                "type": "string",
                "maxLength": 256
              },
              "order_reference": {
                "type": "string",
                "maxLength": 256
              },
              "contract_reference": {
                "type": "string",
                "maxLength": 256
              },
              "preceding_invoice": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [
                  "number"
                ],
                "additionalProperties": false
              },
              "seller": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal",
                      "private"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 10000
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "scheme",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "iban"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "item_code": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "item_description": {
                      "type": "string",
                      "maxLength": 100000
                    },
                    "quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "unit": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "price": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base_quantity": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "discount": {
                      "type": "object",
                      "properties": {
                        "percent": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        },
                        "amount": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    },
                    "allowances_charges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "charge": {
                            "type": "boolean"
                          },
                          "amount": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "percent": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "base": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Exact decimal string; never a JSON floating point value."
                          },
                          "reason": {
                            "type": "string",
                            "maxLength": 10000
                          },
                          "reason_code": {
                            "type": "string",
                            "maxLength": 16
                          }
                        },
                        "required": [],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "maxLength": 10
                        },
                        "end": {
                          "type": "string",
                          "maxLength": 10
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "description",
                    "quantity",
                    "unit",
                    "price",
                    "vat"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 1000
              },
              "allowances_charges": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "charge": {
                      "type": "boolean"
                    },
                    "amount": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "percent": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "base": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Exact decimal string; never a JSON floating point value."
                    },
                    "reason": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "reason_code": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "vat": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "S",
                            "Z",
                            "E",
                            "O",
                            "AE",
                            "K",
                            "G"
                          ]
                        },
                        "rate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 64,
                          "description": "Exact decimal string; never a JSON floating point value."
                        }
                      },
                      "required": [
                        "category"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "prepaid": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "rounding": {
                "type": "string",
                "maxLength": 64,
                "description": "Exact decimal string; never a JSON floating point value."
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100000
                },
                "maxItems": 100
              },
              "exemption_reasons": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 10000
                    },
                    "code": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "payment": {
                "type": "object",
                "properties": {
                  "means": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 256
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "attachments": {
                "type": "array",
                "maxItems": 0
              }
            },
            "required": [
              "issue_date",
              "seller",
              "buyer",
              "lines"
            ],
            "additionalProperties": false
          },
          "style": {
            "type": "object",
            "properties": {
              "template": {
                "type": "string",
                "maxLength": 64
              },
              "scheme": {
                "type": "string",
                "maxLength": 64
              },
              "font": {
                "type": "string",
                "maxLength": 128
              },
              "lang": {
                "type": "string",
                "enum": [
                  "lv",
                  "en",
                  "lv-en"
                ]
              },
              "qr": {
                "type": "boolean"
              },
              "amount_words": {
                "type": "boolean"
              },
              "e_notice": {
                "type": "boolean"
              },
              "show_logo": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "width": {
            "type": "integer",
            "minimum": 320,
            "maximum": 1600
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_issue_invoice",
      "method": "issue_invoice",
      "description": "Ask the human to issue this saved draft. Gapless immutable numbering and actual monthly allowance apply; output may use PDF allowance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [
          "invoice_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "issue",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_export_invoice",
      "method": "export_invoice",
      "description": "Confirm delivery of original XML or newly rendered PDF/XML batch to this client. Every PDF delivery uses its normal monthly allowance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "format": {
            "type": "string",
            "enum": [
              "xml",
              "pdf",
              "both"
            ]
          },
          "style": {
            "type": "object",
            "properties": {
              "template": {
                "type": "string",
                "maxLength": 64
              },
              "scheme": {
                "type": "string",
                "maxLength": 64
              },
              "font": {
                "type": "string",
                "maxLength": 128
              },
              "lang": {
                "type": "string",
                "enum": [
                  "lv",
                  "en",
                  "lv-en"
                ]
              },
              "qr": {
                "type": "boolean"
              },
              "amount_words": {
                "type": "boolean"
              },
              "e_notice": {
                "type": "boolean"
              },
              "show_logo": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "embed_pdf": {
            "type": "boolean"
          }
        },
        "required": [
          "invoice_id",
          "format"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "export",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_delete_invoice",
      "method": "delete_invoice",
      "description": "Ask the human to remove a draft or archive entry; numbered tombstones and immutable accounting evidence are preserved.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [
          "invoice_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_set_invoice_status",
      "method": "set_invoice_status",
      "description": "Confirm an archive status update; invoice contents remain immutable.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "sent",
              "cancelled",
              "received",
              "issued"
            ]
          },
          "paid_date": {
            "type": "string",
            "maxLength": 10
          }
        },
        "required": [
          "invoice_id",
          "status"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_list_companies",
      "method": "list_companies",
      "description": "Page the own-company directory after consent; the human selects automation company in the app.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "companies",
      "x-prorekins-company": false,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_save_company",
      "method": "save_company",
      "description": "Confirm creating/updating company data. Keys/VID credentials/consent are never accepted.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "company": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "maxLength": 64,
                "description": "Existing record UUID must belong to the explicitly selected company; omit to create a record."
              },
              "party": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "legal"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "reg_no": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "vat_no": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "personal_code": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "print_personal_code": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "postal": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 2
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  },
                  "endpoint": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 128
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "bank": {
                    "type": "object",
                    "properties": {
                      "iban": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "bic": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 128
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "reg_no"
                ],
                "additionalProperties": false
              },
              "kind": {
                "type": "string",
                "enum": [
                  "legal",
                  "self_employed"
                ]
              },
              "website": {
                "type": "string",
                "maxLength": 512
              },
              "payment_term_days": {
                "type": "integer",
                "minimum": 0,
                "maximum": 365
              },
              "default_template": {
                "type": "string",
                "maxLength": 64
              },
              "default_scheme": {
                "type": "string",
                "maxLength": 64
              },
              "default_note": {
                "type": "string",
                "maxLength": 2000
              },
              "footer_note": {
                "type": "string",
                "maxLength": 2000
              },
              "bank_accounts": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Existing record UUID must belong to the explicitly selected company; omit to create a record."
                    },
                    "iban": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "bic": {
                      "type": "string",
                      "maxLength": 11
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    }
                  },
                  "required": [
                    "iban"
                  ],
                  "additionalProperties": false
                },
                "description": "Partial upserts only; no removals. Do not also supply party.bank."
              },
              "series": {
                "type": "array",
                "maxItems": 40,
                "items": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Existing record UUID must belong to the explicitly selected company; omit to create a record."
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "prefix": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "include_year": {
                      "type": "boolean"
                    },
                    "digits": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "next_number": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647,
                      "description": "Must not decrease the current counter. Issued numbers remain immutable."
                    },
                    "year_reset": {
                      "type": "boolean"
                    },
                    "is_default": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                },
                "description": "Partial upserts only; no removals. number_year is readonly and must not be supplied."
              }
            },
            "required": [
              "party"
            ],
            "additionalProperties": false,
            "description": "Bounded company configuration. Existing UUIDs must belong to selected company. Credentials, paths and consent flags are refused."
          }
        },
        "required": [
          "company"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "companies",
      "x-prorekins-company": false,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_delete_company",
      "method": "delete_company",
      "description": "Confirm removing selected own company. Existing numbered archive records remain protected.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "companies",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_list_partners",
      "method": "list_partners",
      "description": "Page the shared device partner directory after its explicit scope consent.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "query": {
            "type": "string",
            "maxLength": 200
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "partners",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_save_partner",
      "method": "save_partner",
      "description": "Confirm creating/updating a partner in the shared device directory.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "partner": {
            "type": "object"
          }
        },
        "required": [
          "partner"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "partners",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_delete_partner",
      "method": "delete_partner",
      "description": "Confirm removing a partner from the shared device directory.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "partner_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [
          "partner_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "partners",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_lookup_partner",
      "method": "lookup_partner",
      "description": "Use default-enabled, user-disableable register/VIES lookup and jurisdiction checks. Cannot change lookup settings or diagnostic permissions.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "query": {
            "type": "string",
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "maxLength": 2
          },
          "vat_no": {
            "type": "string",
            "maxLength": 32
          },
          "reg_no": {
            "type": "string",
            "maxLength": 32
          },
          "include_risks": {
            "type": "boolean",
            "description": "Only the already opted-in verified Max public financial checks; only registration number is sent."
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "x-prorekins-scope": "partners",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_settings",
      "method": "settings",
      "description": "Read safe presentation settings or confirm a bounded update. Automation/security/legal/diagnostic/lookup settings and credentials cannot be changed.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "changes": {
            "type": "object"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "settings",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_import_invoice",
      "method": "import_invoice",
      "description": "Confirm importing supplied UTF-8 XML bytes with immutable original and validation. No source paths; buyer must match selected own company.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "filename": {
            "type": "string",
            "maxLength": 255
          },
          "data_base64": {
            "type": "string"
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [
          "filename",
          "data_base64"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_vid_status",
      "method": "vid_status",
      "description": "Read sanitized selected-company VID configuration/status without credentials.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "vid",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_vid_import",
      "method": "vid_import",
      "description": "Confirm importing selected-company VID inbox within its paid allowance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "from": {
            "type": "string",
            "maxLength": 10
          },
          "to": {
            "type": "string",
            "maxLength": 10
          },
          "metadata_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "x-prorekins-scope": "vid",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_vid_send",
      "method": "vid_send",
      "description": "Ask the human to send this immutable outgoing XML to VID. Uses configured device credentials; uncertain previous sends are never blindly retried.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [
          "invoice_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "x-prorekins-scope": "vid",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_backup",
      "method": "backup",
      "description": "Confirm a portable backup scoped to the selected company and referenced partners. Every included PDF uses export allowance; secrets, consent and automation permissions are excluded.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "include_pdf": {
            "type": "boolean"
          },
          "password": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "backup",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_restore_backup",
      "method": "restore_backup",
      "description": "Confirm merge of an uploaded bounded selected-company backup. Other-company rows/references/settings and imported keys/consent/automation grants are rejected. Whole-device replace is available only in the app UI.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "filename": {
            "type": "string",
            "maxLength": 255
          },
          "data_base64": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "merge"
            ]
          },
          "password": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "required": [
          "filename",
          "data_base64",
          "mode"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "backup",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_accounting_export",
      "method": "accounting_export",
      "description": "Confirm a selected-company accountant batch using existing eligibility and actual user mappings; original XML is preserved and PDFs are counted.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Opaque record UUID",
              "maxLength": 64
            },
            "maxItems": 500
          },
          "target": {
            "type": "string",
            "enum": [
              "csv",
              "xml",
              "jumis",
              "zalktis",
              "horizon"
            ]
          },
          "include_pdf": {
            "type": "boolean"
          },
          "profile": {
            "type": "object"
          }
        },
        "required": [
          "invoice_ids",
          "target"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "export",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_request_plans",
      "method": "request_plans",
      "description": "Only show normal plan options inside the app. Agents cannot pay, provide proofs, accept terms or redeem billing data automatically.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "plans",
      "x-prorekins-company": false,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_read_artifact",
      "method": "read_artifact",
      "description": "Read this session authorized export as base64 pages up to 256KiB; arbitrary paths and other sessions are unavailable. Artifacts expire on revocation or after10minutes.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "artifact_id": {
            "type": "string",
            "maxLength": 64
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 67108864
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 262144
          }
        },
        "required": [
          "artifact_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "export",
      "x-prorekins-company": false,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_preview_incoming_batch",
      "method": "preview_incoming_batch",
      "description": "Review up to 25 incoming XML invoices for the selected company and identify invalid files and duplicates. Each file is at most 16 MiB and the batch is at most 64 MiB.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "maxLength": 255
                },
                "data_base64": {
                  "type": "string",
                  "maxLength": 22369624
                }
              },
              "required": [
                "filename",
                "data_base64"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 25
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_archive_incoming_batch",
      "method": "archive_incoming_batch",
      "description": "Confirm and archive validated incoming XML addressed to the selected company. Original XML is preserved and duplicate files are skipped.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "maxLength": 255
                },
                "data_base64": {
                  "type": "string",
                  "maxLength": 22369624
                }
              },
              "required": [
                "filename",
                "data_base64"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 25
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_list_quotes",
      "method": "list_quotes",
      "description": "Page quotes for the selected company, including the linked draft for converted quotes.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_convert_quote",
      "method": "convert_quote",
      "description": "Confirm conversion of an accepted quote into one editable invoice draft. Repeated conversion returns the same invoice ID.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "quote_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [
          "quote_id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_receivables",
      "method": "receivables",
      "description": "Read paged outstanding outgoing invoices and exact totals by currency and aging bucket for the selected company.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_list_bank_transfers",
      "method": "list_bank_transfers",
      "description": "Read the selected company bank reconciliation inbox or inspect one transfer and its eligible invoices. Bank descriptions and account details are omitted.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "transfer_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_allocate_bank_transfer",
      "method": "allocate_bank_transfer",
      "description": "Confirm replacing all allocations of a selected-company transfer. Pass an empty list to remove its allocations.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "transfer_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Opaque record UUID",
                  "maxLength": 64
                },
                "amount": {
                  "type": "string",
                  "maxLength": 32
                }
              },
              "required": [
                "invoice_id",
                "amount"
              ],
              "additionalProperties": false
            },
            "maxItems": 25
          }
        },
        "required": [
          "transfer_id",
          "allocations"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_record_payment",
      "method": "record_payment",
      "description": "Confirm a manual payment against a selected-company invoice using its current outstanding balance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "amount": {
            "type": "string",
            "maxLength": 32
          },
          "currency": {
            "type": "string",
            "maxLength": 3
          },
          "payment_date": {
            "type": "string",
            "maxLength": 10
          }
        },
        "required": [
          "invoice_id",
          "amount",
          "currency",
          "payment_date"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_record_delivery_evidence",
      "method": "record_delivery_evidence",
      "description": "Confirm recording evidence of a completed external delivery. This updates the local archive.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "invoice_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "eaddress",
              "peppol",
              "other"
            ]
          },
          "reference": {
            "type": "string",
            "maxLength": 180
          },
          "delivered_on": {
            "type": "string",
            "maxLength": 10
          }
        },
        "required": [
          "invoice_id",
          "channel",
          "reference",
          "delivered_on"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "draft",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_month_end_review",
      "method": "month_end_review",
      "description": "Review a Pro or Max month-end package, including totals, missing source files, and unresolved items. Review spends no PDF allowance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "from": {
            "type": "string",
            "maxLength": 10
          },
          "to": {
            "type": "string",
            "maxLength": 10
          },
          "include_pdf": {
            "type": "boolean"
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "read",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    },
    {
      "name": "prorekins_month_end_export",
      "method": "month_end_export",
      "description": "Confirm delivery of a Pro or Max month-end ZIP with a manifest and original XML. Included PDFs use the normal allowance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "from": {
            "type": "string",
            "maxLength": 10
          },
          "to": {
            "type": "string",
            "maxLength": 10
          },
          "include_pdf": {
            "type": "boolean"
          },
          "lang": {
            "type": "string",
            "enum": [
              "lv",
              "en"
            ]
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "x-prorekins-scope": "export",
      "x-prorekins-company": true,
      "x-prorekins-mutating": true
    },
    {
      "name": "prorekins_verify_backup",
      "method": "verify_backup",
      "description": "Check integrity and recoverable coverage of a selected-company portable backup without merging it into the archive.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "description": "Opaque record UUID",
            "maxLength": 64
          },
          "filename": {
            "type": "string",
            "maxLength": 255
          },
          "data_base64": {
            "type": "string",
            "maxLength": 44739244
          },
          "password": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "required": [
          "filename",
          "data_base64"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "x-prorekins-scope": "backup",
      "x-prorekins-company": true,
      "x-prorekins-mutating": false
    }
  ]
}
