{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "app.zeno-works.ch",
    "site": "zeno-works.ch",
    "addresses": [
      {
        "address": "185.178.193.123",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 207143,
          "name": "hosttech-AS - hosttech GmbH",
          "prefix": "185.178.192.0/22",
          "country": "DE"
        }
      },
      {
        "address": "2001:1680:101:6ee::123",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 9044,
          "name": "SOLNET - BSE Software GmbH",
          "prefix": "2001:1680::/29",
          "country": "CH"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "185.178.193.123",
          "2001:1680:101:6ee::123"
        ],
        "first_seen": "2026-11-22T07:25:02.905Z",
        "last_seen": "2026-11-24T07:32:00.699Z",
        "checks": 3
      }
    ],
    "hosting": [],
    "software": [
      {
        "value": "nginx",
        "evidence": "Server header \"nginx\""
      }
    ],
    "server_info": {
      "name": "zeno",
      "version": "0.1.0+405ecc9021",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "nginx",
      "strict-transport-security": "max-age=31536000; includeSubDomains"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "ch.zeno-works",
      "total": 0,
      "sample": []
    },
    "same_repository": null,
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "5119",
    "server_name": "ch.zeno-works/zeno",
    "url": "https://app.zeno-works.ch/mcp",
    "host": "app.zeno-works.ch",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-24T07:32:00.699Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "5634bfdb4a1e55852d934b3d63838d886eb1dd31ef63d3298e8a268f7916b4d8",
    "first_listed_at": "2026-11-21T06:28:01.803Z",
    "created_at": "2026-11-21T05:05:02.022Z",
    "resolved_addresses": [
      "185.178.193.123",
      "2001:1680:101:6ee::123"
    ]
  },
  "server": {
    "name": "ch.zeno-works/zeno",
    "title": "Zeno",
    "description": "AI bookkeeper for Swiss small companies: books invoices, reconciles the bank, keeps VAT current.",
    "version": "0.1.0",
    "registry_status": "active",
    "repository_url": null,
    "website_url": "https://zeno-works.ch",
    "published_at": "2026-10-11T18:36:40.726Z",
    "updated_at": "2026-10-11T18:36:40.726Z",
    "first_seen": "2026-11-21T05:05:01.195Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-24T07:32:10.780Z"
  },
  "operator": {
    "key": "zeno-works.ch",
    "name": "zeno-works.ch",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 4,
    "answered": 4,
    "answered_percent": 100,
    "avg_listing_latency_ms": 1164,
    "first_check_in_window": "2026-11-21T06:28:01.803Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-24",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "5634bfdb4a1e55852d934b3d63838d886eb1dd31ef63d3298e8a268f7916b4d8",
    "tools": 51,
    "resources": 0,
    "prompts": 0,
    "first_seen": "2026-11-24T07:32:01.916Z",
    "tool_names": [
      "find_operations",
      "describe_operations",
      "call_operation",
      "request_api_key",
      "start_signup",
      "collect_api_key",
      "whoami",
      "list_companies",
      "get_company",
      "global_search",
      "process_status",
      "book_documents_act",
      "reconcile_bank_act",
      "accept_autopost_decision",
      "upload_intake",
      "upload_document",
      "get_intake",
      "list_items",
      "get_item",
      "upload_bank_statement",
      "upload_accounting_import",
      "upload_accounting_document",
      "attach_cash_entry_receipt",
      "attach_claim_receipt",
      "ingest_expense_receipt",
      "import_payroll_employees",
      "gl_trial_balance",
      "list_gl_accounts",
      "get_gl_account_ledger",
      "list_gl_periods",
      "list_gl_open_items",
      "list_gl_journal_entries",
      "get_gl_journal_entry",
      "create_gl_journal_entry",
      "post_gl_journal_entry",
      "reverse_gl_journal_entry",
      "list_bank_accounts",
      "list_bank_entries",
      "get_bank_entry",
      "entry_candidates",
      "settle_entry",
      "list_ar_invoices",
      "get_ar_invoice",
      "list_counterparties",
      "list_gl_vat_periods",
      "get_financial_statements",
      "customer_statement",
      "get_bank_status",
      "zeno_info",
      "zeno_overview",
      "onboarding_guide"
    ],
    "declared": {
      "tools": [
        {
          "name": "find_operations",
          "description": "Search EVERY operation this server offers, including the ones not in your tool list.\n\nThe tool list you can see holds only the common operations. Several hundred\nmore — payroll, VAT returns, year-end close, fixed assets, expenses, cash\nbook, settings, integrations, onboarding — are available but unlisted, and\nthis is how you find them. **Search here before concluding that Zeno cannot\ndo something.**\n\nCall with no arguments to browse the catalogue of areas (tags) with their\noperation counts; with ``tag`` to list one area; with ``query`` to search by\nkeyword. **Every word contributes and matching all of them doubles the score**,\nso extra words widen the search rather than narrowing it — the AND-then-fall-back-\nto-OR behaviour this said before was removed in `ef47aa9ab`. A word matching an\noperation's *name* counts for far more than one found in its description, so\nprefer the noun you are looking for over a sentence.\n\n``limit`` is capped at 100 per call; when more matched, ``next_offset`` gives\nthe ``offset`` that returns the following page, so an area of any size can be\nread in full. Paging is stable — the ranking is deterministic and the registry\nis fixed at startup, so no operation is dropped or repeated between pages.\n\nPass a promising ``name`` to ``describe_operations`` for its arguments, then\nrun it with ``call_operation``.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "tag": {
                "type": "string",
                "default": ""
              },
              "limit": {
                "type": "integer",
                "default": 25
              },
              "query": {
                "type": "string",
                "default": ""
              },
              "offset": {
                "type": "integer",
                "default": 0
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "describe_operations",
          "description": "Get the full argument schema for operations found via ``find_operations``.\n\nReturns each operation's description and JSON-Schema arguments — everything\na listed tool would have shown you.\n\n``include_output_schema`` is the ONLY way to obtain an operation's result\nshape: ``tools/list`` publishes no output schema for any operation, listed or\nnot (they are 67 % of the payload, and a schema describing a *result* is not\nwhat you need to *choose* a tool). Ask for it when you must know the shape in\nadvance; the result itself comes back as JSON either way, so usually you do not.\n\nUp to 10 operations per call; anything beyond that is reported in\n``omitted`` rather than dropped.",
          "inputSchema": {
            "type": "object",
            "required": [
              "names"
            ],
            "properties": {
              "names": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "include_output_schema": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "call_operation",
          "description": "Run any operation by name — the ones in your tool list and the unlisted ones alike.\n\n``name`` is an operation name from ``find_operations``; ``arguments`` is the\nobject described by ``describe_operations`` (omit it for an operation that\ntakes none). The result, and any error, are exactly what calling the\noperation directly would give you.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "arguments": {
                "anyOf": [
                  {
                    "type": "object",
                    "additionalProperties": true
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "request_api_key",
          "description": "Ask the user to hand this session a Zeno API key. **Use this first** — every\ncurrent Zeno user already has an account.\n\n`email` is the address on their Zeno account. **Ask them for it**; you cannot\nguess it, and the request is aimed by it — Zeno will only show it to somebody\nsigned in as the owner of that address. Pass `client_name` too: it is the only\nthing identifying you on the approval page, and without it the person is asked to\ntrust \"an unnamed client\".\n\nReturns a plain `verification_uri`. Tell the user to open it, sign in, and approve\nthe request waiting there; we also email them a notice. **There is no code**, in\neither direction: nothing to read out, nothing to type, and nothing for you to put\nin a link.\n\nThen call `collect_api_key` with the `claim_token` returned here, waiting\n`poll_interval_seconds` between calls, until its `status` stops being `pending`. The user chooses on the page what the key may reach — usually a\nsingle company — so expect the key to be scoped, and read a 403 elsewhere as that\nscope rather than as a failure.\n\nThe answer is the same whether or not that address has a Zeno account. If nothing\never arrives, the likeliest cause is a mistyped address — ask, do not assume.",
          "inputSchema": {
            "type": "object",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "client_name": {
                "type": "string",
                "default": ""
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "start_signup",
          "description": "Create a Zeno account for somebody who does not have one yet.\n\nUse `request_api_key` first if they might already have an account — this tool\ncannot tell you, and deliberately never will.\n\nWe email `email` a verification link. The user opens it, sees that you asked\n(by the name in `client_name`, shown as an unverified claim), chooses their own\npassword, and decides separately whether to connect you. **You never see the\nlink**, and you must not ask for it: it is what proves they own the mailbox,\nand a link you could repeat is a link anyone could.\n\nThen poll `collect_api_key` with the `claim_token` returned here. `denied` is\nterminal and means the person chose to create the account without connecting\nyou, or refused outright — tell them plainly and stop; do not start another.",
          "inputSchema": {
            "type": "object",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "client_name": {
                "type": "string",
                "default": ""
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "collect_api_key",
          "description": "Collect the key once the user has approved.\n\n`status` is one of:\n\n- `pending` — nobody has approved yet, or (with `throttled: true`) we were\n  rate-limited and learned nothing. **Wait `poll_interval_seconds`, then call\n  again** — every answer carries it. Do not ask the user to tell you when they\n  are done: you cannot detect it any other way, and handing the wait back to the\n  user is how these sessions die.\n- `ready` — `api_key` is the credential. **Follow the `note` that comes with it\n  before anything else**: the key does nothing until the client's configuration\n  holds it, and calling again issues nothing. `scope` says what it can reach\n  (`onboarding`, `company` or `full`) and `company_id` which company, if any. **When\n  `scope` is `onboarding` the user has no company yet and this key exists to make\n  one: call `onboarding_guide` next** — it needs no key, so read it while the user\n  installs this one. It is the only place that says which documents to ask them\n  for, and asking for them all at once is the difference between one conversation\n  and seven.\n- `collected` — this request already issued its key and nothing new was issued.\n  Follow the `note`.\n- `denied` — **stop.** Do not start another request; a human refused it (\"that\n  was not me\"). Raising a second one is how a refusal turns into a prompt the\n  user has to refuse repeatedly.\n- `expired` — the request timed out. **Do not simply open another one**, and\n  what to do depends on which door you opened, which only you know.\n  `request_api_key`: ask whether they saw the approval page, and call it again if\n  they want to retry. `start_signup`: they may have finished registering in the\n  browser meanwhile, in which case they now HAVE an account and\n  `request_api_key` is the path — ask. If they did not, tell them plainly that it\n  timed out; starting another signup without asking is how a refusal turns into a\n  prompt they have to refuse repeatedly.\n\nA `pending` answer is a success, not an error; it is deliberately not an error\nstatus, because an error would be read as \"do not retry\" and retrying is the\nentire protocol. A rate limit mid-wait is reported the same way, with\n`throttled: true` and a longer `poll_interval_seconds` — slow down, do not stop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "claim_token"
            ],
            "properties": {
              "claim_token": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "whoami",
          "description": "Which user this request acts as, and which company's books it is bound to (jwt or API key).\n\nZeno serves every tenant from one host, and an API key is opaque — nothing else\ntells a connected agent whose books it is about to write. Call this FIRST when\nworking over MCP: ``company_scoped: true`` means this connection's data access\nis confined to ``company_id`` — ``company_name`` names it (null here means the\nbound company no longer exists), no other tenant is reachable, and the admin\nendpoints are refused however privileged the owner is. ``is_admin`` is that\nowner's bit: worth nothing outside this company, still full authority inside it,\nso a scoped key with ``is_admin: true`` may write these books even when\n``company_role`` is null. ``company_scoped: false`` means the credentials carry\nthe owner's full principal and ``memberships`` lists the companies it can act\nin. Read-only and cheap — at most one lookup. ZET-171, ZET-176.\n\n``credential_purpose`` says which kind of credential this is, and is what the\nwithholding rule keys on (SP-08): anything that is neither ``full`` nor ``session``\nis confined, and gets ``memberships`` **withheld — null, not empty**.\n\nWorking over MCP, what you book or accept is recorded as MCP — not as this user\nacting in person — and the app displays it that way.\n\n``capabilities`` says what this caller may do, each verdict computed from the\npredicate the gate itself evaluates (SP-12) — so an agent learns what it cannot do\nbefore it collides rather than after. A credential confined **to a company** gets the\nentries whose verdict is a fact about the *credential*; the one that would read the\nowner's estate (``create_company``) is omitted, because its verdict would disclose a\nsibling tenant. A credential confined to **no** company — an onboarding key — has no\nsibling to disclose and does get it, which is the one operation such a key exists to\ncall. ``pending_admin_actions`` is present and empty until PRE-03/PRE-04 fill it.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {}
          }
        },
        {
          "name": "list_companies",
          "description": "List companies (jwt, scoped). Non-admins see only their member companies.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {}
          }
        },
        {
          "name": "get_company",
          "description": "Get one company (jwt, scoped). 403 for a non-member non-admin, 404 if absent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "global_search",
          "description": "Full-text search across emails + items, ranked by ``ts_rank_cd``, scoped (A1).\n\n``archive_status`` constrains item results only (the Documents → Archive page\npasses ``archived`` so its search box never surfaces pending/triage-parked items).",
          "inputSchema": {
            "type": "object",
            "required": [
              "q"
            ],
            "properties": {
              "q": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(email|item)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "source": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(email|epost|upload|bexio|abacus)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "direction": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(payable|receivable)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "archive_status": {
                "anyOf": [
                  {
                    "enum": [
                      "pending",
                      "archiving",
                      "archived",
                      "failed"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "process_status",
          "description": "Is this company done, and what next (ZEN-2). Start and end here.\n\n``done``: no held AI proposal, no unmatched or partly matched bank movement, Suspense\nexplained, no unreadable, waiting, unreviewed or rejected-unbooked document (``null`` when\nit cannot be checked). Lists every open item; work them through ``book_documents_act`` or\n``reconcile_bank_act`` as each row's ``process`` says. Read-only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 100,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "book_documents_act",
          "description": "One action on one open document (ZEN-2): an action its row offers, with its ``version``.\n\n``accept`` posts the held proposal; ``reject`` closes it unposted (a person books the\ndocument); ``keep``, ``reanalyze``, ``mark_irrelevant``, ``delete``; ``skip`` / ``unskip``\nleave it to a person. All but accept and unskip need a ``reason``. Recorded with your user;\nan agent decides a hold only where the owner allowed it (a hold for autonomy off or the\namount cap: ``warnings`` says so). Returns the new status.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "decision_id",
              "action",
              "version"
            ],
            "properties": {
              "action": {
                "enum": [
                  "accept",
                  "reject",
                  "keep",
                  "reanalyze",
                  "mark_irrelevant",
                  "delete",
                  "ignore",
                  "skip",
                  "unskip"
                ],
                "type": "string"
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "string",
                "maxLength": 32
              },
              "company_id": {
                "type": "string"
              },
              "decision_id": {
                "type": "string",
                "maxLength": 200
              }
            }
          }
        },
        {
          "name": "reconcile_bank_act",
          "description": "One action on one open bank movement (ZEN-2), with its row's ``version``: ``accept`` its\nheld proposal, ``ignore`` it, ``skip`` / ``unskip``. Ignore and skip need a ``reason``;\nrecorded with your user. Link and settle through the row's ``operations``. Returns the new\nstatus.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "decision_id",
              "action",
              "version"
            ],
            "properties": {
              "action": {
                "enum": [
                  "accept",
                  "reject",
                  "keep",
                  "reanalyze",
                  "mark_irrelevant",
                  "delete",
                  "ignore",
                  "skip",
                  "unskip"
                ],
                "type": "string"
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "string",
                "maxLength": 32
              },
              "company_id": {
                "type": "string"
              },
              "decision_id": {
                "type": "string",
                "maxLength": 200
              }
            }
          }
        },
        {
          "name": "accept_autopost_decision",
          "description": "One-click accept of a **held** decision (accountant) — posts the AI's proposal.\n\nA person's accept overrides the soft guardrails. An agent's is refused (403) unless\nthe row is ``agent_acceptable`` or an expense receipt. Closed period, sealed year,\nunknown account: 409/422. The row flips ``held → posted`` (again: 409);\n``accepted_by_kind`` records the channel (``mcp`` over MCP). An agent's accept of a\nhold for autonomy off or the amount cap answers ``warning.personOnlyActByAgent``.\n\nOptional ``body``: ``expense:receipt:item:`` needs\n``employee_id`` + ``category_id``; ``autopost:capitalize:`` needs\n``fixed_asset_category_id`` when the hold has none, and ``needs_split_source`` a\n``reclassify_from_account_code``.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "decision_id"
            ],
            "properties": {
              "body": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "category_id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "employee_id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "useful_life_months": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fixed_asset_category_id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reclassify_from_account_code": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "description": "Optional ``POST /autopost-decisions/{id}/accept`` body; omit it for other kinds."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "decision_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "upload_intake",
          "description": "Upload ANY file; the system decides what it is (the unified intake queue,\nthe web app's Documents > Upload). ``file_base64``: raw bytes, base64.\n\nPrefer this unless plainly an invoice; always for bank statements (CAMT.053\nXML, PDF, CSV or .xlsx; not legacy .xls), matched to the registered bank account\nby IBAN; journal/accounting exports; balance sheets, P&L and VAT filings. A\nmixed .zip is routed per file.\n\nReturns 202 and the queue row; poll ``get_intake`` for the outcome and targets.\nAn unroutable file fails with its reason, never dropped.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "upload_document",
          "description": "Upload an INVOICE or RECEIPT (PDF, image, or .zip of them) for analysis.\n``file_base64`` is the file's raw bytes, base64-encoded. ``direction`` is\n``payable`` (incoming supplier invoice) or ``receivable`` (outgoing).\nCreates Item(s) and queues extraction.\n\nThis door is invoices-only: it never routes a file onward by type, so a\nbank statement, a journal export or a balance sheet sent here is analysed\nand then just sits as a document. For anything that is not an invoice — or\nwhen you are not sure what the file is — use ``upload_intake``.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "direction": {
                "type": "string",
                "default": "payable"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_intake",
          "description": "Get one intake row by id (scoped to its company: 404/403 split).",
          "inputSchema": {
            "type": "object",
            "required": [
              "intake_id"
            ],
            "properties": {
              "intake_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_items",
          "description": "List/filter items, scoped to the caller's member companies (A1).\n\nOptional ``period`` (``YYYY-MM``) filters by the item's effective date\n(invoice date, falling back to the Europe/Zurich-local ingestion date); a\nmalformed value returns 422 ``{\"msg\": \"period must be YYYY-MM\"}``.\n``exclude_triage_status`` drops items carrying that triage verdict (NULL-safe;\nfor ``unrelated`` not a booked one, ZCT-954).\n\nOptional ``q``: a case-insensitive substring match over the filename and both\ncounterparty names (linked, and extracted ``data.company``).\n\n``duplicate`` filters on the row's ``is_duplicate`` flag (ZET-413); ``credit_note`` on\nits ``is_credit_note`` flag (ZET-429) — both server-side, so ``total`` stays exact.\n``posted`` filters on the posting badge (ZCT-811): ``true`` = posted, ``false`` = held,\nreversed or not booked; a copy filed with the booking of the same invoice (\"Already\nbooked\", ``posting.filed_with``) is in neither (ZEN-1). ``overdue`` (D08-G14): due before\ntoday (Zurich), still owing, not a credit note. Owing is the open item's rest; a document with\nno open item is owing until a bank movement is linked to it (R2-2).",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "q": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "paid": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 200,
                "minimum": 1
              },
              "order": {
                "enum": [
                  "date_desc",
                  "due_asc"
                ],
                "type": "string",
                "default": "date_desc"
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "period": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "posted": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "anyOf": [
                  {
                    "enum": [
                      "email",
                      "epost",
                      "upload",
                      "bexio",
                      "abacus",
                      "filesystem",
                      "clouddrive"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "overdue": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "direction": {
                "anyOf": [
                  {
                    "enum": [
                      "payable",
                      "receivable",
                      "unknown"
                    ],
                    "type": "string",
                    "description": "Query-filter vocabulary for ``Item.direction`` — NEVER a column type.\n\n``Item.direction`` is tri-state (``payable``/``receivable``/NULL = unknown);\nthe PG ``direction`` enum stays binary. This enum exists so list endpoints\ncan accept ``direction=unknown`` (→ ``direction IS NULL``) alongside the two\nreal values without widening the DB enum."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "duplicate": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credit_note": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "triage_status": {
                "anyOf": [
                  {
                    "enum": [
                      "irrelevant",
                      "needs_review",
                      "unrelated"
                    ],
                    "type": "string",
                    "description": "AI ingest-gate verdict parking an item in the Inbox (pipeline §\"Ingest triage\",\n§\"Relevance gate\").\n\nNULL = not triaged / normal flow. ``irrelevant``/``needs_review`` are the\nmetadata-triage verdicts on a held-unusable item (a human override flips\nbetween them; re-analysis resets the columns to NULL). ``unrelated`` is the\nrelevance-gate verdict on a *cleanly extracted* invoice that doculyse's\nentity resolver matched to neither party of the owning company — the item is\nheld ``pending`` (never archived, no counterparty, never coded) until a human\nrestores it (clears the verdict) or deletes it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "archive_status": {
                "anyOf": [
                  {
                    "enum": [
                      "pending",
                      "archiving",
                      "archived",
                      "failed"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "analysis_failed": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "counterparty_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exclude_triage_status": {
                "anyOf": [
                  {
                    "enum": [
                      "irrelevant",
                      "needs_review",
                      "unrelated"
                    ],
                    "type": "string",
                    "description": "AI ingest-gate verdict parking an item in the Inbox (pipeline §\"Ingest triage\",\n§\"Relevance gate\").\n\nNULL = not triaged / normal flow. ``irrelevant``/``needs_review`` are the\nmetadata-triage verdicts on a held-unusable item (a human override flips\nbetween them; re-analysis resets the columns to NULL). ``unrelated`` is the\nrelevance-gate verdict on a *cleanly extracted* invoice that doculyse's\nentity resolver matched to neither party of the owning company — the item is\nheld ``pending`` (never archived, no counterparty, never coded) until a human\nrestores it (clears the verdict) or deletes it."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "get_item",
          "description": "Item metadata (any source).",
          "inputSchema": {
            "type": "object",
            "required": [
              "item_id"
            ],
            "properties": {
              "item_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "upload_bank_statement",
          "description": "Import a BANK STATEMENT. CAMT.053 XML books at once; PDF, CSV, .xlsx queue\n(``list_bank_statement_imports``); .zip splits; legacy .xls, UTF-16 CSV refused.\nCSV/.xlsx imports only if opening + lines = closing, else nothing; with no\nprinted opening/closing balance it fails until the person's balances per\n``balances_needed`` (and the account if no IBAN) come via\n``assign_bank_statement_import_accounts``. ``file_base64``: raw bytes, base64.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "upload_accounting_import",
          "description": "Import a JOURNAL EXPORT (CSV/Excel) from another accounting system\n(``source_system``, e.g. bexio, abacus) and match it against the bank entries.\n``file_base64`` is the file's raw bytes, base64.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64",
              "source_system"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              },
              "source_format": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "source_system": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "upload_accounting_document",
          "description": "Upload a company's BALANCE SHEET, P&L or VAT return (PDF, PNG, JPEG, XLSX)\nto be read; queued, follow ``get_accounting_document``. ``fiscal_year`` when the\nfile does not say; ``force`` re-reads a file already read.\n``file_base64`` is the file's raw bytes, base64.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "default": false
              },
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              },
              "fiscal_year": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "attach_cash_entry_receipt",
          "description": "Attach a receipt to a posted cash-book entry: a new file (``file_base64``,\nthe raw bytes, base64) OR an existing document's ``item_id``, exactly one.\n``override_duplicate`` only after a duplicate refusal you checked.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "register_id",
              "entry_id"
            ],
            "properties": {
              "item_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "entry_id": {
                "type": "string"
              },
              "filename": {
                "type": "string",
                "default": "receipt.pdf"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "register_id": {
                "type": "string"
              },
              "override_duplicate": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "attach_claim_receipt",
          "description": "Attach a receipt to an expense-claim line: a new file (``file_base64``, the\nraw bytes, base64) OR an existing document's ``item_id``, exactly one; repeat\nthat ``item_id`` as ``receipt_from_upload`` when ``ingest_expense_receipt``\nreturned it. ``override_duplicate`` only after a duplicate refusal you checked.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "claim_id",
              "line_no"
            ],
            "properties": {
              "item_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "line_no": {
                "type": "integer"
              },
              "claim_id": {
                "type": "string"
              },
              "filename": {
                "type": "string",
                "default": "receipt.pdf"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "override_duplicate": {
                "type": "boolean",
                "default": false
              },
              "receipt_from_upload": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "ingest_expense_receipt",
          "description": "Upload ONE expense receipt to put on a claim: it is held from automatic\nbooking; poll ``get_expense_receipt``, then attach its ``item_id`` with\n``attach_claim_receipt``. ``file_base64`` is the file's raw bytes, base64.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "import_payroll_employees",
          "description": "Import employees from the filled-in template\n(``get_payroll_employee_import_template``, .xlsx/.csv). All or nothing;\nexisting ``employee_no`` rows are skipped. ``dry_run`` only reports.\n``file_base64`` is the file's raw bytes, base64.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "filename",
              "file_base64"
            ],
            "properties": {
              "dry_run": {
                "type": "boolean",
                "default": false
              },
              "filename": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "file_base64": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "gl_trial_balance",
          "description": "Per-account debit/credit columns for one fiscal year, with totals.\n\n``fiscal_year`` (year label) defaults to the latest year posted in; ``period_id``\nnarrows to one period of it. No all-years mode — account identity is\n``(company, fiscal year, code)``, so aggregating double-counts silently (ZET-155).\nUnknown year/period → 404; period outside the year → 422.\n\nCut by the line's stamped ``fiscal_year_id``, not its posting date;\n``…/financial-statements`` cuts by posting date inside the same year's stored\nwindow, so the two differ only on a line dated outside the year it is stamped to.\n``fiscal_year_cut`` names the cut (ZET-166).",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "period_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "fiscal_year": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "list_gl_accounts",
          "description": "List the postable chart (CompanyMember). ``fiscal_year`` filters to one year's chart\n(the chart is FY-scoped, so codes repeat across years).",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "company_id": {
                "type": "string"
              },
              "fiscal_year": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "get_gl_account_ledger",
          "description": "One account's ledger (Kontoauszug) — every booking that touched it, in date\norder, with Soll/Haben and the running balance after each line (CompanyMember).\n\nNo fiscal-year parameter: the chart is FY-owned, so ``account_id`` already\nfixes the year. Posted **and** reversed entries are included (a reversal is a\nsecond posted entry, so both legs must show or the balance is wrong); drafts\nare not. The running balance is carried across pages by the server —\n``page_opening_balance`` enters this page's first row, while\n``closing_balance``/``total_debit``/``total_credit`` describe the whole\nwindow. 404 when the account is not this company's; 422 when ``date_from`` is later\nthan ``date_to``.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "account_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "date_to": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "date_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "account_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "dimension_value_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 21
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "list_gl_periods",
          "description": "The company's **accounting periods** — the months a journal entry may post into\n(CompanyMember read).\n\nA period belongs to one fiscal year and carries ``period_no`` (1..12 within the\nyear), ``date_from``/``date_to`` and a ``status``: ``open`` accepts postings,\n``soft_closed`` still accepts them, and ``closed``/``year_closed`` refuse them — a\nposting date inside a closed period fails until an accountant explicitly reopens\nthe period (``POST …/gl/periods/{period_id}/reopen``, reason required, recorded in\nthe close-run ledger — ZET-161).\n``fiscal_year_id`` narrows to one year; omitted, every year's periods come back.\n\nThis is **not** the VAT filing calendar — those are the ``gl_vat_period`` rows of\n``GET …/gl/vat/periods``, which have their own quarterly/monthly cadence and their\nown ``filed``/``paid`` sealing. Use this list to find the ``period_id`` a manual\njournal entry needs, and to check *why* a posting date was refused.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              },
              "fiscal_year_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "list_gl_open_items",
          "description": "One page of the AR/AP subledger (member read).\n\n``direction`` filters server-side (ZCT-577); omit it for both.\n``commercial_document_id`` narrows to one document's item (D09-G13); not with ``as_of``.\n\n``as_of`` (ZCT-577) reconstructs each item's open amount from posted journal lines\ndated on or before that date, instead of reading today's cached amount. Items are\nconsidered **regardless of their current status** (one settled since that date was\nopen on it), so ``status`` is refused alongside it rather than silently ignored.\n``original_amount`` and ``status`` on each row remain the item's own, current facts.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "as_of": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "status": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "enum": [
                        "open",
                        "partial",
                        "settled",
                        "overdue",
                        "written_off",
                        "cancelled"
                      ],
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "direction": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(receivable|payable)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "counterparty_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 21
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "commercial_document_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 21
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "list_gl_journal_entries",
          "description": "List journal entries.\n\n``period_ids`` narrows to specific fiscal periods, and is how a caller asks for\n**one fiscal year**: the year's period ids (ZET-285). Without it the route lists every\nfiscal year. ``total`` is the filtered total.\n\n``untagged_subledger_control=true`` narrows to the entries that posted to an\nAR/AP control account **without** touching the subledger, under\n``allow_untagged_control`` (ZET-150) — the postings a subledger-vs-control\ndivergence traces back to.\n\n``origin``: one entry origin (ZEN-42). ``account_id``: entries with a line on it;\n``date_from``/``date_to``: posting date; ``amount_min``/``amount_max``: the entry total.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "q": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sort": {
                "enum": [
                  "entry_no",
                  "posting_date",
                  "total"
                ],
                "type": "string",
                "default": "posting_date"
              },
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "order": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "default": "desc"
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "origin": {
                "anyOf": [
                  {
                    "enum": [
                      "human",
                      "system",
                      "ai",
                      "api",
                      "mcp",
                      "chat"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "date_to": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "date_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "account_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amount_max": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "string",
                    "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amount_min": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "string",
                    "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "period_ids": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "coding_guessed": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "untagged_subledger_control": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "get_gl_journal_entry",
          "description": "One entry + lines, plus the subledger rows it produced/touched (Gap B detail\nsurfacing): its ``gl_vat_posting`` rows, its ``gl_vat_zero_posting`` turnover-only\ndeclarations (zero-rated/exempt output — R2-13b: these have no VAT line to pair, so\nwithout them a correctly coded 0 % line is indistinguishable from an untagged one)\nand referenced ``gl_open_item`` rows. A declared base line also carries the resolved\ncode on ``lines[].vat_code``. Drafts carry empty lists. ``documents`` carries the\naccounting documents explicitly attached to the entry (``POST …/documents``) — the\nevidence for a hand-booked entry; a pipeline-created entry carries its document\nthrough ``source_ref_*`` instead and lists nothing here. Member read, like the rest of\nthe detail.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "entry_id"
            ],
            "properties": {
              "entry_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "create_gl_journal_entry",
          "description": "Create a **draft** journal entry by hand — accountant. It carries NO source document\nunless you name one.\n\n``document_id`` attaches an existing ``gl_document`` (``POST …/gl/documents``) as its\nsource document; ``POST …/gl/journal-entries/{id}/documents`` does it later, also on a\nposted entry.\n\nIt is for a booking with no document behind it (a reclassification, provision, accrual\nor year-end adjustment); over an API key the answer carries the warning\n``warning.rawJournalEntryFromApiKey``. **Never transcribe a document into it.**\nEach of these has a door that keeps the evidence attached:\n\n- an invoice, receipt or statement → ingest the file (``POST …/uploads/`` or\n  ``…/intake``), then accept what the coder proposes (``…/autopost-decisions``);\n- an already-ingested item → ``POST …/gl/items/{item_id}/coding``;\n- a bank movement with no document → ``POST /bank-entries/{entry_id}/manual-coding``;\n- opening balances → ``POST …/opening-entries`` and post the proposal.\n\n``auto_reverse_date`` arms the entry as a one-shot accrual: once posted, the\nauto-reversal executor reverses it in full on/after that date. It must be after\n``posting_date`` (422 otherwise), and it can only be set while the entry is a draft —\non the create here or on the ``PUT`` replace.\n\nDrafts do not touch the books until ``…/post``. See ``doc/pipeline.md §\"Accounting\"``.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "period_id",
              "posting_date",
              "lines"
            ],
            "properties": {
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "account_id",
                    "line_role"
                  ],
                  "properties": {
                    "vat": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "code"
                          ],
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "amount": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "description": "VAT tag for a manual journal line (Gap B — manual-booking metadata completeness).\n\nTag **both** legs of a taxable movement with the same ``code`` (a company\n``gl_vat_code``): the taxable **base** line *and* its paired **VAT-control** line —\nposting groups the entry's lines by this tag to pair base with VAT line, and the\ncomposition guard refuses (409) any VAT-control line left untagged (ZET-158: a\nbase-line-only tag has no working path). One tagged control line per code.\n``amount`` (the tax, a magnitude) is read from the **base** line's tag and falls\nback to the paired VAT line's amount — when several base lines share one VAT line,\ngive each base line its own ``amount``, or every pair books the full VAT-line\namount. Exception: a catalog-linked **zero-rated output** code (0 % rate) books no\nVAT-control line at all — tag only the base line(s); each line tagged with such a\ncode declares its turnover once. On post the entry gains ``gl_vat_posting`` rows so\nthe lines reach the MWST-Abrechnung (``doc/pipeline.md §\"VAT\"``)."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "chf_only": {
                      "type": "boolean",
                      "default": false
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 3
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "line_role": {
                      "enum": [
                        "bank",
                        "ar",
                        "ap",
                        "revenue",
                        "expense",
                        "vat",
                        "payroll_liability",
                        "salary_expense",
                        "fixed_asset",
                        "depreciation",
                        "inventory",
                        "cogs",
                        "clearing",
                        "rounding",
                        "fx_gain_loss",
                        "suspense",
                        "inventory_count",
                        "inventory_reserve"
                      ],
                      "type": "string"
                    },
                    "open_item": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "create": {
                              "type": "boolean",
                              "default": false
                            },
                            "due_date": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "description": "Open a new AR/AP subledger item from a manual control line (Gap B).\n\nSet ``create=true`` on the line posting to the AR/AP control account; ``due_date`` seeds\naging. Direction is derived from the account's ``control_type``. To settle/adjust an\n*existing* item instead, pass ``open_item_id`` on the line (its balance is rebuilt on post)."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "amount_base": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "open_item_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 21
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amount_currency": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counterparty_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dimension_value_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 21
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "minItems": 1
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 3
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "period_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "entry_type": {
                "enum": [
                  "manual",
                  "invoice",
                  "payment",
                  "bank",
                  "vat",
                  "payroll",
                  "accrual",
                  "deferral",
                  "depreciation",
                  "inventory",
                  "closing",
                  "adjustment",
                  "reversal"
                ],
                "type": "string",
                "default": "manual"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "document_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "posting_date": {
                "type": "string",
                "format": "date"
              },
              "rebooks_entry_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "auto_reverse_date": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "customs_assessment": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "assessment_no",
                      "assessed_on",
                      "assessed_vat_chf"
                    ],
                    "properties": {
                      "kind": {
                        "enum": [
                          "assessment",
                          "additional"
                        ],
                        "type": "string",
                        "default": "assessment",
                        "description": "'additional': an additional assessment carrying only its increment. A replacement is refused: reverse the replaced booking first."
                      },
                      "assessed_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Assessment date: the input VAT is deducted in its VAT period (Art. 40(4) MWSTG), on the collected basis too."
                      },
                      "assessment_no": {
                        "type": "string",
                        "maxLength": 100,
                        "minLength": 1,
                        "description": "The BAZG assessment (Veranlagungsverfügung) number."
                      },
                      "assessed_vat_chf": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                          }
                        ],
                        "description": "Import VAT assessed, base currency ('additional': the increment). The VAT lines must sum to it, else 422."
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "post_gl_journal_entry",
          "description": "Post a draft entry into the books — accountant. One-way.\n\nA posted entry can no longer be replaced or discarded (both refuse with 409); the only\ngeneral correction is ``…/reverse``, which leaves both the original and the reversal\nvisible. The one exception is ``PUT …/guessed-account``, which re-points a\n``coding_guessed`` entry's expense account in place — and it works *only* on a posted\nentry. Check the draft before posting rather than after. Over an API key the answer\ncarries the ``warning.rawJournalEntryFromApiKey`` warning.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "entry_id"
            ],
            "properties": {
              "body": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "not_vat": {
                        "type": "boolean",
                        "default": false,
                        "description": "Acknowledge that code-less lines on VAT accounts (1170/2200...) are not VAT: a reclass within one side, undoing a netting, a payment with a fee line, a payment or settlement on an account used for both directions, or opening balances in a hand-built opening entry (ZET-159). Recorded on the audit row. A VAT payment or settlement on one-direction VAT accounts (only cleared: debit output, credit input; against bank/cash, the settlement account or each other) needs no flag. Off by default: an untagged VAT movement must fail, not miss the MWST-Abrechnung."
                      },
                      "bank_entry_ids": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "maxItems": 50
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "confirm_chf_only": {
                        "type": "boolean",
                        "default": false
                      },
                      "suspense_no_movement": {
                        "type": "boolean",
                        "default": false
                      },
                      "allow_untagged_control": {
                        "type": "boolean",
                        "default": false,
                        "description": "Post an AR/AP control line with no open item (recorded on the entry). Not for VAT-account lines: see not_vat."
                      },
                      "confirm_bank_duplicate": {
                        "type": "boolean",
                        "default": false
                      },
                      "suspense_no_movement_reason": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "description": "Optional body for posting a manual entry.\n\n``allow_untagged_control``: an AR/AP control line with no open item (ZET-150).\n``not_vat``: code-less lines on VAT accounts that are not VAT (F2431). Both are\nrecorded; both off by default so the common mistake fails loudly."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entry_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "reverse_gl_journal_entry",
          "description": "**Storno** a posted journal entry: post its mirror image (accountant role).\n\nNothing is deleted; the original stays, linked, and the **reversal** entry is returned.\nThe only VAT-correct storno door — VAT postings, open items and what the document\nspawned are all unwound.\n\n``body.posting_date`` dates the reversal and decides its period; omitted, it reuses\nthe original's. A closed-period entry needs one in an open period: the reversal is\nbooked there; the entry stays unchanged. That correction is a person's act: an API key\nmay make it, and ``warnings`` then carries ``warning.personOnlyActByAgent``.\n\n**409** when: the entry is a reversal or already corrected; a payroll run holds it; the date\nfalls in a filed VAT period; an open item still carries a live settlement; the target period\nis closed or sealed; or a closed-period entry cannot be corrected (the reason is named). A\nclosed-period entry armed to reverse itself is left to the auto-reversal run (nightly, or\n``POST …/gl/auto-reversals/run`` by a person): ``conflict.closedPeriodEntryAutoReverses``.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "entry_id"
            ],
            "properties": {
              "body": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "posting_date": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entry_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_bank_accounts",
          "description": "The company's bank accounts — the ``bank_account_id`` every statement import,\nbank-entry list and reconciliation call needs (CompanyMember read).\n\nOldest first, no filter and no paging. Each row carries the ``iban``, ``currency``,\n``label``/``bank_name`` and ``ledger_account_number`` — the chart code this account\nposts through; **without one a bank movement cannot be coded**, and it is set with\n``PUT /bank-accounts/{account_id}``.\n\n``auto_created`` marks an account inferred from an imported statement rather than\ndeclared by a human; it starts ``ownership_status`` unconfirmed with\n``needs_ownership_review: true`` — confirm it before trusting its balances, since an\nunconfirmed IBAN may not be the company's at all. ``statement_count`` /\n``entry_count`` are ``null`` here (filled by the single-account\n``GET /bank-accounts/{account_id}``), which is not the same as zero.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_bank_entries",
          "description": "Bank movements (statement lines), latest first.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "q": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "flag": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "company_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credit_debit": {
                "anyOf": [
                  {
                    "enum": [
                      "credit",
                      "debit"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "match_quality": {
                "anyOf": [
                  {
                    "enum": [
                      "full",
                      "strong",
                      "partial",
                      "weak",
                      "manual",
                      "imported"
                    ],
                    "type": "string",
                    "description": "Graded bank-entry ↔ invoice match quality (match-quality feature, 2026-06-09).\n\nAuto bands (from how many matchable fields line up, see ``services.reconciliation``):\n``full`` > ``strong`` > ``partial`` > ``weak``. ``manual`` (user-created/confirmed)\nand ``imported`` (asserted by a source export) are provenance values that win over\nany auto band."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bank_account_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "counterparty_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bank_statement_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "settlement_status": {
                "anyOf": [
                  {
                    "enum": [
                      "unsettled",
                      "settled",
                      "partially_settled",
                      "suspense"
                    ],
                    "type": "string",
                    "description": "Clean-bank settlement state of a bank entry (distinct from ``reconciliation_status``,\nwhich the matcher owns). Set by ``settle_bank_entry``."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reconciliation_status": {
                "anyOf": [
                  {
                    "enum": [
                      "unmatched",
                      "partially_matched",
                      "matched",
                      "ignored"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "get_bank_entry",
          "description": "One bank movement with its reconciliation state and links.",
          "inputSchema": {
            "type": "object",
            "required": [
              "entry_id"
            ],
            "properties": {
              "entry_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "entry_candidates",
          "description": "Documents, booked invoices, open items one movement may pay; link one, then settle_entry.",
          "inputSchema": {
            "type": "object",
            "required": [
              "entry_id"
            ],
            "properties": {
              "entry_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "settle_entry",
          "description": "Post this reconciled bank entry into the GL (clean-bank settlement).\n\nMatched → Dr Bank / Cr AR; unmatched → Dr Bank / Cr Suspense; a previously-suspensed\nentry now fully matched → Dr Suspense / Cr AR. Idempotent; ``skipped`` when the GL chart\nis not configured for native settlement.\n\n**Skonto (ZEN-526).** ``cash_discounts`` names, per open item this movement pays, the cash\ndiscount the counterparty took, booked as ``POST …/gl/payments`` books\n``cash_discount_amount``. On an item a live payment of this movement already paid, it must\nbe exactly what is left open (item currency); it follows that payment and is reversed with\nit. 422 when no\nSkonto account is configured, the movement pays nothing of the item (a link is not enough),\ncash + discount exceeds what is open, its VAT does not fit, or the settle books nothing for\nthe item; 409 when a bill paid earlier is on an exported payment file. Nothing is booked on\nan error. Never proposed or applied without a person naming it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "entry_id"
            ],
            "properties": {
              "body": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cash_discounts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "open_item_id",
                            "amount"
                          ],
                          "properties": {
                            "amount": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                {
                                  "type": "string",
                                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                                }
                              ]
                            },
                            "open_item_id": {
                              "type": "string"
                            }
                          },
                          "description": "A Skonto the person confirms on a short match (ZEN-526, decision D8): the counterparty\ntook ``amount`` (the open item's own currency) as a cash discount, so the item is released\nby the movement's cash plus this, the discount booked on the direction's Skonto account\nwith its recognised VAT taken back — the payment door's leg, never a write-off."
                        },
                        "maxItems": 50
                      }
                    },
                    "description": "Optional body of ``POST /bank-entries/{id}/settle``. Empty (or no body) is the ordinary\nsettle; nothing is ever discounted unless a person names it here."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entry_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_ar_invoices",
          "description": "List authored AR invoices, newest first.\n\nOptional ``status`` / ``doc_type`` filter by lifecycle + document kind.\nOptional ``period`` (``YYYY-MM``) filters by the invoice's issue date (its\nmonth); a malformed value returns 422 ``{\"msg\": \"period must be YYYY-MM\"}``.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "period": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "enum": [
                      "draft",
                      "issued",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "Editorial lifecycle owned by ``ar_invoice`` (paid/overdue are derived on\nread from the linked ``gl_open_item``, not stored here)."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "doc_type": {
                "anyOf": [
                  {
                    "enum": [
                      "invoice",
                      "credit_note",
                      "down_payment"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "get_ar_invoice",
          "description": "One authored outgoing invoice with its lines (CompanyMember read).\n\nCarries the header (customer, dates, currency, discounts), every line with its\ncomputed ``net_amount``/``vat_amount``/``gross_amount``, the document totals, and\nthe lifecycle: ``status`` (``draft`` → ``issued`` → ``cancelled``), ``document_no``\n(assigned at issue — ``null`` on a draft), ``commercial_document_id`` /\n``snapshot_document_id`` (the booked document and the frozen PDF), plus the derived\n``payment_status`` and ``open_amount`` read from the linked open item.\n\nThis is the **authored** arm only. A receivable that arrived as an ingested\ndocument is an ``item``, not an ``ar_invoice``; the two arms are listed together by\n``GET …/ar/receivables``. Use ``GET …/ar/invoices/{invoice_id}/related`` for the\njournal entry, the settling bank transactions and the credit-note chain.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "invoice_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              },
              "invoice_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_counterparties",
          "description": "List a company's counterparties (filter by ``kind``/``q``, paginated).\n\n``kind`` repeats to filter on a set (``?kind=customer&kind=both``) — a\nrole-shaped picker asks for every kind that plays the role. A single\n``?kind=supplier`` keeps its original meaning.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "q": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "enum": [
                        "supplier",
                        "customer",
                        "both",
                        "employee"
                      ],
                      "type": "string",
                      "description": "Master-data axis of a counterparty (what the party primarily is).\n\n``employee`` (payroll SP1, brief frozen decision 6) is set **only** on\ncounterparties auto-created by ``payroll.master_data\n.ensure_employee_counterparty`` and is terminal — matching/merge flows never\nwiden it to ``both``. Who is an employee is ``gl_employee.counterparty_id``\n(ZEN-958 L4 retired the ``gl_counterparty_role`` projection); payroll logic\nnever branches on ``kind``."
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "list_gl_vat_periods",
          "description": "VAT return periods with status, filing and payment state, and the due windows.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "get_financial_statements",
          "description": "Computed balance sheet + P&L for a fiscal year, from the journal (CompanyMember).\n\nAggregates every posted GL journal line whose **posting date** falls in the fiscal\nyear's window, classifies each account against the chart of accounts, and reports\nproblems (unbalanced trial balance, unclassified accounts, year-not-opened, mixed\ncurrency). **Read-only and distinct** from the uploaded balance-sheet snapshots\n(``GET .../balance-sheets``): nothing here reads a snapshot. ``fiscal_year`` optional\n→ the latest FY with journal data. ``month`` (``YYYY-MM``, inside the FY — **422**\notherwise) narrows the statement to one month: the balance sheet stays cumulative\n(as of month end, YTD equity fold) while the P&L + cash flow cover that month's\nflows. Explicit non-member ``company_id`` → 403.\n\n**The cut**: ``posting_date`` inside the fiscal year's own window (``fiscal_year_cut``;\n``period_start``..``period_end`` is what was aggregated, ZET-166). ``/gl/reports/*`` cuts\nby the line's stamped ``fiscal_year_id``, so the two can differ on a line dated outside\nthe year it is stamped to.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "month": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "with_prior": {
                "type": "boolean",
                "default": false
              },
              "fiscal_year": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        {
          "name": "customer_statement",
          "description": "One customer's open items + totals (the aging row's drill-down).\n\n``as_of`` mirrors ``GET …/ar/aging`` — set, it reconstructs the items open at\nthat date so the statement agrees with a historical aging report.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id",
              "counterparty_id"
            ],
            "properties": {
              "as_of": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "company_id": {
                "type": "string"
              },
              "counterparty_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "get_bank_status",
          "description": "Composed bank snapshot — \"is my banking up to date?\" (CompanyMember). \"Reconciled\" means\nentries matched, NOT ledger = statement balance (the close check\n``BANK_BALANCE_DOES_NOT_TIE_OUT`` compares that).\n\nPer-account entry-status and ``in_suspense`` counts, each account's latest closing\nbalance, and the **company-level cumulative GL Suspense balance**. Non-zero suspense\nblocks a clean VAT close.\n\nRead-only. Gaps come from the account's **full** history: coverage windows are merged and\nevery internal hole reported (ZCT-509), so a run of missing statements is ONE gap. Not\nperiod-scoped; use ``…/reconciliation/completeness`` per month. ``period_gaps`` caps at\n10/account, ``period_gap_count`` stays exact — HOLES, not missing months. Explicit\nnon-member ``company_id`` → 403.",
          "inputSchema": {
            "type": "object",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              }
            }
          }
        },
        {
          "name": "zeno_info",
          "description": "What this server is, which MCP revision it speaks, and how to get a credential.\n\n**Needs no credential.** Call it first if a tool has just refused you: the\n`authentication` block names the tools that can get this session connected.",
          "inputSchema": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          }
        },
        {
          "name": "zeno_overview",
          "description": "What Zeno does, in one page — the platform's capabilities and its limits.\n\n**Needs no credential.** Read this before telling a user that Zeno cannot do\nsomething; it covers VAT, payroll, reconciliation and the AI accountant.",
          "inputSchema": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          }
        },
        {
          "name": "onboarding_guide",
          "description": "How to onboard and create a NEW company: what to ask the user for, which\ndocuments to request, and the order to run the setup in.\n\nDiscovery does not depend on search: this tool is in the tier, so it is listed for\nevery caller, and `BASE_INSTRUCTIONS` names it. `find_operations` does reach it\n(\"new company setup\" ranks it first), but a query made only of common words is\nstill decided by whichever tool happens to contain them.\n\n**Read this before you start a company setup**, and before you tell a user that\nsomething cannot be done here. It answers the questions the create's own schema\ncannot: which of fifteen sections actually matter, which documents produce them,\nand what it costs to skip one.\n\nIf your API key's purpose is `onboarding`, this is the only job it has.",
          "inputSchema": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": []
    },
    "instructions": "This server is Zeno, an accounting platform — bookkeeping, VAT, payroll,\nyear-end, reconciliation, invoicing and reporting for Swiss fiduciary work.\n\nHOW TO WORK IN THESE BOOKS\n\nThese are real books, not a scratchpad: bookings are expected to trace back to\nthe document that justifies them, and the pipeline is what creates that link.\nThis server hosts many tenants and your credentials decide which of them you are\nin — call whoami first to see the user you act as and the company, if any, your\nAPI key is confined to.\n\n1. Let Zeno read documents; never transcribe one. To book an invoice, receipt,\n   statement or contract, send the FILE (upload_document for an invoice or\n   receipt, upload_intake for anything else) and let the analyzer code it. A\n   journal entry you compose yourself carries no document. Copying\n   figures out of a document into create_gl_journal_entry is always the wrong\n   move, however reliable the figures look — attach_gl_journal_entry_document\n   files the evidence beside the booking, but nothing derives the booking FROM it,\n   which is the whole point of sending the file. Setting a company UP works the same\n   way: analyze_document reads a closing balance sheet into the opening snapshot,\n   extract_open_items an OP-Liste, extract_bank_account a statement's IBAN — the\n   figures those return are what resolve_balance, propose_bank_mapping and the\n   create expect, and typing them in by hand is the same mistake.\n   Start a setup with onboarding_guide: it lists what to ask the user for, which\n   documents to request, and the order those operations feed each other in.\n\n2. Uploading is not the end of the job. What the coder is unsure about is HELD,\n   not posted. Work the open items as a loop: process_status says whether the\n   company is done and lists every open item; book_documents_status and\n   reconcile_bank_status list a process's own, each row with its actions and\n   version. get_decision reads one row with its proposal, candidates and history;\n   focus_decision shows the user the one you are on, and get_decision_focus reads\n   the one they are on. Do one action with book_documents_act or reconcile_bank_act\n   (it returns the next status), and skip with a reason what you may not decide.\n   For rows that share a partner, a bank pattern or an account:\n   list_decision_groups lists them, get_decision_group previews one with its\n   totals, accept_decision_group accepts its members with their versions, each\n   checked as one accept would be; a refused member is skipped and reported.\n   get_work_list counts everything waiting; list_autopost_decisions\n   (outcome=\"held\", or cause=...) lists the proposals — page it with offset until\n   a page comes back empty, never assume one call saw them all. Each kind of open\n   item has its door:\n   - a held proposal: accept_autopost_decision ONLY where agent_acceptable is\n     true (the owner decides which), and a refusal stands. The rest are for a\n     person in the app: tell the user. Booking the held document or movement\n     yourself (code_gl_item, manual_code_entry) is held to the same rule and\n     refused likewise — except past a duplicate guard you have checked: a\n     document the AI holds as a bank booking's receipt books with\n     confirm_different_spend, and a movement whose coding is held with\n     confirm_not_open_item_payment. Confirm only what you checked. The\n     bank-journal export (bank_journal_post, bank_journal_render) can refuse\n     you over a document whose AI proposal is held or was rejected, whatever\n     agent_acceptable says and with no confirmation to pass, even where\n     journal_exportable reads true; the 403 fails your whole request and names\n     the movement to leave out, and a retry with it is refused again while that\n     proposal stays held or rejected.\n   - a decision with suggestion_only=true (a bank movement with no counterparty\n     IBAN) is for a person whatever agent_acceptable says: while it is held,\n     manual_code_entry refuses y"
  },
  "changes": {
    "total": 2,
    "latest": [
      {
        "observed_at": "2026-11-24T07:32:00.699Z",
        "from_sha": "dd3558079a7e758229398ae3e7a10c343180db0c28e83d6f15a907101b9be4a3",
        "to_sha": "5634bfdb4a1e55852d934b3d63838d886eb1dd31ef63d3298e8a268f7916b4d8",
        "summary": {
          "tool_changed": 5
        },
        "diff": [
          {
            "op": "changed",
            "kind": "tool",
            "name": "book_documents_act",
            "path": "/description",
            "after": "One action on one open document (ZEN-2): an action its row offers, with its ``version``.\n\n``accept`` posts the held proposal; ``reject`` closes it unposted (a person books the\ndocument); ``keep``, ``reanalyze``, ``mark_irrelevant``, ``delete``; ``skip`` / ``unskip``\nleave it to a person. All but accept and unskip need a ``reason``. Recorded with your user;\nan agent decides a hold only where the owner allowed it (a hold for autonomy off or the\namount cap: ``warnings`` says so). Returns the new status.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
            "before": "One action on one open document (ZEN-2): an action its row offers, with its ``version``.\n\n``accept`` posts the held proposal; ``reject`` closes it unposted (a person books the\ndocument); ``keep``, ``reanalyze``, ``mark_irrelevant``, ``delete``; ``skip`` / ``unskip``\nleave it to a person. All but accept and unskip need a ``reason``. Recorded with your user;\nan agent decides a hold only where the owner allowed it. Returns the new status.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted."
          },
          {
            "op": "changed",
            "kind": "tool",
            "name": "accept_autopost_decision",
            "path": "/description",
            "after": "One-click accept of a **held** decision (accountant) — posts the AI's proposal.\n\nA person's accept overrides the soft guardrails. An agent's is refused (403) unless\nthe row is ``agent_acceptable`` or an expense receipt. Closed period, sealed year,\nunknown account: 409/422. The row flips ``held → posted`` (again: 409);\n``accepted_by_kind`` records the channel (``mcp`` over MCP). An agent's accept of a\nhold for autonomy off or the amount cap answers ``warning.personOnlyActByAgent``.\n\nOptional ``body``: ``expense:receipt:item:`` needs\n``employee_id`` + ``category_id``; ``autopost:capitalize:`` needs\n``fixed_asset_category_id`` when the hold has none, and ``needs_split_source`` a\n``reclassify_from_account_code``.",
            "before": "One-click accept of a **held** decision (accountant) — posts the AI's proposal.\n\nA person's accept overrides the soft guardrails. An agent's is refused (403) unless\nthe row is ``agent_acceptable`` or an expense receipt. Closed period, sealed year,\nunknown account: 409/422. The row flips ``held → posted`` (again: 409);\n``accepted_by_kind`` records the channel (``mcp`` over MCP).\n\nOptional ``body``: ``expense:receipt:item:`` needs\n``employee_id`` + ``category_id``; ``autopost:capitalize:`` needs\n``fixed_asset_category_id`` when the hold has none, and ``needs_split_source`` a\n``reclassify_from_account_code``."
          },
          {
            "op": "changed",
            "kind": "tool",
            "name": "create_gl_journal_entry",
            "path": "/description",
            "after": "Create a **draft** journal entry by hand — accountant. It carries NO source document\nunless you name one.\n\n``document_id`` attaches an existing ``gl_document`` (``POST …/gl/documents``) as its\nsource document; ``POST …/gl/journal-entries/{id}/documents`` does it later, also on a\nposted entry.\n\nIt is for a booking with no document behind it (a reclassification, provision, accrual\nor year-end adjustment); over an API key the answer carries the warning\n``warning.rawJournalEntryFromApiKey``. **Never transcribe a document into it.**\nEach of these has a door that keeps the evidence attached:\n\n- an invoice, receipt or statement → ingest the file (``POST …/uploads/`` or\n  ``…/intake``), then accept what the coder proposes (``…/autopost-decisions``);\n- an already-ingested item → ``POST …/gl/items/{item_id}/coding``;\n- a bank movement with no document → ``POST /bank-entries/{entry_id}/manual-coding``;\n- opening balances → ``POST …/opening-entries`` and post the proposal.\n\n``auto_reverse_date`` arms the entry as a one-shot accrual: once posted, the\nauto-reversal executor reverses it in full on/after that date. It must be after\n``posting_date`` (422 otherwise), and it can only be set while the entry is a draft —\non the create here or on the ``PUT`` replace.\n\nDrafts do not touch the books until ``…/post``. See ``doc/pipeline.md §\"Accounting\"``.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
            "before": "Create a **draft** journal entry by hand — accountant. It carries NO source document\nunless you name one.\n\n``document_id`` attaches an existing ``gl_document`` (``POST …/gl/documents``) as its\nsource document; ``POST …/gl/journal-entries/{id}/documents`` does it later, also on a\nposted entry.\n\nA booking with no document behind it (a reclassification, provision, accrual or\nyear-end adjustment) is made by a person in the app; API keys are refused, document or not.\n**Never transcribe a document into it.** Each of these has a door that keeps the\nevidence attached:\n\n- an invoice, receipt or statement → ingest the file (``POST …/uploads/`` or\n  ``…/intake``), then accept what the coder proposes (``…/autopost-decisions``);\n- an already-ingested item → ``POST …/gl/items/{item_id}/coding``;\n- a bank movement with no document → ``POST /bank-entries/{entry_id}/manual-coding``;\n- opening balances → ``POST …/opening-entries`` and post the proposal.\n\n``auto_reverse_date`` arms the entry as a one-shot accrual: once posted, the\nauto-reversal executor reverses it in full on/after that date. It must be after\n``posting_date`` (422 otherwise), and it can only be set while the entry is a draft —\non the create here or on the ``PUT`` replace.\n\nDrafts do not touch the books until ``…/post``. See ``doc/pipeline.md §\"Accounting\"``.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted."
          },
          {
            "op": "changed",
            "kind": "tool",
            "name": "post_gl_journal_entry",
            "path": "/description",
            "after": "Post a draft entry into the books — accountant. One-way.\n\nA posted entry can no longer be replaced or discarded (both refuse with 409); the only\ngeneral correction is ``…/reverse``, which leaves both the original and the reversal\nvisible. The one exception is ``PUT …/guessed-account``, which re-points a\n``coding_guessed`` entry's expense account in place — and it works *only* on a posted\nentry. Check the draft before posting rather than after. Over an API key the answer\ncarries the ``warning.rawJournalEntryFromApiKey`` warning.",
            "before": "Post a draft entry into the books — accountant. One-way.\n\nA posted entry can no longer be replaced or discarded (both refuse with 409); the only\ngeneral correction is ``…/reverse``, which leaves both the original and the reversal\nvisible. The one exception is ``PUT …/guessed-account``, which re-points a\n``coding_guessed`` entry's expense account in place — and it works *only* on a posted\nentry. Check the draft before posting rather than after."
          },
          {
            "op": "changed",
            "kind": "tool",
            "name": "reverse_gl_journal_entry",
            "path": "/description",
            "after": "**Storno** a posted journal entry: post its mirror image (accountant role).\n\nNothing is deleted; the original stays, linked, and the **reversal** entry is returned.\nThe only VAT-correct storno door — VAT postings, open items and what the document\nspawned are all unwound.\n\n``body.posting_date`` dates the reversal and decides its period; omitted, it reuses\nthe original's. A closed-period entry needs one in an open period: the reversal is\nbooked there; the entry stays unchanged. That correction is a person's act: an API key\nmay make it, and ``warnings`` then carries ``warning.personOnlyActByAgent``.\n\n**409** when: the entry is a reversal or already corrected; a payroll run holds it; the date\nfalls in a filed VAT period; an open item still carries a live settlement; the target period\nis closed or sealed; or a closed-period entry cannot be corrected (the reason is named). A\nclosed-period entry armed to reverse itself is left to the auto-reversal run (nightly, or\n``POST …/gl/auto-reversals/run`` by a person): ``conflict.closedPeriodEntryAutoReverses``.",
            "before": "**Storno** a posted journal entry: post its mirror image (accountant role).\n\nNothing is deleted; the original stays, linked, and the **reversal** entry is returned.\nThe only VAT-correct storno door — VAT postings, open items and what the document\nspawned are all unwound.\n\n``body.posting_date`` dates the reversal and decides its period; omitted, it reuses\nthe original's. A closed-period entry needs one in an open period and a person:\nthe reversal is booked there; the entry stays unchanged.\n\n**409** when: the entry is a reversal or already corrected; a payroll run holds it; the date\nfalls in a filed VAT period; an open item still carries a live settlement; the target period\nis closed or sealed; or a closed-period entry cannot be corrected (the reason is named). A\nclosed-period entry armed to reverse itself is left to the auto-reversal run (nightly, or\n``POST …/gl/auto-reversals/run`` by a person): ``conflict.closedPeriodEntryAutoReverses``."
          }
        ],
        "withheld": false
      },
      {
        "observed_at": "2026-11-23T07:26:02.170Z",
        "from_sha": "66d99fcd67471bcb8740ae83d80c5e06f4d136cb6678ee1658d2a39c471f3348",
        "to_sha": "dd3558079a7e758229398ae3e7a10c343180db0c28e83d6f15a907101b9be4a3",
        "summary": {
          "tool_changed": 1
        },
        "diff": [
          {
            "op": "changed",
            "kind": "tool",
            "name": "create_gl_journal_entry",
            "path": "/description",
            "after": "Create a **draft** journal entry by hand — accountant. It carries NO source document\nunless you name one.\n\n``document_id`` attaches an existing ``gl_document`` (``POST …/gl/documents``) as its\nsource document; ``POST …/gl/journal-entries/{id}/documents`` does it later, also on a\nposted entry.\n\nA booking with no document behind it (a reclassification, provision, accrual or\nyear-end adjustment) is made by a person in the app; API keys are refused, document or not.\n**Never transcribe a document into it.** Each of these has a door that keeps the\nevidence attached:\n\n- an invoice, receipt or statement → ingest the file (``POST …/uploads/`` or\n  ``…/intake``), then accept what the coder proposes (``…/autopost-decisions``);\n- an already-ingested item → ``POST …/gl/items/{item_id}/coding``;\n- a bank movement with no document → ``POST /bank-entries/{entry_id}/manual-coding``;\n- opening balances → ``POST …/opening-entries`` and post the proposal.\n\n``auto_reverse_date`` arms the entry as a one-shot accrual: once posted, the\nauto-reversal executor reverses it in full on/after that date. It must be after\n``posting_date`` (422 otherwise), and it can only be set while the entry is a draft —\non the create here or on the ``PUT`` replace.\n\nDrafts do not touch the books until ``…/post``. See ``doc/pipeline.md §\"Accounting\"``.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted.",
            "before": "Create a **draft** journal entry by hand — accountant. It carries NO source document\nunless you name one.\n\nOnly the pipeline paths stamp ``source_ref_type``/``source_ref_id`` (an ingested\ndocument is ``'item'``), so by default a booking made here cannot be traced back to\nwhat justified it. ``document_id`` is the retrofit: name an existing ``gl_document``\n(create one with ``POST …/gl/documents``) and it is attached as the entry's source\ndocument, so the entry is not evidence-less. The same attach is available afterwards\nat ``POST …/gl/journal-entries/{id}/documents`` — including on a posted entry.\n\nUse it for bookings with genuinely no document behind them — reclassifications,\nprovisions, accruals, year-end adjustments. **Do not transcribe a document into it and\nthen attach the file** — that files the evidence beside a booking nobody derived from\nit. Each of these has a door that keeps the evidence attached:\n\n- an invoice, receipt or statement → ingest the file (``POST …/uploads/`` or\n  ``…/intake``), then accept what the coder proposes (``…/autopost-decisions``);\n- an already-ingested item → ``POST …/gl/items/{item_id}/coding``;\n- a bank movement with no document → ``POST /bank-entries/{entry_id}/manual-coding``;\n- opening balances → ``POST …/opening-entries`` and post the proposal.\n\n``auto_reverse_date`` arms the entry as a one-shot accrual (ZCT-527): once posted, the\nauto-reversal executor reverses it in full on/after that date. It must be after\n``posting_date`` (422 otherwise), and it can only be set while the entry is a draft —\non the create here or on the ``PUT`` replace.\n\nDrafts do not touch the books until ``…/post``. See ``doc/pipeline.md §\"Accounting\"``.\n\nOn this MCP surface a `null` argument means \"not provided\": it is dropped before the request is sent, exactly as if the field were omitted."
          }
        ],
        "withheld": false
      }
    ]
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}