{
  "name": "Solarium",
  "description": "Bookkeeping for Canadian owner-operators, run by their AI and by text.",
  "website": "https://trysolarium.com/",
  "docs": "https://trysolarium.com/llms.txt",
  "server": {
    "url": "https://mcp.trysolarium.com/mcp",
    "transport": "streamable-http",
    "auth": "OAuth 2.1. The user signs in and picks look-only or look-and-change access."
  },
  "notes": [
    "Tools with access \"look\" only read. A look-only connection can call only these. A change tool asks the user for change access first.",
    "Tools with changesBooks true preview by default. Call them again with apply: true only after the user confirms.",
    "The other change tools (export_everything, send_feedback, send_year_end_package, sync_bank_feeds, sync_quickbooks, sync_stripe, test_send_invoice) run right away, with no preview.",
    "reachesQuickBooks marks tools that read or write the user's QuickBooks Online company.",
    "The live list after sign-in can differ a little. A connection to several businesses adds list_organizations and an organization_id argument. tools/list on the server is the source of truth."
  ],
  "tools": [
    {
      "name": "attach_receipt_to_event",
      "title": "Attach Receipt To Transaction",
      "description": "Attach an existing unmatched receipt to an already-booked event (moves it — no duplicate receipt row). If the event is in QuickBooks, the document is pushed as an attachable after commit.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_id",
          "event_id"
        ]
      }
    },
    {
      "name": "attach_receipt_to_qbo_entity",
      "title": "Attach Receipt To QuickBooks Entity",
      "description": "Attach a receipt's file to a QuickBooks transaction that isn't in Solarium as an event, like a bill the client entered in QuickBooks themselves. Use find_qbo_matches to find it. Only the file is added: the QuickBooks transaction itself isn't changed. Previews by default: pass apply=true to upload it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "entity": {
            "type": "string",
            "enum": [
              "Bill",
              "Purchase",
              "VendorCredit",
              "Deposit",
              "JournalEntry",
              "SalesReceipt"
            ]
          },
          "qb_id": {
            "type": "string",
            "description": "The QuickBooks transaction id."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_id",
          "entity",
          "qb_id"
        ]
      }
    },
    {
      "name": "audit_qbo_totals",
      "title": "Audit QuickBooks Totals",
      "description": "List synced transactions whose QuickBooks total or sales tax differs from the books, between two dates (default the last 90 days), largest first, with the difference per payment account (a card or bank). Also lists any that are gone from QuickBooks. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date"
          },
          "until": {
            "type": "string",
            "format": "date"
          },
          "limit": {
            "type": "integer",
            "description": "How many to list. Default 100."
          }
        }
      }
    },
    {
      "name": "bill_payment_matches",
      "title": "Bill Payment Matches",
      "description": "Bank and card withdrawals still in review that could have paid a bill: in the bill's currency, from its date to 60 days after, for what's still owed or the whole bill. Also withdrawals that pay it together with others of the vendor's open bills (up to 5, oldest first). Exact balance first, then names like the vendor's. Pass one's event_id to record_bill_payment as source_event_id (with its bill_ids for several bills). Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "bill_id": {
            "type": "string",
            "description": "Its Solarium event id or QuickBooks Bill Id."
          }
        },
        "required": [
          "bill_id"
        ]
      }
    },
    {
      "name": "book_deduction",
      "title": "Book Deduction",
      "description": "Book a retailer/distributor deduction: DR expense line(s) / CR the clearing account. From an existing pre-confirm event, an unmatched receipt (promoted first), or new (merchant + txn_date).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "clearing_account_id": {
            "type": "string"
          },
          "expense_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "account_id",
                "amount"
              ]
            }
          },
          "source_event_id": {
            "type": "string"
          },
          "source_receipt_id": {
            "type": "string"
          },
          "merchant": {
            "type": "string"
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "type": "string"
          },
          "check_qbo": {
            "type": "boolean"
          },
          "dedup_key": {
            "type": "string"
          },
          "push": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "clearing_account_id",
          "expense_lines"
        ]
      }
    },
    {
      "name": "book_invoice",
      "title": "Book Invoice",
      "description": "Book a customer invoice: DR A/R (gross, that customer) / CR revenue (net) / CR sales tax.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "ar_account_id": {
            "type": "string"
          },
          "revenue_account_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "net": {
            "type": "string"
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                },
                "sales_tax_code": {
                  "type": "string",
                  "description": "e.g. hst, gst, pst, qst (lowercase)"
                }
              },
              "required": [
                "account_id",
                "amount",
                "sales_tax_code"
              ]
            }
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "reference": {
            "type": "string",
            "description": "Invoice number / memo (also the dedup key)"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "ar_account_id",
          "revenue_account_id",
          "contact_id",
          "net",
          "txn_date",
          "reference"
        ]
      }
    },
    {
      "name": "book_journal_entry",
      "title": "Book Journal Entry",
      "description": "Post a journal entry with any number of lines (book_reclass does two): each line a category_id with a debit or a credit, which must balance. Like a Shopify month's discounts, returns, shipping and tax in one entry. Sent to QuickBooks as a journal entry and read back unless push is false. Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category_id": {
                  "type": "string"
                },
                "debit": {
                  "type": "string"
                },
                "credit": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "category_id"
              ]
            }
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "memo": {
            "type": "string"
          },
          "dedup_key": {
            "type": "string"
          },
          "push": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "lines",
          "txn_date",
          "memo"
        ]
      }
    },
    {
      "name": "book_processor_income",
      "title": "Book Processor Income",
      "description": "Book income received through a payment processor (e.g. PayPal) with its fee split out: CR revenue (gross) / DR fees / DR processor (net). Foreign currency uses the processor's own converted amounts.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "revenue_account_id": {
            "type": "string"
          },
          "fee_account_id": {
            "type": "string"
          },
          "processor_account_id": {
            "type": "string"
          },
          "gross": {
            "type": "string",
            "description": "Gross in the org's functional currency"
          },
          "fee": {
            "type": "string",
            "description": "Fee in the org's functional currency"
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "payer": {
            "type": "string"
          },
          "processor_txn_id": {
            "type": "string",
            "description": "The processor's transaction id (dedup key)"
          },
          "original_currency": {
            "type": "string"
          },
          "original_gross": {
            "type": "string"
          },
          "check_qbo": {
            "type": "boolean"
          },
          "push": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "revenue_account_id",
          "fee_account_id",
          "processor_account_id",
          "gross",
          "fee",
          "txn_date",
          "payer",
          "processor_txn_id"
        ]
      }
    },
    {
      "name": "book_receipt",
      "title": "Book Receipt",
      "description": "Book a receipt in one call: make it a transaction, set its category and card (defaults to the card read off the receipt), tax (tax_amount, or tax_included to work it out at your rate), and a note. It stays in review unless confirm is true, which also runs confirm_event's QuickBooks checks. A receipt whose currency only the store address suggests (a US store) is staged in that currency and stays in review even with confirm. A slip that says the payment was declined is refused.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "category_id": {
            "type": "string"
          },
          "payment_account_id": {
            "type": "string"
          },
          "tax_amount": {
            "type": "string"
          },
          "tax_included": {
            "type": "boolean",
            "description": "The total includes sales tax at the standard rate"
          },
          "tax_code": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "description": "Kept as the memo, which QuickBooks shows too."
          },
          "confirm": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_id",
          "category_id"
        ]
      }
    },
    {
      "name": "book_reclass",
      "title": "Book Reclass",
      "description": "Reclassify an amount: DR to_account / CR from_account, posted as a journal entry.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "from_account_id": {
            "type": "string",
            "description": "Account credited (amount moves out)"
          },
          "to_account_id": {
            "type": "string",
            "description": "Account debited (amount moves in)"
          },
          "amount": {
            "type": "string"
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "memo": {
            "type": "string"
          },
          "dedup_key": {
            "type": "string"
          },
          "push": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "from_account_id",
          "to_account_id",
          "amount",
          "txn_date",
          "memo"
        ]
      }
    },
    {
      "name": "book_remittance",
      "title": "Book Remittance",
      "description": "Book a retailer/distributor remittance: DR bank (net) + DR discount line(s) / CR the clearing account (gross). Rolled-in coupon events are ignored with a note so they aren't booked twice.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "bank_account_id": {
            "type": "string"
          },
          "clearing_account_id": {
            "type": "string"
          },
          "gross": {
            "type": "string"
          },
          "discount_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "account_id",
                "amount"
              ]
            }
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "memo": {
            "type": "string"
          },
          "source_event_id": {
            "type": "string",
            "description": "The bank-feed deposit event for the net (optional)"
          },
          "rolled_in_event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "check_qbo": {
            "type": "boolean"
          },
          "dedup_key": {
            "type": "string"
          },
          "push": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "bank_account_id",
          "clearing_account_id",
          "gross",
          "txn_date",
          "memo"
        ]
      }
    },
    {
      "name": "book_vendor_credit",
      "title": "Book Vendor Credit",
      "description": "Book a vendor's credit memo (damaged goods, short shipment, price fix) against what the business owes them: DR Accounts Payable / CR the category (net) / CR the input tax credit. In QuickBooks it becomes a VendorCredit for that vendor, which is applied when the bill is paid. Give the QuickBooks bill_id it credits (its vendor, A/P account and category are used), or a vendor and category. Pass the positive amount from the memo and its tax. Refuses if QuickBooks already has a credit for that vendor and amount.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "The credit's total including tax, positive (69.18)."
          },
          "reference": {
            "type": "string",
            "description": "The vendor's credit memo number (9967152)."
          },
          "bill_id": {
            "type": "string",
            "description": "QuickBooks Bill Id it credits (find_qbo_matches or get_qbo_transaction)."
          },
          "vendor": {
            "type": "string",
            "description": "QuickBooks vendor name, when there's no bill_id."
          },
          "category_account_id": {
            "type": "string",
            "description": "Defaults to the bill's category."
          },
          "tax_amount": {
            "type": "string",
            "description": "Tax on the credit (0 for zero-rated goods)."
          },
          "sales_tax_code": {
            "type": "string",
            "description": "hst, gst, pst or qst (when taxed)."
          },
          "txn_date": {
            "type": "string",
            "format": "date",
            "description": "The credit memo's date."
          },
          "description": {
            "type": "string",
            "description": "What it's for, like damaged sugar."
          },
          "receipt_id": {
            "type": "string",
            "description": "The credit memo's receipt, attached to it."
          },
          "check_qbo": {
            "type": "boolean",
            "description": "Refuse if QuickBooks has it already. Default true."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "amount",
          "reference",
          "txn_date"
        ]
      }
    },
    {
      "name": "categorize_event",
      "title": "Categorize Transaction",
      "description": "Set a review item's category and payment account (tax kept unless tax_amount is given), or make it a transfer between two accounts (from_account_id / to_account_id).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "category_id": {
            "type": "string"
          },
          "payment_account_id": {
            "type": "string",
            "description": "What it's paid from. Leave it out to keep the one it already has. With none yet, only the category is set and it stays in review until one is."
          },
          "tax_amount": {
            "type": "string",
            "description": "Total tax on it; '0' removes tax"
          },
          "tax_code": {
            "type": "string",
            "description": "e.g. hst, gst (from list_categories / the tax line)"
          },
          "from_account_id": {
            "type": "string"
          },
          "to_account_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "close_month",
      "title": "Close Month",
      "description": "Close a month of the books. Pass month as YYYY-MM, or leave it out for the next month to close. The preview shows the month, how many transactions are still in review (that month, and any earlier day not yet closed, which the close covers too), and any bank or card feed that needs attention. It can't be applied while anything is in review (review_not_clear), before the month has ended (month_not_over), or for a month already closed (already_closed). Applying records who closed it and moves books closed through to the month's last day, never backwards. Previews by default: pass apply=true to close it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "The month, YYYY-MM. Leave it out for the month after the books are closed through."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "compare_with_qbo",
      "title": "Compare With QuickBooks",
      "description": "Compare Solarium's books with QuickBooks', account by account, on a date (default today): QuickBooks' trial balance next to Solarium's, with the difference. Amounts are debit minus credit; P&L accounts are the fiscal year to date. Lists QuickBooks accounts Solarium doesn't have. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "only_differences": {
            "type": "boolean",
            "description": "Default true."
          }
        }
      }
    },
    {
      "name": "confirm_event",
      "title": "Confirm Transaction",
      "description": "Book a review item and send it to QuickBooks. Refuses when an account isn't in QuickBooks, or when QuickBooks already has the same transaction (same amount within 3 days, or a bill with the same invoice number or vendor within 45) — set allow_qbo_match only after checking it's really different. An item already linked to its QuickBooks record (imported from QuickBooks) is booked from that record instead, and nothing is sent.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "allow_qbo_match": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "confirm_high_confidence",
      "title": "Confirm High Confidence",
      "description": "Confirm NEEDS_REVIEW events that pass every high-confidence check (including a QuickBooks duplicate check). A first-time vendor (no rule, vendor default or past booking) is always left for review.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "since_days": {
            "type": "integer",
            "description": "Only events created in the last N days"
          },
          "limit": {
            "type": "integer"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "connect_bank",
      "title": "Connect Bank",
      "description": "A link for the person to connect their bank or card, so Solarium pulls its transactions every day and books them. They sign in to their bank in the browser through Plaid. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "connect_quickbooks",
      "title": "Connect Quickbooks",
      "description": "A link for the person to connect QuickBooks Online. Once connected, Solarium brings in their history (last year and this one) and keeps it in sync; get_connection shows the import's progress. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "connect_stripe",
      "title": "Connect Stripe",
      "description": "A link for the person to connect their Stripe account, so Solarium can bring in their charges, fees, refunds and payouts. They approve it in the browser. After connecting, run setup_stripe, then sync_stripe. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "create_bill",
      "title": "Create Bill",
      "description": "Enter an unpaid supplier invoice: what the business owes a vendor until it's paid (DR each category, DR the input tax credit, CR Accounts Payable). In QuickBooks it becomes a Bill for that vendor with the invoice number and due date, paid later through Pay Bills. Lines are before tax, each with its tax. Refuses if Solarium or QuickBooks already has a bill for that vendor and invoice number. Previews by default: pass apply=true to book it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "vendor": {
            "type": "string",
            "description": "Who the invoice is from."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "The invoice date."
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "description": "When it's due."
          },
          "doc_number": {
            "type": "string",
            "description": "The vendor's invoice number, like DRAPESINC-0021."
          },
          "lines": {
            "type": "array",
            "description": "Each: category_id, amount (before tax), tax_amount (0 when untaxed), description.",
            "items": {
              "type": "object",
              "properties": {
                "category_id": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                },
                "tax_amount": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "category_id",
                "amount"
              ]
            }
          },
          "tax_code": {
            "type": "string",
            "description": "hst, gst, pst or qst, when a line is taxed."
          },
          "ap_account_id": {
            "type": "string",
            "description": "Defaults to the business's Accounts Payable."
          },
          "receipt_id": {
            "type": "string",
            "description": "The invoice's receipt, attached to the bill."
          },
          "note": {
            "type": "string",
            "description": "Anything to remember about it."
          },
          "check_qbo": {
            "type": "boolean",
            "description": "Refuse if QuickBooks has it already. Default true."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "vendor",
          "date",
          "lines"
        ]
      }
    },
    {
      "name": "create_category",
      "title": "Create Category",
      "description": "Create a category (account) from its tax code — its type follows the code — and add it to QuickBooks with the right subtype, or link the QuickBooks account that already has that name. Pass account_type instead of tax_code only where your country has no tax codes.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "tax_code": {
            "type": "string",
            "description": "e.g. 8320 purchases (see list_categories)"
          },
          "account_type": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "name"
        ]
      }
    },
    {
      "name": "create_contact",
      "title": "Create Contact",
      "description": "Add a customer or vendor, so entries can name who they're with (A/R and A/P are kept per contact). If one with the same name and type already exists, that one is returned and nothing is added (change it with update_contact). Use its id with book_invoice, record_customer_payment, recategorize_event (to attach it to an entry already booked) or create_invoice. region is a customer's province (a code like NS, or its name): invoice tax follows it. Given for a contact that already exists, it updates that contact's region. A customer's invoices print their legal_name, an Attn: line for contact_name, and their billing_address. Previews by default: pass apply=true to add it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "As it should appear on reports and invoices"
          },
          "contact_type": {
            "type": "string",
            "enum": [
              "customer",
              "vendor"
            ]
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "description": "The province of their address (NS, Nova Scotia). Empty string clears it"
          },
          "legal_name": {
            "type": "string",
            "description": "A customer's legal name, printed on their invoices (blank: the name). Empty string clears it"
          },
          "contact_name": {
            "type": "string",
            "description": "The person invoices are marked for (\"Attn: Priya Raman\"). Empty string clears it"
          },
          "billing_address": {
            "type": "string",
            "description": "Their billing address, one line per line. Printed on their invoices. Empty string clears it"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "name",
          "contact_type"
        ]
      }
    },
    {
      "name": "create_invoice",
      "title": "Create Invoice",
      "description": "Make a draft invoice for a customer (by contact_id, or customer_name to find or add them). Lines are before tax; tax is computed from each line's sales_tax_code at the rates where the customer is (customer_region, else the business's own province) on the issue date. Nothing is sent or booked until send_invoice. number is optional (the next one in the series is used when it's sent).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_email": {
            "type": "string",
            "description": "One or more emails, comma-separated"
          },
          "customer_region": {
            "type": "string",
            "description": "The customer's province, as a code like NS or its name. Saved on the customer. Tax follows it: a Nova Scotia customer pays Nova Scotia HST, and a customer in a GST-only province pays GST alone. Empty string: unknown, taxed at your own province's rates."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "description": "What it's for. Line breaks are kept on the page and the PDF"
                },
                "quantity": {
                  "type": "string",
                  "description": "Default 1"
                },
                "unit_price": {
                  "type": "string",
                  "description": "Before tax"
                },
                "revenue_account_id": {
                  "type": "string",
                  "description": "An income account (default: the sales account)"
                },
                "sales_tax_code": {
                  "type": "string",
                  "description": "One of the business's tax options (invoice_settings: tax_options), or empty for none"
                },
                "tax_amount": {
                  "type": "string",
                  "description": "Only to override the computed tax"
                }
              },
              "required": [
                "description",
                "unit_price"
              ]
            }
          },
          "issue_date": {
            "type": "string",
            "format": "date",
            "description": "Default today"
          },
          "terms_days": {
            "type": "integer",
            "description": "Days to pay (default from settings, 30)"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "description": "Overrides terms_days"
          },
          "notes": {
            "type": "string"
          },
          "number": {
            "type": "string",
            "description": "Only to use your own number"
          },
          "fx_rate": {
            "type": "string",
            "description": "Invoices in another currency: books' currency per 1 of the invoice's (e.g. 1.3684 CAD per USD). Default: the reference rate on the issue date (get_fx_rate names its source). Give one to book at your own rate, or an empty string to go back to the reference rate."
          },
          "currency": {
            "type": "string"
          },
          "trade_name": {
            "type": "string",
            "description": "The trade name this invoice leads with, instead of the one in invoice_settings. Use it when one legal entity runs more than one business. An empty string prints no trade name, just the legal name. Default: the invoice settings' trade name"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "lines"
        ]
      }
    },
    {
      "name": "create_transaction",
      "title": "Create Transaction",
      "description": "Add a transaction by hand (a cash expense, a missing card charge, a transfer). It goes to review, not the books: confirm it with confirm_event. With category_id and payment_account_id the lines are staged (for a transfer, payment_account_id is from and category_id is to); tax_amount adds a tax line. Warns about a likely duplicate already in Solarium: the same amount, or the same vendor within 3 days at any amount. Check a warning with get_event before confirming. A refund is money coming back to the business from a store or vendor (refund_direction from_vendor, the default). For money the business pays back to a customer, pass refund_direction to_customer: it's booked as money out of the payment account against the income category_id.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "vendor": {
            "type": "string",
            "description": "Who it was paid to or received from."
          },
          "amount": {
            "type": "string",
            "description": "The total in home currency, like 42.50."
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "expense",
              "fee",
              "fee_rebate",
              "fraud_dispute",
              "income",
              "loan_proceeds",
              "loan_repayment",
              "owner_contribution",
              "owner_draw",
              "personal_holding",
              "refund",
              "tax_payment",
              "transfer"
            ],
            "description": "Defaults to expense."
          },
          "category_id": {
            "type": "string",
            "description": "The category account (or the to-account)."
          },
          "payment_account_id": {
            "type": "string",
            "description": "The bank or card (or the from-account)."
          },
          "tax_amount": {
            "type": "string",
            "description": "Sales tax included in amount."
          },
          "tax_code": {
            "type": "string",
            "description": "The tax code, like HST ON."
          },
          "refund_direction": {
            "type": "string",
            "enum": [
              "from_vendor",
              "to_customer"
            ],
            "description": "For a refund: from_vendor (money in, the default) or to_customer (money out)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "vendor",
          "amount",
          "date"
        ]
      }
    },
    {
      "name": "daily_receipts",
      "title": "Daily Receipts",
      "description": "Run the daily receipts routine: classify every unmatched receipt (attach / promote / dismiss / review), apply attach + promote, and report the rest. With auto_confirm=true, high-confidence promotions are also confirmed (booked, and sent to QuickBooks when connected); off by default. A first-time vendor is never auto-confirmed.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "since_days": {
            "type": "integer",
            "description": "Receipts created in the last N days (default 14)"
          },
          "auto_confirm": {
            "type": "boolean",
            "description": "Also book high-confidence promotions (default false)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "deactivate_category",
      "title": "Deactivate Category",
      "description": "Hide a category you no longer use, in Solarium and QuickBooks. Refuses while it has a balance, unbooked transactions use it (category, card or any split line), it has active sub-accounts, or vendor rules file into it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "account_id"
        ]
      }
    },
    {
      "name": "delete_contact",
      "title": "Delete Contact",
      "description": "Delete a customer or vendor that nothing uses. Refused while anything still points at it (invoices, entries, journal lines, receipts, or a bank line remembered on a payment): the refusal says what, and merge_contacts moves those onto another contact first. QuickBooks isn't changed. Previews by default: pass apply=true to delete.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "contact_id"
        ]
      }
    },
    {
      "name": "dismiss_receipts",
      "title": "Dismiss Receipts",
      "description": "Dismiss unmatched receipts that aren't receipts (logos, signatures, duplicates).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_ids",
          "reason"
        ]
      }
    },
    {
      "name": "edit_booked_event",
      "title": "Edit Booked Transaction",
      "description": "Change one booked transaction's category, payment account (the card or bank it was paid from), date, amount or sales tax, in Solarium and QuickBooks together: the same edit as the transaction drawer. The preview shows the new journal lines, or why it would be refused (changed in QuickBooks since the last sync, reconciled, a closed period, an amount the bank feed set). Applying re-posts it and updates QuickBooks, then reads it back. Pass reason to keep why it was changed on the transaction's notes.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "category_id": {
            "type": "string",
            "description": "The new category (list_categories)."
          },
          "payment_id": {
            "type": "string",
            "description": "The card or bank it was paid from."
          },
          "transaction_date": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "string",
            "description": "The corrected total, like 18000.00."
          },
          "tax_amount": {
            "type": "string",
            "description": "The sales tax on the receipt, like 2.47. 0 for none."
          },
          "tax_code": {
            "type": "string",
            "description": "Which tax, like hst or gst. Default: the transaction's own, else the province's."
          },
          "memo": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "description": "Why it's being changed. Kept on the transaction's notes."
          },
          "acknowledge_closed_period": {
            "type": "boolean",
            "description": "true to edit inside a closed period, once the user has agreed."
          },
          "overwrite_quickbooks": {
            "type": "boolean",
            "description": "For a transaction linked to QuickBooks before Solarium kept a sync record: when QuickBooks differs from Solarium (the preview lists how), true writes Solarium's version over it, with this edit. Use only once the user agrees Solarium is right."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "edit_booked_lines",
      "title": "Edit Booked Lines",
      "description": "Set every line of a booked purchase, journal entry or sales receipt that's in QuickBooks, for one with several lines (edit_booked_event handles one line). List the lines you want with an amount, plus: for a purchase, category_id and tax_code (a QuickBooks tax code name like 'HST ON' or 'Out of Scope'; default keeps the line's); for a journal entry, category_id and posting (debit or credit); for a sales receipt, tax_code (each line sells the same product, so a month's sales split into taxable and zero-rated). payment_id moves a purchase to another card or bank. Existing lines are kept in order and a leftover one (like a -0.01 discount) is removed. QuickBooks is updated and read back, then Solarium's entry follows it. Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category_id": {
                  "type": "string",
                  "description": "Purchases and journal entries."
                },
                "amount": {
                  "type": "string",
                  "description": "Before tax for a purchase or sale; positive."
                },
                "tax_code": {
                  "type": "string",
                  "description": "Purchases and sales: a QuickBooks tax code name."
                },
                "posting": {
                  "type": "string",
                  "enum": [
                    "debit",
                    "credit"
                  ],
                  "description": "Journal entries."
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "amount"
              ]
            }
          },
          "payment_id": {
            "type": "string",
            "description": "Purchases: the card or bank account it was paid from."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "lines"
        ]
      }
    },
    {
      "name": "edit_event",
      "title": "Edit Transaction",
      "description": "Change a review item's date, memo, title or type. A new type rebuilds its lines to match (income puts the money in, an expense takes it out). When they can't be rebuilt (a transfer needs two accounts, and an item that was a transfer needs a category), they're cleared until you pick them with categorize_event.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "transaction_date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "memo": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "expense",
              "fee",
              "fee_rebate",
              "fraud_dispute",
              "income",
              "loan_proceeds",
              "loan_repayment",
              "owner_contribution",
              "owner_draw",
              "personal_holding",
              "refund",
              "tax_payment",
              "transfer"
            ]
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "edit_receipt",
      "title": "Edit Receipt",
      "description": "Correct what was read off a receipt: its date or vendor name (a misread year, a garbled vendor). Only the receipt changes; the transaction it's on keeps its own date, so fix that with edit_event or edit_booked_event.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "receipt_date": {
            "type": "string",
            "format": "date"
          },
          "vendor": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_id"
        ]
      }
    },
    {
      "name": "export_everything",
      "title": "Export Everything",
      "description": "Download everything: the general ledger, chart of accounts, transactions and every receipt and document file, as one zip. Works on every plan, even a canceled one. The preview shows what goes in, its rough size and the latest export with its download link. apply=true starts a new export. It is built in the background and the link is emailed when it's ready. The link lasts 7 days. One export at a time.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "find_qbo_matches",
      "title": "Find QuickBooks Matches",
      "description": "Find the QuickBooks transactions something probably already is: same amount within 3 days, or a bill / vendor credit with the same invoice number or vendor within 45 days, with their attachments and whether Solarium has them. Pass a receipt_id, an event_id, or the raw facts (amount + date, optionally vendor, doc_number, currency) for something not in Solarium yet. doc_numbers adds other invoice numbers it refers to (a credit memo's original invoice): a bill with one of those is marked credit_for. Flags likely double bills. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "The total, like 455.50 (with date, instead of an id)."
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "vendor": {
            "type": "string"
          },
          "doc_number": {
            "type": "string",
            "description": "The invoice or bill number."
          },
          "doc_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other invoice numbers it refers to, like the invoice a credit memo adjusts."
          },
          "currency": {
            "type": "string",
            "description": "Three letters, like USD. Defaults to home currency."
          }
        }
      }
    },
    {
      "name": "fresh_start",
      "title": "Fresh Start",
      "description": "Start the books clean on January 1 when coming from QuickBooks. Last year's history comes in from QuickBooks for reference, opening balances are booked on December 31 from QuickBooks' balance sheet (they must tie to the cent or nothing is booked), and the books are locked through December 31 so last year stays out of Review. The cutover defaults to January 1 this year. In December it can be next January 1, and then it runs on that day. Refuses when the books are already closed after the cutover, already started clean, or begin inside the new year with entries a person confirmed since. Never writes to QuickBooks. Previews by default: shows the cutover, how many of last year's records would come in, the opening balance check and what gets locked.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "cutover": {
            "type": "string",
            "format": "date",
            "description": "The day the books start: January 1 this year (the default), or next January 1 in December."
          },
          "cancel": {
            "type": "boolean",
            "description": "Drop a fresh start that is still waiting (for the import or for its day)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "get_connection",
      "title": "Get Connection",
      "description": "Who this connection is: the organization's name and id, who connected it, what it may do (look only, or look and make changes), and a stable account id for this person in this organization. Also flags bank feeds that need attention (see list_bank_feeds). Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "get_document",
      "title": "Get Document",
      "description": "One document uploaded on the website or from an AI app (a statement_id from list_statements): its type, the uploader's note, a link to the file (valid for an hour) and, for a PDF, its text. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "description": "A statement_id from list_statements."
          }
        },
        "required": [
          "document_id"
        ]
      }
    },
    {
      "name": "get_event",
      "title": "Get Transaction",
      "description": "One transaction in full: its lines (staged and booked), why it has its category (category_reason has its source, which is rule, vendor, correction, ai or person, and a short plain reason), its receipts (amount, currency, card, line items, in QuickBooks), FX, duplicate and closed-period flags, notes, and its QuickBooks link and sync state, and its source (where it came from, as list_events shows it). Use get_receipt for a receipt's full text and file.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "get_fx_rate",
      "title": "Get FX Rate",
      "description": "The reference rate a foreign invoice would be booked at: books' currency per 1 of currency, on or before the date, and who publishes it (source_name). Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "currency"
        ]
      }
    },
    {
      "name": "get_invoice",
      "title": "Get Invoice",
      "description": "One invoice in full: lines, tax, payments, timeline (sent, viewed, reminders), and its view and PDF links.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    },
    {
      "name": "get_qbo_account",
      "title": "Get QuickBooks Account",
      "description": "One QuickBooks account as QuickBooks has it: name, type, subtype, active, balance and SyncToken, plus the Solarium account mapped to it. Pass qb_id or name. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "qb_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    {
      "name": "get_qbo_transaction",
      "title": "Get QuickBooks Transaction",
      "description": "Read one QuickBooks transaction: its total, tax, date, payee, lines (ids, accounts, tax codes, received from) and attachments, plus the Solarium event linked to it. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Bill",
              "Purchase",
              "Deposit",
              "JournalEntry",
              "SalesReceipt",
              "VendorCredit",
              "BillPayment",
              "Payment",
              "Invoice",
              "Transfer",
              "CreditCardPaymentTxn",
              "RefundReceipt",
              "CreditMemo"
            ]
          },
          "qb_id": {
            "type": "string",
            "description": "The QuickBooks transaction id"
          }
        },
        "required": [
          "entity",
          "qb_id"
        ]
      }
    },
    {
      "name": "get_receipt",
      "title": "Get Receipt",
      "description": "One receipt or invoice in full: its text as read, line items (freight, fees and tax lines included), invoice number, card, payment method, totals, the transaction it's on and whether it's in QuickBooks, plus a link to the file (valid for an hour). Use it to check a document against a bill or a charge, line by line.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          }
        },
        "required": [
          "receipt_id"
        ]
      }
    },
    {
      "name": "get_receipt_addresses",
      "title": "Get Receipt Addresses",
      "description": "Where the person sends receipts: an email address to forward them to and a number to text photos to, and which of their own emails and numbers Solarium recognizes as theirs. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "get_solarium_messages",
      "title": "Get Solarium Messages",
      "description": "This business's messages with the Solarium team (texts, emails and notes written in the app), with Solarium's replies. Read only. Shows the latest 50 by default (limit, at most 200), oldest first. For older ones pass offset: next_offset from the last result. Each message shows its first 2000 characters, with truncated true and a marker when there's more. Pass body_chars to show more or less.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Default 50, at most 200."
          },
          "offset": {
            "type": "integer",
            "description": "Skip this many of the latest (for the next, older page)."
          },
          "body_chars": {
            "type": "integer",
            "description": "Show at most this many characters of each message. Default 2000."
          }
        }
      }
    },
    {
      "name": "import_invoice_pdf",
      "title": "Import Invoice Pdf",
      "description": "Bring in an invoice the business made elsewhere, from its PDF (an uploaded s3_key, or pdf_base64): its number, dates, customer, lines and tax are read off it and kept as printed. The preview shows what was read. On apply it's booked to the customer's A/R as sent (book=false keeps it a draft); send=true also emails their PDF to the customer. A number already used is refused.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "s3_key": {
            "type": "string"
          },
          "pdf_base64": {
            "type": "string"
          },
          "revenue_account_id": {
            "type": "string",
            "description": "Where its revenue goes (default: first income account)"
          },
          "book": {
            "type": "boolean",
            "description": "Book it to A/R as sent (default true)"
          },
          "send": {
            "type": "boolean",
            "description": "Also email their PDF to the customer (default false)"
          },
          "customer_email": {
            "type": "string",
            "description": "One or more emails, comma-separated"
          },
          "fx_rate": {
            "type": "string",
            "description": "Invoices in another currency: books' currency per 1 of the invoice's (e.g. 1.3684 CAD per USD). Default: the reference rate on the issue date (get_fx_rate names its source). Give one to book at your own rate, or an empty string to go back to the reference rate."
          },
          "adopt_event_id": {
            "type": "string",
            "description": "An A/R entry already booked by hand for this invoice (DR A/R, CR revenue and tax). The invoice ties to it instead of booking A/R again, so nothing new is posted and no email goes out. See link_invoice_to_entry for the checks."
          },
          "date_tolerance_days": {
            "type": "integer",
            "description": "Days the entry's date may differ from the invoice's issue date (default 0, the same day). The difference is shown in the preview."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "import_qbo_transaction",
      "title": "Import QuickBooks Transaction",
      "description": "Bring one QuickBooks transaction that's missing from the books into Solarium (for example a journal entry the import skipped), through the same path as the nightly sync: synced when every account maps, else in review, and linked to an existing event that's the same transaction. Refuses one already in the books.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Bill",
              "Purchase",
              "Deposit",
              "JournalEntry",
              "SalesReceipt",
              "VendorCredit",
              "BillPayment",
              "Payment",
              "Invoice",
              "Transfer",
              "CreditCardPaymentTxn",
              "RefundReceipt",
              "CreditMemo"
            ]
          },
          "qb_id": {
            "type": "string",
            "description": "The QuickBooks transaction id"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "entity",
          "qb_id"
        ]
      }
    },
    {
      "name": "import_stripe_balance",
      "title": "Import Stripe Balance",
      "description": "Import a Stripe account's activity from Stripe's export: charges as revenue, Stripe's processing fees (their sales tax as an input tax credit), refunds, disputes, Connect transfers, and payouts to the bank. Accepts the Balance summary report's itemized CSVs (Reports > Balance: 'Balance change from activity' and 'Payouts', each Export > CSV > Itemized) or the older balance history export. Nothing booked twice: anything already in the books is skipped, a payout already on the bank feed is linked. Ends by tying the Stripe account to the export; if it doesn't tie, nothing is written. Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "csv": {
            "type": "string",
            "description": "The export's text (Balance change from activity, or history)."
          },
          "payouts_csv": {
            "type": "string",
            "description": "The Payouts itemized export, with the Balance summary."
          },
          "stripe_account_id": {
            "type": "string",
            "description": "The bank-type account that is Stripe's balance."
          },
          "bank_account_id": {
            "type": "string",
            "description": "Where Stripe pays out to."
          },
          "revenue_account_id": {
            "type": "string",
            "description": "Where charges go (sales)."
          },
          "fees_account_id": {
            "type": "string",
            "description": "Where Stripe's fees go."
          },
          "transfers_account_id": {
            "type": "string",
            "description": "Connect platforms: where transfers to connected accounts go (cost of sales)."
          },
          "allow_window_mismatch": {
            "type": "boolean",
            "description": "Book even if Stripe's total over the export's days doesn't tie (exports that overlap)."
          },
          "charges_include_tax": {
            "type": "boolean",
            "description": "The charges include your sales tax (GST/HST). Each new charge is split at your standard rate into sales and tax collected. Leave it off if your Stripe prices don't include tax."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "csv",
          "stripe_account_id",
          "bank_account_id",
          "revenue_account_id",
          "fees_account_id"
        ]
      }
    },
    {
      "name": "import_wave",
      "title": "Import Wave",
      "description": "Bring a business's books in from Wave: its chart of accounts and every transaction from Wave's accounting export (Settings, Export your data, Export all transactions as CSV: accounting.csv, or the whole ZIP Wave emails), checked against Wave's trial balance (Reports, Trial Balance, export as CSV). Not for a business connected to QuickBooks: it is refused. Accounts map to Solarium's by name or are created with their tax code. Transactions already brought in are skipped by their Wave transaction ID. The trial balance is optional, but without it nothing is checked. With it, the books must tie to the cent or nothing is kept. With a cutover date (a fresh start, often January 1), history before it comes in for reference, the trial balance must be from the day before, and the books are locked through that day. A transaction with no vendor titled like 'Expenses 25 - Amazon Web Services' gets that vendor. Optionally pass Wave's receipts ZIP too: each receipt is attached to its transaction, and the ZIP can come in a later run. Pass each file as a document_id from upload_document, or as text. Previews by default: pass apply=true to import.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "transactions_document_id": {
            "type": "string",
            "description": "Wave's accounting.csv (or the whole ZIP Wave emails), added with upload_document."
          },
          "transactions_csv": {
            "type": "string",
            "description": "Or the text of Wave's accounting.csv."
          },
          "transactions_s3_key": {
            "type": "string",
            "description": "Or the key of accounting.csv (or Wave's ZIP) uploaded in the Solarium app."
          },
          "trial_balance_document_id": {
            "type": "string",
            "description": "Wave's trial balance report (CSV or XLSX), added with upload_document."
          },
          "trial_balance_csv": {
            "type": "string",
            "description": "Or the text of the trial balance CSV."
          },
          "trial_balance_s3_key": {
            "type": "string",
            "description": "Or the key of the trial balance uploaded in the Solarium app."
          },
          "trial_balance_date": {
            "type": "string",
            "format": "date",
            "description": "The trial balance's date, when the report doesn't say it."
          },
          "cutover": {
            "type": "string",
            "format": "date",
            "description": "The first day Solarium keeps the books (often January 1). History before it comes in for reference, the trial balance must be the day before, and the books are locked through that day."
          },
          "account_map": {
            "type": "object",
            "description": "Wave account name to a Solarium account_id, for accounts to land somewhere else.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "opening_from_trial_balance": {
            "type": "boolean",
            "description": "The transactions don't start at the beginning (a date range). Book what's missing as opening balances on the trial balance's date."
          },
          "start_feeds_after_wave": {
            "type": "boolean",
            "description": "A bank feed already in Solarium has transactions on days Wave covers. Keep Wave's history and start each such feed the day after Wave's last day. Its transactions from those days still waiting in Review are set aside. Approved ones are never removed: the import stops and lists them. The preview shows any overlap under bank_feeds."
          },
          "allow_closed_period": {
            "type": "boolean",
            "description": "Bring in transactions dated inside the closed books. It changes closed balances."
          },
          "receipts_document_id": {
            "type": "string",
            "description": "Optional: Wave's receipts ZIP (Settings, Export your data, Export all receipts as a ZIP file), added with upload_document. Each receipt is attached to its Wave transaction. It can be added in a later run, after the transactions came in."
          },
          "receipts_zip_base64": {
            "type": "string",
            "description": "Or the receipts ZIP's bytes, base64 encoded."
          },
          "receipts_s3_key": {
            "type": "string",
            "description": "Or the key of the receipts ZIP uploaded in the Solarium app."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "invoice_deposit_matches",
      "title": "Invoice Deposit Matches",
      "description": "Bank deposits that could have paid an invoice, best first: exact amounts first, then payers whose name looks like the customer's. Deposits still in review or booked in Solarium only (their income booking is undone when linked), and payments already booked as a transfer into a bank (they become the payment in place). Link one with record_invoice_payment and its event_id as source_event_id. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    },
    {
      "name": "invoice_payment_matches",
      "title": "Invoice Payment Matches",
      "description": "For an entry in the books: the invoice it already belongs to (its booking or a payment), else the open invoices a deposit could be paying (same amount, after the invoice date, a matching name; or an invoice in another currency whose balance at the Bank of Canada rate that day is within 3% of the deposit, with the rate it implies) plus every open invoice to pick by hand. A suggestion only: record_invoice_payment with source_event_id applies it.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "invoice_settings",
      "title": "Invoice Settings",
      "description": "Read or change invoice settings: the number prefix and next number (to continue an existing series), payment instructions, business address and email printed on invoices, a trade name, default terms, and reminders. The legal name printed on invoices is the business's own name, exactly as entered. Also the sales tax registration numbers printed on invoices: in Canada the GST/HST number (123456789 RT0001, needed on invoices of $100 or more for customers to claim input tax credits) and a Quebec registrant's QST number (1234567890 TQ 0001). In Canada also the business structure (entity_type: sole_proprietor, partnership or corporation), which decides where an owner's draw goes on the financial statements and when a sole proprietor's GST/HST is due. Pass nothing to just read them.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "prefix": {
            "type": "string"
          },
          "next_number": {
            "type": "integer"
          },
          "padding": {
            "type": "integer"
          },
          "payment_instructions": {
            "type": "string"
          },
          "business_address": {
            "type": "string"
          },
          "business_email": {
            "type": "string"
          },
          "trade_name": {
            "type": "string",
            "description": "The name the business trades under (a DBA), when it isn't its legal name. Set, invoices lead with it and read \"A trade name of <legal name>\" under it. Empty string clears it."
          },
          "default_terms_days": {
            "type": "integer"
          },
          "reminders_default": {
            "type": "boolean"
          },
          "tax_registration_number": {
            "type": "string",
            "description": "Canada: the GST/HST number, like 123456789 RT0001. Empty clears it."
          },
          "qst_registration_number": {
            "type": "string",
            "description": "Quebec QST registrants: the QST number, like 1234567890 TQ 0001. One in another format is kept with a warning. Empty clears it."
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "",
              "sole_proprietor",
              "partnership",
              "corporation"
            ],
            "description": "Canada: the business structure. Changing it moves no account. Solarium's team moves an owner's draw to the right code by hand when they next review the chart. Empty clears it."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "link_invoice_to_entry",
      "title": "Link Invoice To Entry",
      "description": "Tie a draft invoice to an A/R entry already in the books (an invoice sent from another system and booked by hand: DR A/R, CR revenue, CR tax), instead of booking its A/R a second time. The invoice becomes sent, dated by the entry, and payments recorded later clear that A/R. Nothing new is posted, nothing goes to QuickBooks and no email is sent. Refused unless the entry is booked and not voided, isn't already an invoice's, is in the invoice's currency with its whole total on A/R, has the same tax, is for the same customer (an entry with no customer gets the invoice's) and has the same date (or within date_tolerance_days).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string",
            "description": "A draft invoice"
          },
          "event_id": {
            "type": "string",
            "description": "The A/R entry already booked for it"
          },
          "date_tolerance_days": {
            "type": "integer",
            "description": "Days the entry's date may differ from the invoice's issue date (default 0, the same day). The difference is shown in the preview."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id",
          "event_id"
        ]
      }
    },
    {
      "name": "link_to_qbo_entity",
      "title": "Link To QuickBooks Entity",
      "description": "Link a needs review event to the QuickBooks transaction that already records it (booked directly in QuickBooks, never imported), then rebuild its entry from QuickBooks and attach its receipts there. An event already linked to that same record but not booked yet is booked from it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "entity": {
            "type": "string",
            "enum": [
              "Bill",
              "Purchase",
              "VendorCredit",
              "Deposit",
              "SalesReceipt"
            ]
          },
          "qb_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "entity",
          "qb_id"
        ]
      }
    },
    {
      "name": "list_bank_feeds",
      "title": "List Bank Feeds",
      "description": "Each bank and card feed (from Plaid): institution, account, mask, currency, the Solarium account it's linked to, whether it feeds the books (only those make transactions to review, from start_date on), status, last successful sync, last transaction date, Plaid's last error, and health: ok, stale (nothing new for longer than usual, or no sync for 2 days) or broken (the bank needs the person to sign in again). A broken or stale feed means transactions are missing: tell the person to reconnect it in Settings, Integrations. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "list_categories",
      "title": "List Categories",
      "description": "The chart of accounts: each account's id, name, type, tax code, card number and QuickBooks mapping. Filter by account_type; inactive accounts only with include_inactive.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_type": {
            "type": "string",
            "description": "A group (asset, liability, equity, income or revenue, expense) or an exact type like bank, credit_card, other_current_liability, accounts_payable, cogs."
          },
          "include_inactive": {
            "type": "boolean"
          }
        }
      }
    },
    {
      "name": "list_changes",
      "title": "List Changes",
      "description": "The change history of these books, newest first: who made each change, from which app (Claude, ChatGPT, Solarium AI in the app, a text message to the Solarium line, someone in the app, an API key or Solarium itself), when, and what changed in plain words (for example 'Claude (Sam) changed the category from Meals to Office Supplies'). Pass event_id for one transaction's history, or leave it out for the whole business. since and until (YYYY-MM-DD) limit the dates. Read-only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "One transaction (from list_events or get_event)"
          },
          "since": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "limit": {
            "type": "integer",
            "description": "Up to 200 (default 50)"
          },
          "offset": {
            "type": "integer",
            "description": "Skip this many (for the next page)"
          }
        }
      }
    },
    {
      "name": "list_contacts",
      "title": "List Contacts",
      "description": "Customers and vendors: id, name, type, email, phone, balance, and what a customer's invoices print (legal name, contact person, billing address). Filter by contact_type (customer or vendor) or name (contains, matching the name or legal name). Use a contact's id with book_invoice, record_customer_payment or report_account_lines. Not there yet: add it with create_contact.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_type": {
            "type": "string",
            "enum": [
              "customer",
              "vendor"
            ]
          },
          "name": {
            "type": "string",
            "description": "Part of the name."
          },
          "include_inactive": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "description": "At most 200 (default 50)."
          },
          "offset": {
            "type": "integer"
          }
        }
      }
    },
    {
      "name": "list_events",
      "title": "List Transactions",
      "description": "Find transactions, newest first. Filter by status, category_id, payment_account_id, payment_account_type (credit_card, bank…), vendor (contains), date_from / date_to, amount_min / amount_max (home currency), and has_document (whether a receipt is attached). Ignored transactions are left out unless status=ignored or include_ignored. Page with limit and offset. Each has a source: where it came from (bank_feed, statement_import, sheet_import, wave_import, quickbooks, stripe_import, receipt, op, by_hand…) with its batch_id or op_run_id when there is one.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ingested",
              "enriched",
              "auto_confirmed",
              "awaiting_confirmation",
              "needs_review",
              "confirmed",
              "syncing",
              "synced",
              "reconciled",
              "pending",
              "ignored",
              "error",
              "disputed"
            ]
          },
          "category_id": {
            "type": "string",
            "description": "An account id from list_categories."
          },
          "payment_account_id": {
            "type": "string",
            "description": "The bank or card account id."
          },
          "payment_account_type": {
            "type": "string",
            "description": "credit_card, bank, and so on."
          },
          "vendor": {
            "type": "string",
            "description": "Part of the vendor name."
          },
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "amount_min": {
            "type": "string",
            "description": "Home-currency amount, like 25.00."
          },
          "amount_max": {
            "type": "string",
            "description": "Home-currency amount, like 250.00."
          },
          "has_document": {
            "type": "boolean",
            "description": "Only with (true) or without (false) a receipt."
          },
          "include_ignored": {
            "type": "boolean",
            "description": "Also list ignored transactions."
          },
          "limit": {
            "type": "integer",
            "description": "At most 200 (default 50)."
          },
          "offset": {
            "type": "integer",
            "description": "Skip this many (for the next page)."
          }
        }
      }
    },
    {
      "name": "list_invoices",
      "title": "List Invoices",
      "description": "Invoices, newest first, with what's still owed. Filter by status (draft, sent, viewed, partially_paid, paid, overdue, void, or open), several statuses, customer, a search (number or customer name), issue dates or total. Pages with limit and offset.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "One status, or open (sent, viewed, partly paid, overdue)"
          },
          "bucket": {
            "type": "string",
            "enum": [
              "overdue",
              "not_due",
              "draft",
              "paid_30",
              "open",
              "all"
            ],
            "description": "The invoices screen's money bar: overdue (open, past due), not_due (open, due today or later), draft, paid_30 (paid in the last 30 days), open, or all"
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any of these statuses"
          },
          "contact_id": {
            "type": "string"
          },
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "search": {
            "type": "string",
            "description": "Matches the invoice number or the customer's name"
          },
          "issued_from": {
            "type": "string",
            "format": "date",
            "description": "Issued on or after"
          },
          "issued_to": {
            "type": "string",
            "format": "date",
            "description": "Issued on or before"
          },
          "amount_min": {
            "type": "string",
            "description": "Total at least this"
          },
          "amount_max": {
            "type": "string",
            "description": "Total at most this"
          },
          "limit": {
            "type": "integer",
            "description": "Default 100"
          },
          "offset": {
            "type": "integer",
            "description": "Default 0"
          }
        }
      }
    },
    {
      "name": "list_op_runs",
      "title": "List Op Runs",
      "description": "The history of operations applied to these books: who ran what, when, from where (chat, API, command), what it changed (including QuickBooks writes and whether they checked out), or why it was refused. Newest first.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "op": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          }
        }
      }
    },
    {
      "name": "list_receipts",
      "title": "List Receipts",
      "description": "Receipts and invoices sent in (by email, text, upload or Drive). By default only those not on any transaction yet and not dismissed: the ones to attach, book (promote_receipts) or dismiss. unmatched=false lists all. Filter by vendor (contains), date_from / date_to, status (draft, processed or rejected) and source (email, sms, web_upload, qb_import and so on). Newest first.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "unmatched": {
            "type": "boolean",
            "description": "Only receipts on no transaction (default true)."
          },
          "vendor": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_ocr",
              "processing",
              "ocr_failed",
              "draft",
              "pending",
              "processed",
              "reviewed",
              "rejected"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "web_upload",
              "sms",
              "email",
              "banking_sync",
              "google_drive",
              "gmail",
              "api",
              "qb_import"
            ]
          },
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "limit": {
            "type": "integer",
            "description": "At most 200 (default 50)."
          },
          "offset": {
            "type": "integer"
          }
        }
      }
    },
    {
      "name": "list_statements",
      "title": "List Statements",
      "description": "Bank and card statements this business has handed Solarium: uploaded on the website or from an AI app (upload_document with kind=statement). Each has a statement_id for reconcile_card_statement. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "Only statements for this card or bank."
          },
          "all_documents": {
            "type": "boolean",
            "description": "Also the other files uploaded on the website (Stripe exports, receipts, invoices)."
          },
          "waiting": {
            "type": "boolean",
            "description": "Only ones still waiting (Received, not yet handled)."
          },
          "limit": {
            "type": "integer",
            "description": "At most 100 (default 25)."
          }
        }
      }
    },
    {
      "name": "mark_document_handled",
      "title": "Mark Document Handled",
      "description": "Mark documents uploaded on the website or from an AI app as handled, so they stop showing as Received. Use it once a file is in the books another way (booked by hand, or a receipt for it already exists). Pass document_ids (from list_statements or get_document) and an optional note, which the uploader sees. Previews by default: pass apply=true to mark them.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The documents to mark."
          },
          "note": {
            "type": "string",
            "description": "What was done with them. Shown to the uploader."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "document_ids"
        ]
      }
    },
    {
      "name": "merge_contacts",
      "title": "Merge Contacts",
      "description": "Merge two contacts that are the same customer or vendor. Everything that points at merge_id (invoices, entries, journal lines, receipts, and the bank lines remembered on payments) moves to keep_id, its emails are added to keep_id's, anything keep_id is missing (legal name, billing address, phone, province) is taken from it, and merge_id is deleted. Both must be the same type. Refused when both are linked to different QuickBooks vendors. QuickBooks isn't changed. Previews by default (shows what would move): pass apply=true to merge.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "keep_id": {
            "type": "string",
            "description": "The contact to keep"
          },
          "merge_id": {
            "type": "string",
            "description": "The duplicate, moved onto keep_id and then deleted"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "keep_id",
          "merge_id"
        ]
      }
    },
    {
      "name": "merge_events",
      "title": "Merge Transactions",
      "description": "Fold a duplicate (donor_id) into the one to keep (keep_id): receipts, evidence and bank links move over and the duplicate is archived. If the duplicate is already in QuickBooks, it's removed there first. When the two amounts differ, the preview warns and applying is refused unless allow_amount_mismatch is true. Two currencies are never merged.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "keep_id": {
            "type": "string"
          },
          "donor_id": {
            "type": "string"
          },
          "allow_amount_mismatch": {
            "type": "boolean",
            "description": "Merge even though the two amounts differ. Default false."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "keep_id",
          "donor_id"
        ]
      }
    },
    {
      "name": "message_solarium_team",
      "title": "Message Solarium Team",
      "description": "Write to the Solarium team (a question, a heads-up about a transaction). It lands on your conversation with the team, the same one your texts and emails are on, and the team answers there. Previews by default: pass apply=true to send.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "What to tell the team. Plain words."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "text"
        ]
      }
    },
    {
      "name": "move_receipt",
      "title": "Move Receipt",
      "description": "Take a receipt off the event it's on (even an ignored one) and attach it to another event, or leave it unmatched (no event_id) so it can be promoted on its own: for two different receipts on one event, or a document stuck on an ignored backup card. If the old event's QuickBooks transaction still has the file, says so (remove it with qbo_remove_attachment). Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string",
            "description": "Where it goes. Leave out to leave it unmatched."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_id"
        ]
      }
    },
    {
      "name": "process_documents",
      "title": "Process Documents",
      "description": "Turn receipt files uploaded on the website (type receipts, still Received) into receipts: each is queued to be read like an emailed receipt and lands with the unmatched receipts within a minute or two, the note kept on it. Pass document_ids (from list_statements) or leave it out for every one waiting. Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Default: all waiting."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "promote_receipts",
      "title": "Promote Receipts",
      "description": "Promote unmatched receipts to NEEDS_REVIEW events with full enrichment (vendor, rules, dedup, tax). A receipt whose currency only the store address suggests (a US store) is staged in that currency. A card number printed on the receipt that isn't the read account's leaves the card empty. A slip that says the payment was declined is refused.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "receipt_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "receipt_ids"
        ]
      }
    },
    {
      "name": "push_receipts_to_qbo",
      "title": "Push Receipts To QuickBooks",
      "description": "Attach an event's receipts to its QuickBooks transaction (skips ones already there).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "push_to_qbo",
      "title": "Push To QuickBooks",
      "description": "Send a confirmed transaction that never reached QuickBooks. QuickBooks is checked first for the same amount around that date (it may have been entered there by hand); a match refuses unless check_qbo is false. Refuses anything already in QuickBooks or kept in Solarium only. Reads the result back.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "check_qbo": {
            "type": "boolean",
            "description": "Look for it in QuickBooks first. Default true."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "qbo_remove_attachment",
      "title": "QuickBooks Remove Attachment",
      "description": "Remove one attachment (like a duplicate PDF) from a QuickBooks transaction. The transaction itself isn't changed. Refuses to remove the last attachment unless allow_last is set. When a Solarium receipt is that file, pass points_to: the attachment still on the transaction that holds the same document.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Bill",
              "Purchase",
              "Deposit",
              "JournalEntry",
              "SalesReceipt",
              "VendorCredit",
              "BillPayment",
              "Payment",
              "Invoice",
              "Transfer",
              "CreditCardPaymentTxn",
              "RefundReceipt",
              "CreditMemo"
            ]
          },
          "qb_id": {
            "type": "string",
            "description": "The QuickBooks transaction id"
          },
          "attachable_id": {
            "type": "string"
          },
          "allow_last": {
            "type": "boolean"
          },
          "points_to": {
            "type": "string",
            "description": "The remaining attachment that is the same document as the receipt being removed."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "entity",
          "qb_id",
          "attachable_id"
        ]
      }
    },
    {
      "name": "qbo_set_purchase_line_account",
      "title": "QuickBooks Set Purchase Line Account",
      "description": "Move a synced purchase's expense lines from one QuickBooks account to a category, in QuickBooks: for a line filed under the wrong account there (like an expense account named after a card). Every line is echoed by id and it's read back. Then run resync_event_from_qb so Solarium's lines follow. To change which card or bank paid, use edit_booked_lines with payment_id.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "from_qbo_account_id": {
            "type": "string",
            "description": "The QuickBooks account id the lines are on now (get_qbo_transaction shows it)."
          },
          "to_category_id": {
            "type": "string",
            "description": "The Solarium category to move them to."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "from_qbo_account_id",
          "to_category_id"
        ]
      }
    },
    {
      "name": "qbo_set_purchase_tax",
      "title": "QuickBooks Set Purchase Tax",
      "description": "Repair a synced purchase whose QuickBooks total doesn't match the books because the sales tax was dropped or rounded differently: put its expense lines on the given QuickBooks tax code so QuickBooks' total and tax equal the books exactly (where QuickBooks' rounding can't land on the books' tax, a cent or two moves to an untaxed line). Every line is echoed by id, and it's read back. Use get_qbo_transaction first to see the lines and tax codes.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "tax_code": {
            "type": "string",
            "description": "QuickBooks tax code name or id, like H or HST ON."
          },
          "restate_from_books": {
            "type": "boolean",
            "description": "For a one-line purchase whose amount in QuickBooks no longer matches the books (the books were corrected): true re-cuts QuickBooks' line to the books' net and tax. Only once the user agrees the books are right."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "tax_code"
        ]
      }
    },
    {
      "name": "recategorize_event",
      "title": "Recategorize Transaction",
      "description": "Rebook a confirmed event's type and DR/CR lines in place (rebuilds its JE + tax), e.g. income that was really a customer payment. Refused for events already in QuickBooks (void + rebook there instead). It can't change the entry's total: the lines must add up to the amount it already has. To change the amount, use edit_booked_event, or set_event_charged_amount for what the card or bank charged on a foreign-currency one.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "expense",
              "fee",
              "fee_rebate",
              "fraud_dispute",
              "income",
              "loan_proceeds",
              "loan_repayment",
              "owner_contribution",
              "owner_draw",
              "personal_holding",
              "refund",
              "tax_payment",
              "transfer"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string"
                },
                "debit": {
                  "type": "string"
                },
                "credit": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "sales_tax_code": {
                  "type": "string"
                }
              },
              "required": [
                "account_id"
              ]
            }
          },
          "contact_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "event_type",
          "lines",
          "reason"
        ]
      }
    },
    {
      "name": "recategorize_events",
      "title": "Recategorize Transactions",
      "description": "Move many booked transactions to another category at once, in Solarium and QuickBooks. Pick them by event_ids, or by from_category_id (optionally narrowed by vendor and date_from / date_to). The preview lists which would move and which would be refused (e.g. changed in QuickBooks since the last sync).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "to_category_id": {
            "type": "string"
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "from_category_id": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "date_from": {
            "type": "string"
          },
          "date_to": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "to_category_id"
        ]
      }
    },
    {
      "name": "reconcile_card_statement",
      "title": "Reconcile Card Statement",
      "description": "Hold a card or bank statement up against the books (read-only). Pass the statement as rows (date, description, amount, is_debit, optional foreign_amount + foreign_currency; without is_debit a negative amount is a credit), or a statement PDF: statement_id from list_statements (or s3_key; a long statement is read in the background after it's uploaded: statement_queued means try again in a few minutes, and statement_reader_stalled means reading isn't running, so tell the Solarium team or pass rows). A PDF reconciled here is kept as a statement from then on, so list_statements shows it. Returns matches, FX corrections (with the set_event_fx to run), lines missing from the books, transactions not on the statement, possible doubles, lines repeated on the statement (each line is used once, so a repeat isn't listed as missing), and foreign-transaction fees. A journal entry with several lines on the account (a month of payouts in one entry) is matched line by line, on the date each line's description starts with (YYYY-MM-DD): its matches show the journal_line they paired with, and an entry only partly paired is listed in partly_matched with its unmatched_lines.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The card or bank account (see list_categories)"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "s3_key": {
            "type": "string"
          },
          "statement_id": {
            "type": "string",
            "description": "A statement from list_statements."
          },
          "date_from": {
            "type": "string"
          },
          "date_to": {
            "type": "string"
          }
        },
        "required": [
          "account_id"
        ]
      }
    },
    {
      "name": "record_bill_payment",
      "title": "Record Bill Payment",
      "description": "Pay open vendor bills (all or part) from a bank account or credit card: DR Accounts Payable for each bill / CR the bank or card, never an expense again. Several bills of one vendor can be paid at once (bill_ids): split as given (allocations), else oldest bill first. In QuickBooks it's one Bill Payment with a line per bill, and each bill's balance is read back. Pass source_event_id to use the withdrawal already on the bank feed (bill_payment_matches finds it): that line becomes the payment, so it isn't counted twice. A bill in another currency can be paid from an account in that currency or in the books' currency, and the difference from the bill's rate goes to Exchange Gain or Loss. Refused for more than what's owed, a paid bill, bills of different vendors, or a closed period. Previews by default: pass apply=true to record it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "bill_id": {
            "type": "string",
            "description": "The bill: its Solarium event id, or its QuickBooks Bill Id."
          },
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Several bills of one vendor, paid at once."
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bill_id": {
                  "type": "string",
                  "description": "One of the bills."
                },
                "amount": {
                  "type": "string",
                  "description": "What this payment pays on it, in the bill's currency."
                }
              },
              "required": [
                "bill_id",
                "amount"
              ]
            },
            "description": "What to pay on each bill. Default: oldest bill first."
          },
          "amount": {
            "type": "string",
            "description": "In the bills' currency. Default: the bank line's amount, else everything owed."
          },
          "amount_home": {
            "type": "string",
            "description": "A bill in another currency paid from an account in the books' currency: what left the bank, in the books' currency. Default: the bank line's amount, else the day's reference rate."
          },
          "paid_on": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD. Default: the bank line's day, else today."
          },
          "bank_account_id": {
            "type": "string",
            "description": "The bank or credit card it was paid from (not needed with source_event_id)."
          },
          "source_event_id": {
            "type": "string",
            "description": "The bank-feed withdrawal for this payment, still in review. It becomes the payment."
          },
          "vendor": {
            "type": "string",
            "description": "Who you mean to pay. Refused if it isn't the bills' vendor."
          },
          "reference": {
            "type": "string",
            "description": "Optional, like a confirmation number."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "record_customer_payment",
      "title": "Record Customer Payment",
      "description": "Record a customer paying an invoice: DR bank / CR A/R (that customer). Never touches revenue. Optionally rebooks the bank-feed deposit event for the payment.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "bank_account_id": {
            "type": "string"
          },
          "ar_account_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "txn_date": {
            "type": "string",
            "format": "date"
          },
          "reference": {
            "type": "string"
          },
          "source_event_id": {
            "type": "string",
            "description": "The bank-feed deposit event (pre-confirm)"
          },
          "allow_overpayment": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "bank_account_id",
          "ar_account_id",
          "contact_id",
          "amount",
          "txn_date",
          "reference"
        ]
      }
    },
    {
      "name": "record_invoice_payment",
      "title": "Record Invoice Payment",
      "description": "Record money received against an invoice (all or part): DR the bank / CR the customer's A/R, never revenue. amount defaults to what's left. Pass source_event_id to use a bank-feed deposit (it's rebooked as this payment). An entry already booked (a customer's payment booked as a transfer, or a deposit already in QuickBooks) becomes the payment in place, never booked twice: its credit goes to this customer's A/R (A/R with no customer is tagged to them; another account is reclassed to A/R, in Solarium only). Same currency, the same or no customer, at most what's owed, and not already another invoice's. method: one of the business's payment methods (invoice_settings: payment_methods).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "paid_on": {
            "type": "string",
            "format": "date",
            "description": "Default: the deposit's date, else today"
          },
          "method": {
            "type": "string",
            "enum": [
              "etransfer",
              "cheque",
              "ach",
              "zelle",
              "wire",
              "cash",
              "card",
              "bank",
              "other"
            ],
            "description": "How it was paid. Each country has its own list (invoice_settings: payment_methods)."
          },
          "bank_account_id": {
            "type": "string",
            "description": "Where it landed (not needed with source_event_id)"
          },
          "reference": {
            "type": "string"
          },
          "source_event_id": {
            "type": "string"
          },
          "amount_home": {
            "type": "string",
            "description": "Invoices in another currency paid into an account in the books' currency: what landed, in the books' currency (e.g. CAD for a USD invoice). Leave it out for an account in the invoice's own currency (a USD account): nothing was converted, so it's valued at that day's rate. Default: amount at that day's reference rate. The difference from the invoice's booked rate goes to Exchange Gain or Loss."
          },
          "fee": {
            "type": "string",
            "description": "Invoices in another currency: a bank fee taken off the payment, in the currency of the bank account it landed in. Booked to Bank Fees & Charges, so only the rate difference goes to Exchange Gain or Loss."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id",
          "method"
        ]
      }
    },
    {
      "name": "record_tax_payment",
      "title": "Record Tax Payment",
      "description": "Record a payment to the CRA for GST/HST, paid from a bank account. kind 'balance' pays a return's balance (debits GST/HST Payable). kind 'instalment' is an instalment (debits a GST/HST Instalments account, created if missing), shown on line 110 of the sales tax report. If the withdrawal is already on the bank feed, pass its event_id (tax_payment_matches finds it): that line is booked as the payment, so it isn't counted twice. Canadian businesses only. Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "What was paid, like 1250.00."
          },
          "paid_on": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD: the day it left the bank. Not needed with event_id (the bank line's day)."
          },
          "bank_account_id": {
            "type": "string",
            "description": "The bank account it was paid from. Not needed with event_id (the bank line's account)."
          },
          "event_id": {
            "type": "string",
            "description": "The bank-feed withdrawal for this payment, still in review. It becomes the payment."
          },
          "kind": {
            "type": "string",
            "enum": [
              "balance",
              "instalment"
            ],
            "description": "balance (default) or instalment."
          },
          "memo": {
            "type": "string",
            "description": "Optional, like 'Q3 2026 return'."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "amount"
        ]
      }
    },
    {
      "name": "reject_event",
      "title": "Reject Transaction",
      "description": "Set a review item aside (it won't be booked), recording why. Booked items can't be rejected.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "reason"
        ]
      }
    },
    {
      "name": "remove_bill_payment",
      "title": "Remove Bill Payment",
      "description": "Undo a payment recorded with record_bill_payment: what it paid is owed on each bill again. A payment from a bank-feed withdrawal puts the withdrawal back in review as it was. One recorded by hand has its entry voided. In QuickBooks its Bill Payment is deleted and each bill's balance is read back. Refused in a closed period. Previews by default: pass apply=true to remove it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "payment_id": {
            "type": "string",
            "description": "The payment (record_bill_payment's payment_id), or its entry's event id."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "payment_id"
        ]
      }
    },
    {
      "name": "remove_invoice_payment",
      "title": "Remove Invoice Payment",
      "description": "Undo a payment recorded on an invoice: what it paid is owed again. A payment from a bank-feed deposit puts the deposit back in review, unlinked; one recorded by hand has its entry voided. Refused for a payment already in QuickBooks (delete it there first). This is the only way to change a payment's entry: Transactions won't edit, reject or merge an entry that belongs to an invoice.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id",
          "payment_id"
        ]
      }
    },
    {
      "name": "replace_with_qbo_twin",
      "title": "Replace With QuickBooks Twin",
      "description": "Replace a needs review event with the copy QuickBooks already has: its receipts move to the imported event, the review event is archived, and the document is pushed to QuickBooks. Finds the twin when not given. Amounts must match unless accept_difference is true: then QuickBooks' amount is kept and the gap is reported. Check the document first (get_receipt) to see which amount is right.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "qbo_event_id": {
            "type": "string"
          },
          "accept_difference": {
            "type": "boolean",
            "description": "Replace even though the amounts differ, keeping QuickBooks' amount (default false)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "report_account_lines",
      "title": "Report Account Lines",
      "description": "The booked lines behind a report number: every line posted to these accounts in the range, with the transaction (event_id) each came from. Narrow to one vendor (a report_spending_by_vendor key) or one contact (a contact id, or 'none'). Capped at 500 lines (truncated says so).",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Account ids to list."
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "First day, YYYY-MM-DD. Omit for all time."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day, YYYY-MM-DD. Omit for all time."
          },
          "vendor": {
            "type": "string",
            "description": "A vendor key from report_spending_by_vendor."
          },
          "contact": {
            "type": "string",
            "description": "A contact id, or 'none' for lines with no contact."
          },
          "view": {
            "type": "string",
            "enum": [
              "all",
              "management"
            ],
            "description": "all (the default) counts every entry. management leaves out the income and expense of entries marked to leave out of management reports (their sales tax, the balance sheet and QuickBooks stay the same)."
          }
        },
        "required": [
          "account_ids"
        ]
      }
    },
    {
      "name": "report_balance_sheet",
      "title": "Report Balance Sheet",
      "description": "Balance sheet as of a date: assets, liabilities and equity by account (net income to date included), optionally side by side with compare_as_of. out_of_balance is zero unless something posted unbalanced.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "The balance sheet date, YYYY-MM-DD."
          },
          "compare_as_of": {
            "type": "string",
            "format": "date",
            "description": "An earlier date to compare against."
          }
        },
        "required": [
          "as_of"
        ]
      }
    },
    {
      "name": "report_open_balances",
      "title": "Report Open Balances",
      "description": "Open balances, aged (current, 31-60, 61-90, over 90 days): side=receivable lists customers who owe you, side=payable lists vendors you owe. Each row's key is the contact id for report_account_lines.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "payable",
              "receivable"
            ],
            "description": "receivable or payable."
          },
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Age balances as of this date, YYYY-MM-DD."
          }
        },
        "required": [
          "side",
          "as_of"
        ]
      }
    },
    {
      "name": "report_profit_and_loss",
      "title": "Report Profit And Loss",
      "description": "Profit and loss for a date range: income, cost of sales, expenses and other items by account, with gross profit and net income, one column per month or quarter. Amounts are in the org's home currency. Only booked (confirmed or synced) transactions count. Use report_account_lines to see what's behind a number. To compare with an earlier range (this month so far against the same days last month), pass compare_start_date and compare_end_date: the result then has two columns, the compare range first, and totals cover start_date to end_date only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "First day, YYYY-MM-DD."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day, YYYY-MM-DD (inclusive)."
          },
          "granularity": {
            "type": "string",
            "enum": [
              "month",
              "quarter"
            ],
            "description": "One column per month (default) or per quarter."
          },
          "view": {
            "type": "string",
            "enum": [
              "all",
              "management"
            ],
            "description": "all (the default) counts every entry. management leaves out the income and expense of entries marked to leave out of management reports (their sales tax, the balance sheet and QuickBooks stay the same)."
          },
          "compare_start_date": {
            "type": "string",
            "format": "date",
            "description": "First day of an earlier range to compare, YYYY-MM-DD."
          },
          "compare_end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day of the compare range, YYYY-MM-DD (inclusive). Must be before start_date."
          }
        },
        "required": [
          "start_date",
          "end_date"
        ]
      }
    },
    {
      "name": "report_qbo_account_lines",
      "title": "Report QuickBooks Account Lines",
      "description": "One QuickBooks account's register between two dates (default the last 30 days): each line's date, type, QuickBooks id, name, memo and amount, and the Solarium event it is (or none, if the books don't have it). Use it next to report_account_lines to find where a bank, card or loan differs. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "The Solarium account (mapped to QuickBooks): its id, or its first 8+ characters."
          },
          "since": {
            "type": "string",
            "format": "date"
          },
          "until": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "account_id"
        ]
      }
    },
    {
      "name": "report_sales_tax",
      "title": "Report Sales Tax",
      "description": "The sales tax report for a period, in the form the org's country files: in Canada the GST/HST return (collected, input tax credits, net owing or refund, filing deadline) plus any PST/QST return; in the US sales tax collected by state; elsewhere tax collected and claimed back by tax. The Canadian return lists the numbered CRA lines in return_lines (101 sales, 103 collected, 105, 106 ITCs, 108, 109 net tax, 110 instalments, 113A balance, negative is a refund), in the org's home currency. Only booked transactions count, and cards not booked yet are reported as a warning. So is a recorded CRA payment whose bank line still sits in review (cra_payments_in_review), since approving that line too would count the payment twice. Part of Essentials: on the Free plan it returns the plan_required error with an upgrade message.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "First day, YYYY-MM-DD."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day, YYYY-MM-DD (inclusive)."
          }
        },
        "required": [
          "start_date",
          "end_date"
        ]
      }
    },
    {
      "name": "report_spending_by_vendor",
      "title": "Report Spending By Vendor",
      "description": "Spending by vendor for a date range, one column per month or quarter, largest first. Each vendor's key and the account_ids go to report_account_lines (as vendor and account_ids) to list its transactions.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "First day, YYYY-MM-DD."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Last day, YYYY-MM-DD (inclusive)."
          },
          "granularity": {
            "type": "string",
            "enum": [
              "month",
              "quarter"
            ],
            "description": "One column per month (default) or per quarter."
          },
          "view": {
            "type": "string",
            "enum": [
              "all",
              "management"
            ],
            "description": "all (the default) counts every entry. management leaves out the income and expense of entries marked to leave out of management reports (their sales tax, the balance sheet and QuickBooks stay the same)."
          }
        },
        "required": [
          "start_date",
          "end_date"
        ]
      }
    },
    {
      "name": "restate_event_fx",
      "title": "Restate Transaction FX",
      "description": "Record that a booked (or synced) charge was really in another currency — e.g. 455.50 USD for the 648.27 CAD the card charged — keeping the home-currency amount booked. Nothing in the ledger or QuickBooks changes; only the foreign amount, currency and the card's actual rate are recorded. To change the booked amount too, use the edit drawer.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "original_currency": {
            "type": "string"
          },
          "original_amount": {
            "type": "string"
          },
          "charged_amount": {
            "type": "string",
            "description": "Optional check: must equal the booked amount"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "original_currency",
          "original_amount"
        ]
      }
    },
    {
      "name": "resync_event_from_qb",
      "title": "Resync Transaction From Qb",
      "description": "Rebuild events from their QuickBooks copy when Solarium has drifted (QuickBooks is only read). Checks the entry balances and moves the bank or card by the QuickBooks total.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_ids"
        ]
      }
    },
    {
      "name": "send_feedback",
      "title": "Send Feedback",
      "description": "Tell the Solarium team when you can't do what the user asked with these tools, or something looks wrong: a tool you needed that doesn't exist, a missing field or option, a result that didn't match the books or QuickBooks, an error, or a description that misled you. Say what you were trying to do and what would have helped. It doesn't change the books. Don't include card numbers, passwords or other secrets.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "missing_tool",
              "wrong_result",
              "error",
              "confusing",
              "other"
            ]
          },
          "message": {
            "type": "string",
            "description": "What you were trying to do, what was missing or wrong, and what would have helped."
          },
          "tool": {
            "type": "string",
            "description": "The tool it's about, if any."
          },
          "example": {
            "type": "string",
            "description": "The call you made or wanted to make, and what came back."
          }
        },
        "required": [
          "kind",
          "message"
        ]
      }
    },
    {
      "name": "send_invoice",
      "title": "Send Invoice",
      "description": "Send an invoice: it gets its number, its A/R is booked (DR A/R for the customer, CR revenue and tax collected), and the customer is emailed the PDF and a link to view it. Sending an invoice already sent emails it again without booking anything. In QuickBooks it's created as a real invoice once that write is proven; until then it's booked in Solarium only.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "to": {
            "type": "string",
            "description": "Emails to send to, comma-separated (default: the customer's)"
          },
          "fx_rate": {
            "type": "string",
            "description": "Invoices in another currency: books' currency per 1 of the invoice's (e.g. 1.3684 CAD per USD). Default: the reference rate on the issue date (get_fx_rate names its source). Give one to book at your own rate, or an empty string to go back to the reference rate."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    },
    {
      "name": "send_year_end_package",
      "title": "Send Year End Package",
      "description": "Email the year-end package to the business's accountant: one Excel workbook for the fiscal year with a trial balance, profit and loss by month, balance sheet at year end, the general ledger (every account, every line, with a running balance), vendors, receivables and payables, plus a GIFI schedule and the GST/HST return for Canadian businesses. year is the calendar year the fiscal year ends in (default: the latest fiscal year that has ended). Pass to with the accountant's email. Previews by default: it lists the recipient, the year, the sheets and anything that could still change the numbers (transactions in Review, books not closed). Pass apply=true to send. Paid plans only.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "description": "The calendar year the fiscal year ends in, like 2026. Default: the latest that ended."
          },
          "to": {
            "type": "string",
            "description": "The accountant's email (several separated by commas)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "set_card_last_four",
      "title": "Set Card Last Four",
      "description": "Record a card number on a card or bank account, then file receipts waiting on that number and fill the payment account on their needs review events. A number already on another account is refused unless reassign is true: then it moves here, its waiting receipts and needs review events move with it, and booked entries still on the other account are listed (move those with edit_booked_lines payment_id).",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "last_four": {
            "type": "string"
          },
          "reassign": {
            "type": "boolean",
            "description": "Move the number here from the account it's on."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "account_id",
          "last_four"
        ]
      }
    },
    {
      "name": "set_event_charged_amount",
      "title": "Set Transaction Charged Amount",
      "description": "For a booked transaction in another currency (like 455.50 USD): set what your card or bank actually charged in your home currency. The rate is worked out from the two amounts, the journal lines are re-posted at the new amount, and QuickBooks is updated and read back: the same edit as the transaction drawer. The preview shows the old and new amount, the new rate, the journal lines before and after, and what QuickBooks gets. Refused for a transaction in your home currency (use edit_booked_event), one that belongs to an invoice, one QuickBooks keeps in the other currency, and inside a closed period until the user agrees. For a transaction in QuickBooks, until that QuickBooks update is proven the preview warns and applying is refused. Previews by default: pass apply=true to save it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "charged_amount": {
            "type": "string",
            "description": "What the card or bank charged in the home currency, like 648.27."
          },
          "reason": {
            "type": "string",
            "description": "Why it's being changed. Kept on the transaction's notes."
          },
          "acknowledge_closed_period": {
            "type": "boolean",
            "description": "true to edit inside a closed period, once the user has agreed."
          },
          "overwrite_quickbooks": {
            "type": "boolean",
            "description": "For a transaction linked to QuickBooks before Solarium kept a sync record: when QuickBooks differs from Solarium (the preview lists how), true writes Solarium's version over it. Use only once the user agrees Solarium is right."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "charged_amount"
        ]
      }
    },
    {
      "name": "set_event_fx",
      "title": "Set Transaction FX",
      "description": "Say a review item was in another currency: original_currency (e.g. USD), optionally original_amount (the foreign amount, if it differs) and charged_amount (what your card or bank charged in your home currency, which keeps their rate including fees). Without charged_amount the Bank of Canada rate is used.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "original_currency": {
            "type": "string"
          },
          "original_amount": {
            "type": "string"
          },
          "charged_amount": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "original_currency"
        ]
      }
    },
    {
      "name": "set_event_memo",
      "title": "Set Transaction Memo",
      "description": "Set the memo and/or notes on any transaction, booked or not, splits included. No lines are re-posted. Notes stay in Solarium. The memo goes to QuickBooks only with push_to_qbo=true, which sets the memo on the linked QuickBooks transaction (a purchase, bill, journal entry or deposit) and checks it there. Pass an empty string to clear one. Previews by default: pass apply=true to save it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "memo": {
            "type": "string",
            "description": "Shown on the transaction, like an invoice number."
          },
          "notes": {
            "type": "string",
            "description": "Longer notes for the team. Never sent to QuickBooks."
          },
          "push_to_qbo": {
            "type": "boolean",
            "description": "Also set the memo on the linked QuickBooks transaction (default false)."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "set_event_vendor",
      "title": "Set Transaction Vendor",
      "description": "Set the vendor (or customer) on one transaction, booked or in review: contact_id for one that exists (list_contacts), or new_vendor_name to use that name (a contact with the name is reused, else one is created). When the transaction is a QuickBooks purchase, its payee there changes too, to the QuickBooks vendor with the same name, and is read back. The preview shows the old and new vendor and what QuickBooks will get. It's refused, with nothing changed, when QuickBooks can't follow: no vendor with that name in QuickBooks. For a kind of purchase (like a credit card one) whose payee change isn't proven yet, the preview warns and applying is refused. Previews by default: pass apply=true to save it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string",
            "description": "The vendor or customer to set (list_contacts)."
          },
          "new_vendor_name": {
            "type": "string",
            "description": "A name instead of contact_id. Reuses a contact with that name, else creates one."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id"
        ]
      }
    },
    {
      "name": "set_management_view",
      "title": "Set Management View",
      "description": "Mark transactions to leave out of management reports (exclude=true), or put them back (exclude=false). They stay in the books, sales tax, QuickBooks and every filed number. Only reports run with view=management leave them out. For owner-paid perks or one-offs the owner doesn't want in day-to-day numbers. Changes no amounts. Previews by default: pass apply=true to save it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The transactions."
          },
          "exclude": {
            "type": "boolean",
            "description": "true leaves them out of management reports."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_ids",
          "exclude"
        ]
      }
    },
    {
      "name": "set_qbo_tax_code",
      "title": "Set QuickBooks Tax Code",
      "description": "Choose which QuickBooks tax code Solarium sends for one of its tax codes (gst, hst, pst, qst, gst_pst, gst_qst), when a push stops with \"No Tax Code We Can Match\". Without qb_id it lists the company's QuickBooks tax codes and the choices already made, and changes nothing. With qb_id it saves the choice (clear=true removes it). Previews by default: pass apply=true to save. Then push the entry again.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "tax_code": {
            "type": "string",
            "enum": [
              "gst",
              "gst_pst",
              "gst_qst",
              "hst",
              "pst",
              "qst"
            ],
            "description": "Solarium's tax code."
          },
          "qb_id": {
            "type": "string",
            "description": "The QuickBooks TaxCode Id to send for it."
          },
          "clear": {
            "type": "boolean",
            "description": "Remove the choice, so the name match is used again."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "set_up_business",
      "title": "Set Up Business",
      "description": "Create the person's business in Solarium, the same as the Set Up Your Business step on the web: its name, country and province or state, and in Canada how often it files GST/HST. Ask the person rather than guess. It starts on the free trial. Call with apply=false first and show what will be created, then apply=true once they confirm. Afterwards this connection works in the new business and its usual tools appear.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The business's name, as the person wants it shown."
          },
          "country": {
            "type": "string",
            "description": "Two-letter country code. CA (the default) and US have their own tax rules."
          },
          "province": {
            "type": "string",
            "description": "Canada: the province or territory code (ON, BC, QC, AB, MB, SK, NS, NB, NL, PE, YT, NT, NU)."
          },
          "region": {
            "type": "string",
            "description": "Outside Canada: the state (US two-letter code) or region."
          },
          "filing_frequency": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "annual"
            ],
            "description": "Canada: how often it files GST/HST. Most small businesses file quarterly."
          },
          "business_type": {
            "type": "string",
            "enum": [
              "sch_c",
              "1065",
              "1120",
              "1120s"
            ],
            "description": "US only: sole proprietor or single-member LLC (sch_c), partnership (1065), C corporation (1120) or S corporation (1120s)."
          },
          "currency": {
            "type": "string",
            "description": "Outside Canada and the US: the home currency (three-letter code). Defaults to the country's."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true creates it, once the person has confirmed."
          }
        },
        "required": [
          "name"
        ]
      }
    },
    {
      "name": "setup_stripe",
      "title": "Setup Stripe",
      "description": "Choose the accounts Stripe's activity lands in, once, after connecting Stripe. Proposes them: a Stripe balance account (like a bank account; created if missing), the sales account charges go to, a fees account (Merchant Fees, created if missing) and the bank Stripe pays out to. Pass any id to choose a different one. start_date is the first day to bring in (default: the first open day). Preview first, then apply.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "stripe_account_id": {
            "type": "string",
            "description": "An existing account for Stripe's balance."
          },
          "revenue_account_id": {
            "type": "string",
            "description": "Where charges go (sales)."
          },
          "fees_account_id": {
            "type": "string",
            "description": "Where Stripe's fees go."
          },
          "bank_account_id": {
            "type": "string",
            "description": "The bank Stripe pays out to."
          },
          "transfers_account_id": {
            "type": "string",
            "description": "Platforms using Stripe Connect: where transfers to connected accounts go."
          },
          "start_date": {
            "type": "string",
            "description": "YYYY-MM-DD: the first day to bring in."
          },
          "charges_include_tax": {
            "type": "boolean",
            "description": "Your Stripe prices include GST/HST (or your sales tax). Each new charge is then split at your standard rate into sales and tax collected. Off by default: charges come in as sales."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "sync_bank_feeds",
      "title": "Sync Bank Feeds",
      "description": "Bring in new transactions from the bank and card feeds (Plaid) right now, instead of waiting for the nightly sync. Pass feed_id (account_id from list_bank_feeds), or feed (the account's name or last four), to sync one feed. Without either it syncs every connected feed. Accounts at the same bank under one sign-in come in together. It brings in what the bank has already shared with Plaid, adds new transactions to Needs Review, and runs as soon as it's called. Says how many came in per feed, their dates and when each feed last synced, or why it couldn't (the bank needs a new sign-in, it's busy, or the feed is disconnected). Each bank at most once every few minutes.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "feed_id": {
            "type": "string",
            "description": "The feed's account_id from list_bank_feeds."
          },
          "feed": {
            "type": "string",
            "description": "The feed's account name, or its last four digits."
          }
        }
      }
    },
    {
      "name": "sync_quickbooks",
      "title": "Sync Quickbooks",
      "description": "Bring in what changed in QuickBooks since the last sync (new, changed and voided transactions, and payroll), the same as the nightly sync, right now. It only mirrors what's already in QuickBooks, so it runs as soon as it's called. At most once every few minutes.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "sync_stripe",
      "title": "Sync Stripe",
      "description": "Bring the connected Stripe account's activity into Needs Review for whole days (default: from where the last sync stopped, or setup's start date, through yesterday): charges as sales (gross, or split into sales and tax when setup_stripe says charges include tax), Stripe's fees with their sales tax as a credit, refunds, disputes and their fees, and payouts matched to the deposit already on the bank feed. Nothing is added twice and nothing posts until it's approved, so it runs as soon as it's called. If Stripe and the books don't agree, it says so and those transactions carry a note to check them before approving.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "description": "YYYY-MM-DD (UTC day)."
          },
          "end_date": {
            "type": "string",
            "description": "YYYY-MM-DD (UTC day), at the latest yesterday."
          }
        }
      }
    },
    {
      "name": "tax_payment_matches",
      "title": "Tax Payment Matches",
      "description": "Bank-feed withdrawals still in review that could be a CRA GST/HST payment: the same amount, within 10 days of paid_on, and a description like CRA, Receiver General, GST, or GOVT and TAX. Closest day first. Pass one's event_id to record_tax_payment so the payment isn't counted twice. Read only.",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "What was paid, like 1250.00."
          },
          "paid_on": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD: about when it left the bank."
          }
        },
        "required": [
          "amount",
          "paid_on"
        ]
      }
    },
    {
      "name": "test_send_invoice",
      "title": "Test Send Invoice",
      "description": "Send yourself a test of an invoice (draft or sent): the exact email and PDF the customer gets, with [Test] on the subject, a banner saying the customer didn't get it, and the PDF stamped TEST. to is one address (default: yours). Nothing else changes: no number is used, nothing is booked, the status, sent date and reminders stay as they are, and its view link is a 7-day preview that never counts as the customer viewing it. Up to 10 a day per invoice.",
      "access": "change",
      "readOnly": false,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "to": {
            "type": "string",
            "description": "One email to send the test to (default: yours)"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    },
    {
      "name": "unmapped_card_numbers",
      "title": "Unmapped Card Numbers",
      "description": "List card numbers read off receipts that belong to no payment account (read-only).",
      "access": "look",
      "readOnly": true,
      "changesBooks": false,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "since_days": {
            "type": "integer"
          }
        }
      }
    },
    {
      "name": "update_category",
      "title": "Update Category",
      "description": "Rename a category, and/or set its QuickBooks subtype from its tax code (fix_subtype), in Solarium and QuickBooks together — so the nightly sync doesn't change it back.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "fix_subtype": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "account_id"
        ]
      }
    },
    {
      "name": "update_contact",
      "title": "Update Contact",
      "description": "Change a customer or vendor: its name, a customer's legal name, the person their invoices are marked for (contact_name, printed as Attn:), billing address, emails, phone or province. Only what's passed changes; an empty string clears a field. email takes one or more addresses, comma-separated: a customer's invoices go to all of them. Renaming to a name another contact of the same type already has is refused (merge them with merge_contacts). QuickBooks isn't changed. Previews by default: pass apply=true to save.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "As it should appear on reports and invoices"
          },
          "email": {
            "type": "string",
            "description": "One or more emails, comma-separated. Empty string clears"
          },
          "phone": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "description": "The province of their address (NS, Nova Scotia). Empty string clears it"
          },
          "legal_name": {
            "type": "string",
            "description": "A customer's legal name, printed on their invoices (blank: the name). Empty string clears it"
          },
          "contact_name": {
            "type": "string",
            "description": "The person invoices are marked for (\"Attn: Priya Raman\"). Empty string clears it"
          },
          "billing_address": {
            "type": "string",
            "description": "Their billing address, one line per line. Printed on their invoices. Empty string clears it"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "contact_id"
        ]
      }
    },
    {
      "name": "update_invoice",
      "title": "Update Invoice",
      "description": "Change a draft invoice: its customer, the customer's province (customer_region), lines, dates, terms, notes, number or trade name. To change the customer, pass contact_id, or customer_name matching an existing customer's name or legal name exactly (any case). A name that matches no customer is refused, never added: add them with create_contact first. A new customer, province or issue date works the tax out again. A sent invoice with nothing paid (sent, viewed or overdue) can change its issue_date alone: the number stays, the due date follows its terms, tax is worked out again if a rate changed between the dates, and its A/R entry moves to the new date. In another currency it's booked at the reference rate for the new date (pass fx_rate to use your own). Refused for a partly paid, paid or void invoice, a date in a closed period, and an invoice in QuickBooks (change it there first). Nothing is emailed. Anything else on a sent invoice can't change; void it and make a new one.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string",
            "description": "An existing customer's name or legal name, exact (any case). Never adds one"
          },
          "customer_email": {
            "type": "string",
            "description": "One or more emails, comma-separated"
          },
          "customer_region": {
            "type": "string",
            "description": "The customer's province, as a code like NS or its name. Saved on the customer. Tax follows it: a Nova Scotia customer pays Nova Scotia HST, and a customer in a GST-only province pays GST alone. Empty string: unknown, taxed at your own province's rates."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "description": "What it's for. Line breaks are kept on the page and the PDF"
                },
                "quantity": {
                  "type": "string",
                  "description": "Default 1"
                },
                "unit_price": {
                  "type": "string",
                  "description": "Before tax"
                },
                "revenue_account_id": {
                  "type": "string",
                  "description": "An income account (default: the sales account)"
                },
                "sales_tax_code": {
                  "type": "string",
                  "description": "One of the business's tax options (invoice_settings: tax_options), or empty for none"
                },
                "tax_amount": {
                  "type": "string",
                  "description": "Only to override the computed tax"
                }
              },
              "required": [
                "description",
                "unit_price"
              ]
            }
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "terms_days": {
            "type": "integer"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "reminders_enabled": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "fx_rate": {
            "type": "string",
            "description": "Invoices in another currency: books' currency per 1 of the invoice's (e.g. 1.3684 CAD per USD). Default: the reference rate on the issue date (get_fx_rate names its source). Give one to book at your own rate, or an empty string to go back to the reference rate."
          },
          "trade_name": {
            "type": "string",
            "description": "The trade name this invoice leads with, instead of the one in invoice_settings. Use it when one legal entity runs more than one business. An empty string prints no trade name, just the legal name. Default: the invoice settings' trade name"
          },
          "use_default_trade_name": {
            "type": "boolean",
            "description": "True puts the invoice back on the invoice settings' trade name. Don't pass it with trade_name"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    },
    {
      "name": "upload_document",
      "title": "Upload Document",
      "description": "Add a receipt, bill or invoice the user shares (PDF, JPEG, PNG, HEIC or WebP, up to 15 MB). It's read like a receipt emailed to Solarium and lands in review as a draft, matched to its transaction when one exists. A spreadsheet (CSV or XLSX, like a Shopify or Stripe export) is kept as a document for the team and isn't read as a receipt. Book a Stripe balance export with import_stripe_balance, and bring Wave's accounting export, trial balance and receipts ZIP in with import_wave (pass each document_id). For a bank or card statement pass kind=statement: it's stored (PDF only, account_id optional) without being read as a receipt, list_statements shows it, and reconcile_card_statement takes its statement_id. Pass the file as content_base64, or url (a public https link), or file (an attached file), or gmail_message_id (a message in the business's connected Gmail: its attachments are added, or with none the email itself as a PDF). Pass event_id to attach it to that transaction in the same step (and to QuickBooks when the transaction is there). Previews by default: pass apply=true to add it.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "description": "The file's name, like receipt.pdf. Not needed with gmail_message_id."
          },
          "gmail_message_id": {
            "type": "string",
            "description": "A Gmail message id, when the business has Gmail connected. Instead of a file."
          },
          "content_base64": {
            "type": "string",
            "description": "The file's bytes, base64 encoded."
          },
          "url": {
            "type": "string",
            "description": "A public https link to the file."
          },
          "file": {
            "type": "object",
            "description": "An attached file.",
            "properties": {
              "download_url": {
                "type": "string"
              },
              "file_id": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "file_name": {
                "type": "string"
              }
            },
            "required": [
              "download_url",
              "file_id"
            ]
          },
          "note": {
            "type": "string",
            "description": "Anything to remember about it, kept on the receipt."
          },
          "event_id": {
            "type": "string",
            "description": "A transaction to attach it to, from list_events."
          },
          "kind": {
            "type": "string",
            "enum": [
              "receipt",
              "statement"
            ],
            "description": "Default receipt."
          },
          "account_id": {
            "type": "string",
            "description": "For a statement: the card or bank it's for."
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        }
      }
    },
    {
      "name": "void_gone_from_qbo",
      "title": "Void Gone From QuickBooks",
      "description": "Void a synced transaction whose QuickBooks copy was deleted or voided there (audit_qbo_totals lists them as gone from QuickBooks), so the books stop counting it. QuickBooks is checked first and isn't written.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": false,
      "inputSchema": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "event_id",
          "reason"
        ]
      }
    },
    {
      "name": "void_invoice",
      "title": "Void Invoice",
      "description": "Void an invoice: its A/R booking leaves the books (refused while it has payments: remove them first with remove_invoice_payment). The number stays used.",
      "access": "change",
      "readOnly": false,
      "changesBooks": true,
      "reachesQuickBooks": true,
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "apply": {
            "type": "boolean",
            "description": "false (the default) previews and keeps nothing. true applies, once the user has confirmed."
          }
        },
        "required": [
          "invoice_id"
        ]
      }
    }
  ]
}
