{
  "source": {
    "name": "clovis",
    "version": "1.3.0",
    "description": "Local-first bookkeeping CLI, MCP server, and SQLite ledger engine",
    "license": "AGPL-3.0-or-later",
    "node": ">=26.3.0",
    "bins": {
      "clovis": "dist/cli/main.js",
      "clovis-mcp": "dist/mcp/main.js"
    },
    "exports": {
      ".": {
        "types": "./dist/index.d.ts",
        "import": "./dist/index.js"
      },
      "./core": {
        "types": "./dist/core/index.d.ts",
        "import": "./dist/core/index.js"
      },
      "./app": {
        "types": "./dist/app/index.d.ts",
        "import": "./dist/app/index.js"
      },
      "./mcp": {
        "types": "./dist/mcp/index.d.ts",
        "import": "./dist/mcp/index.js"
      }
    }
  },
  "generatedBy": "apps/site/scripts/generate-clovis-docs.mjs",
  "server": {
    "name": "clovis",
    "transport": "stdio",
    "binary": "clovis-mcp",
    "startCommand": "CLOVIS_DB=./ledger.db clovis-mcp",
    "environment": [
      {
        "name": "CLOVIS_DB",
        "required": true,
        "description": "Path to the local SQLite ledger file the agent may read or modify."
      }
    ]
  },
  "instructions": "Use live Clovis data as the source of truth; do not answer from old chat memory when a read-only tool can check the ledger.\nPrefer QFX or OFX statement files when available because stable statement ids make duplicate detection safer; CSV remains supported as a fallback.\nCreate a statement plan before applying statement rows; inspect matches, pending-to-posted rows, stale pending rows, new rows, and ambiguous rows before committing.\nBefore using include_planned:true, inspect or reconcile realized planned rows so landed income or bills are not counted twice.\nDo not treat transfers, credit-card payments, debt movement, or balance moves as spending. Keep cash, liabilities, earmarks, income, and expenses separate.\nUse read-only tools and dry-run-capable tools before mutating the ledger. Destructive or bulk tools should be run with explicit intent.\nApplied mutations should leave an audit event and a ledger-level reversal path.",
  "resources": [
    {
      "name": "clovis_operating_manual",
      "uri": "clovis://manual",
      "title": "Clovis Operating Manual",
      "description": "Full operational guide for using Clovis safely through CLI, app tools, and MCP.",
      "topic": "all"
    },
    {
      "name": "clovis_statement_import_manual",
      "uri": "clovis://manual/statement-import",
      "title": "Clovis Statement Import Manual",
      "description": "Statement import workflow, QFX/OFX guidance, pending review, duplicate checks, and commit safety.",
      "topic": "statement_import"
    },
    {
      "name": "clovis_month_end_manual",
      "uri": "clovis://manual/month-end",
      "title": "Clovis Month-End Manual",
      "description": "Month-end projection and reporting guidance for assets, liabilities, earmarks, pending rows, and budgets.",
      "topic": "month_end"
    },
    {
      "name": "clovis_runway_manual",
      "uri": "clovis://manual/runway",
      "title": "Clovis Cash Runway Manual",
      "description": "Cash runway guidance for spendable cash, burn assumptions, projections, and scenario work.",
      "topic": "runway"
    },
    {
      "name": "clovis_safety_manual",
      "uri": "clovis://manual/safety",
      "title": "Clovis Safety Manual",
      "description": "Agent safety guidance for read-only tools, dry-runs, backups, destructive tools, and file access.",
      "topic": "safety"
    }
  ],
  "tools": [
    {
      "name": "account_balances",
      "title": "Account Balances",
      "category": "Ledger and accounts",
      "summary": "Shows posted, pending, and current balances by account and asset.",
      "signature": "(account_type?: string | null, asset_id?: string | null, as_of?: string | null, rollup?: boolean, hide_zero?: boolean, native_asset_only?: boolean, presentation?: string, account_ids?: string[] | null, entity_id?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "account_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account type filter, such as asset, liability, equity, income, or expense."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "as_of",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        },
        {
          "name": "rollup",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "hide_zero",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Hides zero-balance rows from the response."
        },
        {
          "name": "native_asset_only",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Currency or asset symbol/id."
        },
        {
          "name": "presentation",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "ledger",
          "description": "Input used by this tool."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows posted, pending, and current balances by account and asset.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "account_register",
      "title": "Account Register",
      "category": "Ledger and accounts",
      "summary": "Shows the transaction register for one account, with date, status, branch, and pagination filters.",
      "signature": "(account_id: string, asset_id?: string | null, date_from?: string | null, date_to?: string | null, time_from?: string | null, time_to?: string | null, branch?: string | null, status?: string | null, limit?: number, offset?: number, summary?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "time_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start timestamp filter."
        },
        {
          "name": "time_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End timestamp filter."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 100,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        },
        {
          "name": "summary",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows the transaction register for one account, with date, status, branch, and pagination filters.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "add_match_rule",
      "title": "Add Match Rule",
      "category": "Import, review, and reconciliation",
      "summary": "Adds match rule in the local Clovis ledger.",
      "signature": "(account_id: string, pattern: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "pattern",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Text or regular-expression pattern used to match descriptions."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Adds match rule in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, pattern.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "pattern": "<pattern>"
        }
      }
    },
    {
      "name": "add_match_rules",
      "title": "Add Match Rules",
      "category": "Import, review, and reconciliation",
      "summary": "Adds match rules in the local Clovis ledger.",
      "signature": "(rules: Array<Record<string, unknown>>, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "rules",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Match rules to create or apply."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Adds match rules in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: rules.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "rules": []
        }
      }
    },
    {
      "name": "age_of_money",
      "title": "Age Of Money",
      "category": "Core tools",
      "summary": "Estimates age of money in the local Clovis ledger.",
      "signature": "(days?: number, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 30,
          "description": "Number of days to include in the calculation."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Estimates age of money in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "apply_match_rules",
      "title": "Apply Match Rules",
      "category": "Import, review, and reconciliation",
      "summary": "Applies saved categorization rules to pending transactions, with dry-run on by default.",
      "signature": "(catch_all_account_id: string, date_from?: string | null, date_to?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "catch_all_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Fallback category account for rows that do not match a rule."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Applies saved categorization rules to pending transactions, with dry-run on by default.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: catch_all_account_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "catch_all_account_id": "<catch_all_account_id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "apply_pattern",
      "title": "Apply Pattern",
      "category": "Core tools",
      "summary": "Recategorizes transactions that match a description pattern, optionally saving the pattern as a rule.",
      "signature": "(pattern: string, target_account: string, force?: boolean, persist_rule?: boolean, dry_run?: boolean, source_account?: string | null, date_from?: string | null, date_to?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "pattern",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Text or regular-expression pattern used to match descriptions."
        },
        {
          "name": "target_account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Target category or account for the matched rows."
        },
        {
          "name": "force",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Allows the operation to continue through conflicts that would otherwise stop it."
        },
        {
          "name": "persist_rule",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Saves the pattern as a future match rule."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "source_account",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional source account filter."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Recategorizes transactions that match a description pattern, optionally saving the pattern as a rule.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: pattern, target_account.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "pattern": "<pattern>",
          "target_account": "<target_account>",
          "dry_run": true
        }
      }
    },
    {
      "name": "apply_reconciliation_plan",
      "title": "Apply Reconciliation Plan",
      "category": "Core tools",
      "summary": "Applies a prepared statement reconciliation plan, usually after reviewing the proposed matches and imports.",
      "signature": "(file_path?: string | null, plan_id?: string | null, account_id?: string | null, counterpart_account_id?: string | null, expected_balance?: number | null, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, amount_convention?: string, statement_type?: string | null, balance_sign?: string | null, date_tolerance_days?: number, min_likely_score?: number, row_indexes?: number[] | null, commit_imported?: boolean, annotate_posted_matches?: boolean, allow_review_skip?: boolean, require_balance_match?: boolean, sample_limit?: number, include_details?: boolean, verbosity?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "plan_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Previously generated plan id."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "expected_balance",
          "type": "number",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement ending balance expected after reconciliation."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        },
        {
          "name": "balance_sign",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "min_likely_score",
          "type": "number",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0.72,
          "description": "Minimum confidence score for accepting likely reconciliation matches."
        },
        {
          "name": "row_indexes",
          "type": "integer[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement row indexes to apply or inspect."
        },
        {
          "name": "commit_imported",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "annotate_posted_matches",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Adds match annotations to already-posted transactions when applying the plan."
        },
        {
          "name": "allow_review_skip",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Allows the workflow to proceed even when review items remain."
        },
        {
          "name": "require_balance_match",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Requires the final balance to match the statement expectation."
        },
        {
          "name": "sample_limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 20,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "include_details",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "verbosity",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Applies a prepared statement reconciliation plan, usually after reviewing the proposed matches and imports.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "apply_rollover",
      "title": "Apply Rollover",
      "category": "Core tools",
      "summary": "Applies rollover in the local Clovis ledger.",
      "signature": "(year: number, month: number, quote_asset_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Applies rollover in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: year, month, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "year": 1,
          "month": 6,
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "assert_balance",
      "title": "Assert Balance",
      "category": "Ledger and accounts",
      "summary": "Checks balance in the local Clovis ledger.",
      "signature": "(account_id: string, expected: number, date?: string | null, asset_id?: string | null, status?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "expected",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Expected balance amount to compare with the ledger."
        },
        {
          "name": "date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Checks balance in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, expected."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "expected": 1
        }
      }
    },
    {
      "name": "assert_balances",
      "title": "Assert Balances",
      "category": "Ledger and accounts",
      "summary": "Checks balances in the local Clovis ledger.",
      "signature": "(assertions: unknown[], status?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "assertions",
          "type": "array",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Balance assertions to check against the ledger."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Checks balances in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: assertions."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "assertions": []
        }
      }
    },
    {
      "name": "audit_categorization",
      "title": "Audit Categorization",
      "category": "Import, review, and reconciliation",
      "summary": "Audits categorization in the local Clovis ledger.",
      "signature": "(date_from?: string | null, date_to?: string | null, catch_all_account_id?: string | null, min_occurrences?: number, status?: string, mode?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "catch_all_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Fallback category account for rows that do not match a rule."
        },
        {
          "name": "min_occurrences",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 2,
          "description": "Minimum repeated occurrences required before a pattern is reported."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "mode",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "budget",
          "description": "Workflow mode used by the tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Audits categorization in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "backup_now",
      "title": "Backup Now",
      "category": "Maintenance and safety",
      "summary": "Creates a local backup of the selected Clovis ledger.",
      "signature": "(output_path?: string | null, compact?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "output_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local output path for a generated file or backup."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Returns a smaller response shape when true."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates a local backup of the selected Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it before or after risky operations to back up, inspect, or repair the ledger.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "backup_status",
      "title": "Backup Status",
      "category": "Maintenance and safety",
      "summary": "Shows backup configuration and recent backup state for the local ledger.",
      "signature": "() => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows backup configuration and recent backup state for the local ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it before or after risky operations to back up, inspect, or repair the ledger."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "balance_sheet",
      "title": "Balance Sheet",
      "category": "Ledger and accounts",
      "summary": "Builds an assets, liabilities, and equity report for a date or scenario branch.",
      "signature": "(date?: string | null, branch?: string | null, compact?: boolean, include_pending?: boolean, status?: string, hide_zero?: boolean, quote_asset_id: string, account_ids?: string[] | null, entity_id?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Returns a smaller response shape when true."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "active",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "hide_zero",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Hides zero-balance rows from the response."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Builds an assets, liabilities, and equity report for a date or scenario branch.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "budget_rollover_preview",
      "title": "Budget Rollover Preview",
      "category": "Import, review, and reconciliation",
      "summary": "Runs budget rollover preview in the local Clovis ledger.",
      "signature": "(year: number, month: number, include_pending?: boolean, status?: string, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Runs budget rollover preview in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: year, month, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "year": 1,
          "month": 6,
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "budget_status",
      "title": "Budget Status",
      "category": "Planning and cash flow",
      "summary": "Shows budget status in the local Clovis ledger.",
      "signature": "(account?: string | null, year?: number | null, month?: number | null, rollup?: boolean, include_pending?: boolean, status?: string, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account name or id to inspect."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "rollup",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows budget status in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "budget_summary",
      "title": "Budget Summary",
      "category": "Planning and cash flow",
      "summary": "Summarizes budget summary in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, include_pending?: boolean, status?: string, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Summarizes budget summary in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "buy_security",
      "title": "Buy Security",
      "category": "Assets and investments",
      "summary": "Records security in the local Clovis ledger.",
      "signature": "(account_id: string, symbol: string, shares: number, total_cost_cents: number, date: string, commission_cents?: number, status?: string, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "symbol",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "shares",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "total_cost_cents",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "commission_cents",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records security in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, symbol, shares, total_cost_cents, date.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "symbol": "<symbol>",
          "shares": 1,
          "total_cost_cents": 1,
          "date": "2026-06-01"
        }
      }
    },
    {
      "name": "cash_flow",
      "title": "Cash Flow",
      "category": "Planning and cash flow",
      "summary": "Reports cash flow in the local Clovis ledger.",
      "signature": "(year: number, month: number, branch?: string | null, compact?: boolean, include_pending?: boolean, status?: string, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Returns a smaller response shape when true."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reports cash flow in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: year, month, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "year": 1,
          "month": 6,
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "cash_projection",
      "title": "Cash Projection",
      "category": "Planning and cash flow",
      "summary": "Projects cash projection in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, asset_account_ids?: string[] | null, liability_account_ids?: string[] | null, entity_id?: string | null, earmarks?: Array<Record<string, unknown>> | null, include_pending?: boolean, include_planned?: boolean, planned_match_tolerance_days?: number, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "asset_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset account ids to include in a projection."
        },
        {
          "name": "liability_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of identifiers from the local Clovis ledger."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "earmarks",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "include_planned",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes planned transactions in the calculation."
        },
        {
          "name": "planned_match_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Projects cash projection in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "cash_runway",
      "title": "Cash Runway",
      "category": "Planning and cash flow",
      "summary": "Estimates how long spendable cash can cover burn, based on the selected assumptions.",
      "signature": "(year?: number | null, month?: number | null, as_of?: string | null, asset_account_ids?: string[] | null, liability_account_ids?: string[] | null, earmarks?: Array<Record<string, unknown>> | null, include_pending?: boolean, include_planned?: boolean, include_partial_month?: boolean, reserve_remaining_budget?: boolean, include_sources?: boolean, summary?: boolean, trailing_months_short?: number, trailing_months_long?: number, discretionary_multiplier?: number, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "as_of",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        },
        {
          "name": "asset_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset account ids to include in a projection."
        },
        {
          "name": "liability_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of identifiers from the local Clovis ledger."
        },
        {
          "name": "earmarks",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "include_planned",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes planned transactions in the calculation."
        },
        {
          "name": "include_partial_month",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "reserve_remaining_budget",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "include_sources",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "summary",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "trailing_months_short",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "trailing_months_long",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 6,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "discretionary_multiplier",
          "type": "number",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0.5,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Estimates how long spendable cash can cover burn, based on the selected assumptions.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "close_period",
      "title": "Close Period",
      "category": "Core tools",
      "summary": "Closes period in the local Clovis ledger.",
      "signature": "(name: string, as_of: string, description?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        },
        {
          "name": "as_of",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        },
        {
          "name": "description",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human-readable transaction, account, rule, or journal description."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Closes period in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: name, as_of.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "name": "<name>",
          "as_of": "2026-06-01"
        }
      }
    },
    {
      "name": "commit_batch",
      "title": "Commit Batch",
      "category": "Core tools",
      "summary": "Commits batch in the local Clovis ledger.",
      "signature": "(tx_ids?: string[] | null, batch_id?: string | null, date_from?: string | null, date_to?: string | null, account_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tx_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of transaction ids."
        },
        {
          "name": "batch_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Import, commit, or mutation batch id."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Commits batch in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "compare_scenarios",
      "title": "Compare Scenarios",
      "category": "Scenarios",
      "summary": "Compares scenarios in the local Clovis ledger.",
      "signature": "(as_of_a?: string | null, as_of_b?: string | null, asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "as_of_a",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "as_of_b",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Compares scenarios in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD"
        }
      }
    },
    {
      "name": "consolidate_transfers",
      "title": "Consolidate Transfers",
      "category": "Core tools",
      "summary": "Consolidates transfers in the local Clovis ledger.",
      "signature": "(account_a: string, account_b: string, transfer_account_id?: string | null, date_tolerance_days?: number, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_a",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "account_b",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "transfer_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 1,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Consolidates transfers in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_a, account_b.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_a": "<account_a>",
          "account_b": "<account_b>",
          "dry_run": true
        }
      }
    },
    {
      "name": "copy_budgets",
      "title": "Copy Budgets",
      "category": "Planning and cash flow",
      "summary": "Copies budgets in the local Clovis ledger.",
      "signature": "(from_year: number, from_month: number, to_year: number, to_month: number, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "from_year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "from_month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "to_year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "to_month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Copies budgets in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: from_year, from_month, to_year, to_month.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "from_year": 1,
          "from_month": 1,
          "to_year": 1,
          "to_month": 1
        }
      }
    },
    {
      "name": "count_transactions",
      "title": "Count Transactions",
      "category": "Ledger and accounts",
      "summary": "Counts transactions in the local Clovis ledger.",
      "signature": "(account_id?: string | null, status?: string | null, date_from?: string | null, date_to?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Counts transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "create_account",
      "title": "Create Account",
      "category": "Ledger and accounts",
      "summary": "Creates account in the local Clovis ledger.",
      "signature": "(name: string, type: string, code?: string, parent_id?: string | null, color_hex?: string, default_asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        },
        {
          "name": "type",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "code",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "",
          "description": "Input used by this tool."
        },
        {
          "name": "parent_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Parent account id."
        },
        {
          "name": "color_hex",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "#888888",
          "description": "Display color for the account or asset."
        },
        {
          "name": "default_asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates account in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: name, type.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "name": "<name>",
          "type": "<type>"
        }
      }
    },
    {
      "name": "create_accounts",
      "title": "Create Accounts",
      "category": "Ledger and accounts",
      "summary": "Creates accounts in the local Clovis ledger.",
      "signature": "(accounts: Array<Record<string, unknown>>, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "accounts",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates accounts in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: accounts.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "accounts": []
        }
      }
    },
    {
      "name": "create_asset",
      "title": "Create Asset",
      "category": "Assets and investments",
      "summary": "Creates asset in the local Clovis ledger.",
      "signature": "(symbol: string, asset_type?: string, decimals?: number, name?: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "symbol",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "asset_type",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "currency",
          "description": "Currency or asset symbol/id."
        },
        {
          "name": "decimals",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 2,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "name",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "",
          "description": "Human-readable name to create or update."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates asset in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: symbol.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "symbol": "<symbol>"
        }
      }
    },
    {
      "name": "create_branch",
      "title": "Create Branch",
      "category": "Scenarios",
      "summary": "Creates scenario branch in the local Clovis ledger.",
      "signature": "(name: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates scenario branch in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: name.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "name": "<name>"
        }
      }
    },
    {
      "name": "create_price",
      "title": "Create Price",
      "category": "Assets and investments",
      "summary": "Creates price in the local Clovis ledger.",
      "signature": "(asset_id: string, quote_id: string, rate: number, time: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "quote_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "rate",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "time",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {
        "quote_asset_id": "quote_id",
        "quote": "quote_id",
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates price in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id, quote_id, rate, time.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD",
          "quote_id": "USD",
          "rate": 1,
          "time": "<time>"
        }
      }
    },
    {
      "name": "create_scheduled_transaction",
      "title": "Create Scheduled Transaction",
      "category": "Ledger and accounts",
      "summary": "Creates scheduled transactions transaction in the local Clovis ledger.",
      "signature": "(date: string, amount: number, from_account_id: string, to_account_id: string, description?: string, frequency?: string, end_date?: string | null, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "from_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for a transaction or transfer."
        },
        {
          "name": "to_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Destination account id for a transaction or transfer."
        },
        {
          "name": "description",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "",
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "frequency",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "monthly",
          "description": "Schedule frequency, such as monthly."
        },
        {
          "name": "end_date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Final date for a scheduled or recurring workflow."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates scheduled transactions transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, amount, from_account_id, to_account_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "amount": 100,
          "from_account_id": "<from_account_id>",
          "to_account_id": "<to_account_id>"
        }
      }
    },
    {
      "name": "create_transaction",
      "title": "Create Transaction",
      "category": "Ledger and accounts",
      "summary": "Creates transaction in the local Clovis ledger.",
      "signature": "(date: string, amount: number, from_account_id: string, to_account_id: string, description: string, status?: string, asset_id?: string | null, branch?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "from_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for a transaction or transfer."
        },
        {
          "name": "to_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Destination account id for a transaction or transfer."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Creates transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, amount, from_account_id, to_account_id, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "amount": 100,
          "from_account_id": "<from_account_id>",
          "to_account_id": "<to_account_id>",
          "description": "<description>"
        }
      }
    },
    {
      "name": "delete_account",
      "title": "Delete Account",
      "category": "Ledger and accounts",
      "summary": "Deletes account in the local Clovis ledger.",
      "signature": "(id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes account in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "id": "<id>"
        }
      }
    },
    {
      "name": "delete_asset",
      "title": "Delete Asset",
      "category": "Assets and investments",
      "summary": "Deletes asset in the local Clovis ledger.",
      "signature": "(asset_id: string, force?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "force",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Allows the operation to continue through conflicts that would otherwise stop it."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes asset in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD"
        }
      }
    },
    {
      "name": "delete_budget",
      "title": "Delete Budget",
      "category": "Planning and cash flow",
      "summary": "Deletes budget in the local Clovis ledger.",
      "signature": "(account: string, year?: number | null, month?: number | null, include_overrides?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account name or id to inspect."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "include_overrides",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes budget in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account": "<account>"
        }
      }
    },
    {
      "name": "delete_budgets",
      "title": "Delete Budgets",
      "category": "Planning and cash flow",
      "summary": "Deletes budgets in the local Clovis ledger.",
      "signature": "(accounts?: string[] | null, year?: number | null, month?: number | null, include_overrides?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "accounts",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "include_overrides",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes budgets in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "delete_goal",
      "title": "Delete Goal",
      "category": "Planning and cash flow",
      "summary": "Deletes goal in the local Clovis ledger.",
      "signature": "(account: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account name or id to inspect."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes goal in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account": "<account>"
        }
      }
    },
    {
      "name": "delete_match_rule",
      "title": "Delete Match Rule",
      "category": "Import, review, and reconciliation",
      "summary": "Deletes match rule in the local Clovis ledger.",
      "signature": "(account_id: string, pattern: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "pattern",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Text or regular-expression pattern used to match descriptions."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes match rule in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, pattern.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "pattern": "<pattern>"
        }
      }
    },
    {
      "name": "delete_match_rules",
      "title": "Delete Match Rules",
      "category": "Import, review, and reconciliation",
      "summary": "Deletes match rules in the local Clovis ledger.",
      "signature": "(rules: Array<Record<string, unknown>>, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "rules",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Match rules to create or apply."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes match rules in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: rules.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "rules": []
        }
      }
    },
    {
      "name": "delete_tag",
      "title": "Delete Tag",
      "category": "Configuration",
      "summary": "Deletes tag in the local Clovis ledger.",
      "signature": "(tag_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tag_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes tag in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tag_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "tag_id": "<tag_id>"
        }
      }
    },
    {
      "name": "delete_tags",
      "title": "Delete Tags",
      "category": "Configuration",
      "summary": "Deletes tags in the local Clovis ledger.",
      "signature": "(entity_type: string, entity_id: string, key?: string | null, val?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "entity_type",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "key",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "val",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Deletes tags in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: entity_type, entity_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "entity_type": "<entity_type>",
          "entity_id": "<entity_id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "delete_transaction",
      "title": "Delete Transaction",
      "category": "Ledger and accounts",
      "summary": "Deletes transaction in the local Clovis ledger.",
      "signature": "(id: string, hard_delete?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "hard_delete",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Permanently deletes rows instead of voiding them. Use only with explicit approval."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Deletes transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "id": "<id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "detect_recurring",
      "title": "Detect Recurring",
      "category": "Core tools",
      "summary": "Detects recurring activity in the local Clovis ledger.",
      "signature": "(months?: number, year?: number | null, month?: number | null, min_occurrences?: number, amount_tolerance_pct?: number, account_id?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "months",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 6,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "min_occurrences",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 2,
          "description": "Minimum repeated occurrences required before a pattern is reported."
        },
        {
          "name": "amount_tolerance_pct",
          "type": "number",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 5,
          "description": "Percent difference allowed when matching similar amounts."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Detects recurring activity in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "discard_batch",
      "title": "Discard Batch",
      "category": "Scenarios",
      "summary": "Discards batch in the local Clovis ledger.",
      "signature": "(tx_ids?: string[] | null, batch_id?: string | null, date_from?: string | null, date_to?: string | null, account_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tx_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of transaction ids."
        },
        {
          "name": "batch_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Import, commit, or mutation batch id."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Discards batch in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "discard_branch",
      "title": "Discard Branch",
      "category": "Scenarios",
      "summary": "Discards scenario branch in the local Clovis ledger.",
      "signature": "(name: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Discards scenario branch in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: name.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "name": "<name>"
        }
      }
    },
    {
      "name": "export_ledger",
      "title": "Export Ledger",
      "category": "Ledger and accounts",
      "summary": "Exports ledger in the local Clovis ledger.",
      "signature": "(output_path?: string | null, entity_id?: string | null, date_from?: string | null, date_to?: string | null, account_ids?: string[] | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "output_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local output path for a generated file or backup."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Exports ledger in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "export_transactions",
      "title": "Export Transactions",
      "category": "Ledger and accounts",
      "summary": "Exports transactions in the local Clovis ledger.",
      "signature": "(account_id?: string | null, date_from?: string | null, date_to?: string | null, status?: string | null, output_path?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "output_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local output path for a generated file or backup."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Exports transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "file_access_status",
      "title": "File Access Status",
      "category": "Core tools",
      "summary": "Shows file access status in the local Clovis ledger.",
      "signature": "() => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows file access status in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "financial_overview",
      "title": "Financial Overview",
      "category": "Core tools",
      "summary": "Returns a compact financial summary for the selected period and quote asset.",
      "signature": "(year?: number | null, month?: number | null, status?: string, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "active",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Returns a compact financial summary for the selected period and quote asset.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "financial_picture",
      "title": "Financial Picture",
      "category": "Core tools",
      "summary": "Returns a broader snapshot of balances, spending, pending items, and planned activity.",
      "signature": "(year?: number | null, month?: number | null, quote_asset_id: string, status?: string | null, include_pending?: boolean, include_planned?: boolean, entity_id?: string | null, account_ids?: string[] | null, asset_account_ids?: string[] | null, liability_account_ids?: string[] | null, earmarks?: Array<Record<string, unknown>> | null, include_open_items?: boolean, open_item_limit?: number, include_summary_markdown?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "include_planned",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes planned transactions in the calculation."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "asset_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset account ids to include in a projection."
        },
        {
          "name": "liability_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of identifiers from the local Clovis ledger."
        },
        {
          "name": "earmarks",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "include_open_items",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "open_item_limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 25,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "include_summary_markdown",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Returns a broader snapshot of balances, spending, pending items, and planned activity.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "find_pending_duplicates",
      "title": "Find Pending Duplicates",
      "category": "Import, review, and reconciliation",
      "summary": "Finds pending duplicates in the local Clovis ledger.",
      "signature": "(account_id?: string | null, date_from?: string | null, date_to?: string | null, date_tolerance_days?: number) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Finds pending duplicates in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "find_realized_planned",
      "title": "Find Realized Planned",
      "category": "Core tools",
      "summary": "Finds realized planned in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, date_from?: string | null, date_to?: string | null, account_id?: string | null, account_ids?: string[] | null, asset_id?: string | null, date_tolerance_days?: number) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Finds realized planned in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "flip_entries",
      "title": "Flip Entries",
      "category": "Core tools",
      "summary": "Flips journal entries in the local Clovis ledger.",
      "signature": "(tx_ids: string[], dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tx_ids",
          "type": "string[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "List of transaction ids."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Flips journal entries in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tx_ids.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "tx_ids": [
            "<tx_ids>"
          ]
        }
      }
    },
    {
      "name": "forecast",
      "title": "Forecast",
      "category": "Planning and cash flow",
      "summary": "Forecasts forecast in the local Clovis ledger.",
      "signature": "(account_id: string, as_of?: string | null, asset_id?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "as_of",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Forecasts forecast in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "forecast_month_end",
      "title": "Forecast Month End",
      "category": "Planning and cash flow",
      "summary": "Forecasts month end in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, status?: string | null, include_pending?: boolean, include_planned?: boolean, planned_match_tolerance_days?: number, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "include_planned",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes planned transactions in the calculation."
        },
        {
          "name": "planned_match_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Forecasts month end in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "fx_transfer",
      "title": "Fx Transfer",
      "category": "Assets and investments",
      "summary": "Runs foreign exchange transfer in the local Clovis ledger.",
      "signature": "(from_account_id: string, to_account_id: string, from_amount: number, to_amount: number, from_asset_id: string, to_asset_id: string, fx_account_id: string, date: string, description: string, status?: string, record_rate?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "from_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for a transaction or transfer."
        },
        {
          "name": "to_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Destination account id for a transaction or transfer."
        },
        {
          "name": "from_amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "to_amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "from_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "to_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "fx_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "record_rate",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Runs foreign exchange transfer in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: from_account_id, to_account_id, from_amount, to_amount, from_asset_id, to_asset_id, fx_account_id, date, ....",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "from_account_id": "<from_account_id>",
          "to_account_id": "<to_account_id>",
          "from_amount": 100,
          "to_amount": 100,
          "from_asset_id": "USD",
          "to_asset_id": "USD",
          "fx_account_id": "<fx_account_id>",
          "date": "2026-06-01",
          "description": "<description>"
        }
      }
    },
    {
      "name": "get_account",
      "title": "Get Account",
      "category": "Ledger and accounts",
      "summary": "Shows account in the local Clovis ledger.",
      "signature": "(id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows account in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "id": "<id>"
        }
      }
    },
    {
      "name": "get_account_by_name",
      "title": "Get Account By Name",
      "category": "Ledger and accounts",
      "summary": "Shows account by name in the local Clovis ledger.",
      "signature": "(name: string) => Record<string, unknown> | null",
      "returns": {
        "type": "object",
        "nullable": true
      },
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows account by name in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: name."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "name": "<name>"
        }
      }
    },
    {
      "name": "get_asset_by_symbol",
      "title": "Get Asset By Symbol",
      "category": "Assets and investments",
      "summary": "Shows asset by symbol in the local Clovis ledger.",
      "signature": "(symbol: string) => Record<string, unknown> | null",
      "returns": {
        "type": "object",
        "nullable": true
      },
      "parameters": [
        {
          "name": "symbol",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows asset by symbol in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: symbol."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "symbol": "<symbol>"
        }
      }
    },
    {
      "name": "get_balance",
      "title": "Get Balance",
      "category": "Ledger and accounts",
      "summary": "Shows balance in the local Clovis ledger.",
      "signature": "(account_id: string, asset_id?: string | null, date?: string | null, status?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows balance in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "get_ledger_operation",
      "title": "Get Ledger Operation",
      "category": "Ledger and accounts",
      "summary": "Shows ledger operation in the local Clovis ledger.",
      "signature": "(operation_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "operation_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows ledger operation in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: operation_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "operation_id": "<operation_id>"
        }
      }
    },
    {
      "name": "get_price",
      "title": "Get Price",
      "category": "Assets and investments",
      "summary": "Shows price in the local Clovis ledger.",
      "signature": "(asset_id: string, quote_id: string, as_of: string) => Record<string, unknown> | null",
      "returns": {
        "type": "object",
        "nullable": true
      },
      "parameters": [
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "quote_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "as_of",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        }
      ],
      "aliases": {
        "quote_asset_id": "quote_id",
        "quote": "quote_id",
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows price in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id, quote_id, as_of."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD",
          "quote_id": "USD",
          "as_of": "2026-06-01"
        }
      }
    },
    {
      "name": "get_transaction",
      "title": "Get Transaction",
      "category": "Ledger and accounts",
      "summary": "Shows transaction in the local Clovis ledger.",
      "signature": "(id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "id": "<id>"
        }
      }
    },
    {
      "name": "goal_progress",
      "title": "Goal Progress",
      "category": "Planning and cash flow",
      "summary": "Runs goal progress in the local Clovis ledger.",
      "signature": "(account: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account name or id to inspect."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Runs goal progress in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account": "<account>"
        }
      }
    },
    {
      "name": "holdings",
      "title": "Holdings",
      "category": "Assets and investments",
      "summary": "Shows holdings in the local Clovis ledger.",
      "signature": "(account_id?: string | null, asset_type?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "asset_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency or asset symbol/id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows holdings in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "import_file",
      "title": "Import File",
      "category": "Import, review, and reconciliation",
      "summary": "Imports a statement file into an account while preserving review-oriented metadata.",
      "signature": "(file_path: string, account_id: string, counterpart_account_id: string, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, counterpart_col?: string | null, tag_cols?: Record<string, unknown> | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, status?: string, amount_convention?: string, show_duplicates?: boolean, statement_type?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "counterpart_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column that maps rows to counterpart accounts."
        },
        {
          "name": "tag_cols",
          "type": "object",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Mapping of statement columns to tags."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "show_duplicates",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Imports a statement file into an account while preserving review-oriented metadata.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: file_path, account_id, counterpart_account_id.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "file_path": "./statement.csv",
          "account_id": "<account_id>",
          "counterpart_account_id": "<counterpart_account_id>"
        }
      }
    },
    {
      "name": "import_ledger",
      "title": "Import Ledger",
      "category": "Ledger and accounts",
      "summary": "Imports ledger in the local Clovis ledger.",
      "signature": "(file_path?: string | null, data?: string | null, preserve_ids?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "data",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "preserve_ids",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "List of identifiers from the local Clovis ledger."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Imports ledger in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "import_transactions",
      "title": "Import Transactions",
      "category": "Ledger and accounts",
      "summary": "Imports transactions in the local Clovis ledger.",
      "signature": "(account_id: string, counterpart_id: string, transactions: Array<Record<string, unknown>>, status?: string, dry_run?: boolean, batch_label?: string | null, tags?: Record<string, unknown> | null, amount_convention?: string, date_tolerance_days?: number, asset_id?: string | null, skip_dedup?: boolean, statement_type?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "transactions",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "batch_label",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human label attached to the generated batch."
        },
        {
          "name": "tags",
          "type": "object",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Metadata tags to attach."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 1,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "skip_dedup",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Skips duplicate detection. Use only when the user has already reviewed the rows."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Imports transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, counterpart_id, transactions.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "counterpart_id": "<counterpart_id>",
          "transactions": [],
          "dry_run": true
        }
      }
    },
    {
      "name": "income_statement",
      "title": "Income Statement",
      "category": "Import, review, and reconciliation",
      "summary": "Builds income statement in the local Clovis ledger.",
      "signature": "(year: number, month?: number | null, branch?: string | null, compact?: boolean, include_pending?: boolean, account_ids?: string[] | null, entity_id?: string | null, quote_asset_id: string, status?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Returns a smaller response shape when true."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Builds income statement in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: year, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "year": 1,
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "init_defaults",
      "title": "Init Defaults",
      "category": "Core tools",
      "summary": "Initializes defaults in the local Clovis ledger.",
      "signature": "(template?: string, currency: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "template",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "personal",
          "description": "Input used by this tool."
        },
        {
          "name": "currency",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Initializes defaults in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: currency.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "currency": "USD"
        }
      }
    },
    {
      "name": "inspect_transaction",
      "title": "Inspect Transaction",
      "category": "Ledger and accounts",
      "summary": "Inspects transaction in the local Clovis ledger.",
      "signature": "(tx_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tx_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Transaction id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Inspects transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tx_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "tx_id": "<tx_id>"
        }
      }
    },
    {
      "name": "integrity_check",
      "title": "Integrity Check",
      "category": "Maintenance and safety",
      "summary": "Checks the ledger for structural or accounting problems before an agent changes anything.",
      "signature": "() => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Checks the ledger for structural or accounting problems before an agent changes anything.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it before or after risky operations to back up, inspect, or repair the ledger."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "invert_import",
      "title": "Invert Import",
      "category": "Import, review, and reconciliation",
      "summary": "Inverts import in the local Clovis ledger.",
      "signature": "(batch_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "batch_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Import, commit, or mutation batch id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Inverts import in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: batch_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "batch_id": "<batch_id>"
        }
      }
    },
    {
      "name": "list_accounts",
      "title": "List Accounts",
      "category": "Ledger and accounts",
      "summary": "Lists accounts in the local Clovis ledger.",
      "signature": "(type?: string | null, parent_id?: string | null, include_counts?: boolean, tree?: boolean) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "parent_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Parent account id."
        },
        {
          "name": "include_counts",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "tree",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists accounts in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_assets",
      "title": "List Assets",
      "category": "Assets and investments",
      "summary": "Lists assets in the local Clovis ledger.",
      "signature": "(asset_type?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "asset_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency or asset symbol/id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists assets in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_backups",
      "title": "List Backups",
      "category": "Maintenance and safety",
      "summary": "Lists backups in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists backups in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it before or after risky operations to back up, inspect, or repair the ledger."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_branches",
      "title": "List Branches",
      "category": "Scenarios",
      "summary": "Lists scenario branches in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists scenario branches in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_checkpoints",
      "title": "List Checkpoints",
      "category": "Core tools",
      "summary": "Lists period checkpoints in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists period checkpoints in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_entries",
      "title": "List Entries",
      "category": "Core tools",
      "summary": "Lists journal entries in the local Clovis ledger.",
      "signature": "(tx_id: string) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "tx_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Transaction id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists journal entries in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tx_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "tx_id": "<tx_id>"
        }
      }
    },
    {
      "name": "list_entries_by_asset",
      "title": "List Entries By Asset",
      "category": "Assets and investments",
      "summary": "Lists journal entries by asset in the local Clovis ledger.",
      "signature": "(asset_id: string, limit?: number, offset?: number) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 100,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists journal entries by asset in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD"
        }
      }
    },
    {
      "name": "list_goals",
      "title": "List Goals",
      "category": "Planning and cash flow",
      "summary": "Lists goals in the local Clovis ledger.",
      "signature": "() => unknown[]",
      "returns": {
        "type": "array"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists goals in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns array from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_import_batches",
      "title": "List Import Batches",
      "category": "Import, review, and reconciliation",
      "summary": "Lists import batches in the local Clovis ledger.",
      "signature": "(limit?: number, date_from?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 20,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists import batches in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_ledger_operations",
      "title": "List Ledger Operations",
      "category": "Ledger and accounts",
      "summary": "Lists ledger operations in the local Clovis ledger.",
      "signature": "(limit?: number) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 50,
          "description": "Maximum number of rows to return."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists ledger operations in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_match_rules",
      "title": "List Match Rules",
      "category": "Import, review, and reconciliation",
      "summary": "Lists match rules in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists match rules in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_prices",
      "title": "List Prices",
      "category": "Assets and investments",
      "summary": "Lists prices in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists prices in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_scheduled",
      "title": "List Scheduled",
      "category": "Core tools",
      "summary": "Lists scheduled transactions in the local Clovis ledger.",
      "signature": "() => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists scheduled transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_tags",
      "title": "List Tags",
      "category": "Configuration",
      "summary": "Lists tags in the local Clovis ledger.",
      "signature": "(entity_type: string, entity_id: string) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "entity_type",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Entity id to filter reports when entity tracking is used."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists tags in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: entity_type, entity_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "entity_type": "<entity_type>",
          "entity_id": "<entity_id>"
        }
      }
    },
    {
      "name": "list_transactions",
      "title": "List Transactions",
      "category": "Ledger and accounts",
      "summary": "Lists transactions in the local Clovis ledger.",
      "signature": "(account_id?: string | null, category_id?: string | null, asset_id?: string | null, year?: number | null, month?: number | null, date_from?: string | null, date_to?: string | null, status?: string | null, limit?: number, offset?: number, compact?: boolean, include_account_effects?: boolean, sort?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "category_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 50,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Returns a smaller response shape when true."
        },
        {
          "name": "include_account_effects",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "sort",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "date_desc",
          "description": "Sort order for returned rows."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_uncategorized",
      "title": "List Uncategorized",
      "category": "Import, review, and reconciliation",
      "summary": "Lists uncategorized transactions in the local Clovis ledger.",
      "signature": "(catch_all_account_id?: string | null, status?: string, date_from?: string | null, date_to?: string | null, limit?: number, offset?: number, compact?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "catch_all_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Fallback category account for rows that do not match a rule."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 50,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        },
        {
          "name": "compact",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Returns a smaller response shape when true."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists uncategorized transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "list_unmatched_transfers",
      "title": "List Unmatched Transfers",
      "category": "Import, review, and reconciliation",
      "summary": "Lists unmatched transfers in the local Clovis ledger.",
      "signature": "(date_tolerance_days?: number) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Lists unmatched transfers in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "match_transfer_pairs",
      "title": "Match Transfer Pairs",
      "category": "Import, review, and reconciliation",
      "summary": "Matches transfer pairs in the local Clovis ledger.",
      "signature": "(clearing_account?: string | null, account_a?: string | null, account_b?: string | null, date_from?: string | null, date_to?: string | null, date_tolerance_days?: number, match_by?: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "clearing_account",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "account_a",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "account_b",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "match_by",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "amount+date+code",
          "description": "Input used by this tool."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Matches transfer pairs in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "match_transfers",
      "title": "Match Transfers",
      "category": "Import, review, and reconciliation",
      "summary": "Matches transfers in the local Clovis ledger.",
      "signature": "(account_a: string, account_b: string, date_tolerance_days?: number, dry_run?: boolean, status?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_a",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "account_b",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 1,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Matches transfers in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_a, account_b.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_a": "<account_a>",
          "account_b": "<account_b>",
          "dry_run": true
        }
      }
    },
    {
      "name": "merge_accounts",
      "title": "Merge Accounts",
      "category": "Ledger and accounts",
      "summary": "Merges accounts in the local Clovis ledger.",
      "signature": "(sources: string[], target: string, delete_sources?: boolean, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "sources",
          "type": "string[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "target",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "delete_sources",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Merges accounts in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: sources, target.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "sources": [
            "<sources>"
          ],
          "target": "<target>"
        }
      }
    },
    {
      "name": "merge_branch",
      "title": "Merge Branch",
      "category": "Scenarios",
      "summary": "Merges scenario branch in the local Clovis ledger.",
      "signature": "(source: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "source",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Merges scenario branch in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when exploring or managing scenario branches separate from posted records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: source.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "source": "<source>"
        }
      }
    },
    {
      "name": "migrate_asset_entries",
      "title": "Migrate Asset Entries",
      "category": "Assets and investments",
      "summary": "Migrates asset journal entries in the local Clovis ledger.",
      "signature": "(from_asset_id: string, to_asset_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "from_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "to_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Migrates asset journal entries in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: from_asset_id, to_asset_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "from_asset_id": "USD",
          "to_asset_id": "USD",
          "dry_run": true
        }
      }
    },
    {
      "name": "move_transactions",
      "title": "Move Transactions",
      "category": "Ledger and accounts",
      "summary": "Moves transactions in the local Clovis ledger.",
      "signature": "(from_account: string, to_account: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "from_account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "to_account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Moves transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: from_account, to_account.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "from_account": "<from_account>",
          "to_account": "<to_account>",
          "dry_run": true
        }
      }
    },
    {
      "name": "net_worth",
      "title": "Net Worth",
      "category": "Reports",
      "summary": "Reports net worth in the local Clovis ledger.",
      "signature": "(date?: string | null, branch?: string | null, include_pending?: boolean, status?: string, quote_asset_id: string, account_ids?: string[] | null, entity_id?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "active",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reports net worth in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when the user asks for a finance report or period comparison."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "operating_manual",
      "title": "Operating Manual",
      "category": "Configuration",
      "summary": "Returns Clovis operating guidance for agents and humans.",
      "signature": "(topic?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "topic",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "all",
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Returns Clovis operating guidance for agents and humans.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "pending_summary",
      "title": "Pending Summary",
      "category": "Core tools",
      "summary": "Summarizes pending summary in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Summarizes pending summary in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "plan_transaction",
      "title": "Plan Transaction",
      "category": "Ledger and accounts",
      "summary": "Plans transaction in the local Clovis ledger.",
      "signature": "(date: string, amount: number, from_account_id: string, to_account_id: string, description: string, branch?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "from_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for a transaction or transfer."
        },
        {
          "name": "to_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Destination account id for a transaction or transfer."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Plans transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, amount, from_account_id, to_account_id, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "amount": 100,
          "from_account_id": "<from_account_id>",
          "to_account_id": "<to_account_id>",
          "description": "<description>"
        }
      }
    },
    {
      "name": "post_journal_entry",
      "title": "Post Journal Entry",
      "category": "Ledger and accounts",
      "summary": "Posts journal journal entry in the local Clovis ledger.",
      "signature": "(date: string, legs: Array<Record<string, unknown>>, description: string, status?: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "legs",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Manual journal legs. Each leg identifies an account and amount."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Posts journal journal entry in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, legs, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "legs": [],
          "description": "<description>"
        }
      }
    },
    {
      "name": "preview_commit",
      "title": "Preview Commit",
      "category": "Import, review, and reconciliation",
      "summary": "Previews commit in the local Clovis ledger.",
      "signature": "(as_of?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "as_of",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date to calculate balances through, usually YYYY-MM-DD."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Previews commit in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "preview_import",
      "title": "Preview Import",
      "category": "Import, review, and reconciliation",
      "summary": "Parses a statement file and shows what Clovis would import before committing rows.",
      "signature": "(file_path: string, account_id: string, counterpart_account_id: string, rows?: number, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, amount_convention?: string, statement_type?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Rows to import, review, or mutate."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Parses a statement file and shows what Clovis would import before committing rows.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: file_path, account_id, counterpart_account_id.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "file_path": "./statement.csv",
          "account_id": "<account_id>",
          "counterpart_account_id": "<counterpart_account_id>"
        }
      }
    },
    {
      "name": "preview_mutation",
      "title": "Preview Mutation",
      "category": "Import, review, and reconciliation",
      "summary": "Previews mutation in the local Clovis ledger.",
      "signature": "(tool_name: string, arguments?: Record<string, unknown>) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tool_name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "arguments",
          "type": "object",
          "required": false,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Previews mutation in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tool_name."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "tool_name": "<tool_name>"
        }
      }
    },
    {
      "name": "process_scheduled",
      "title": "Process Scheduled",
      "category": "Core tools",
      "summary": "Processes scheduled transactions in the local Clovis ledger.",
      "signature": "(through_date?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "through_date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Last date to process scheduled activity through."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Processes scheduled transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "process_statement",
      "title": "Process Statement",
      "category": "Import, review, and reconciliation",
      "summary": "Processes statement in the local Clovis ledger.",
      "signature": "(file_path: string, account_id: string, counterpart_account_id: string, expected_balance?: number | null, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, counterpart_col?: string | null, tag_cols?: Record<string, unknown> | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, amount_convention?: string, statement_type?: string | null, balance_sign?: string | null, transfer_account_id?: string | null, date_tolerance_days?: number, commit?: boolean, show_duplicates?: boolean, preview_rows?: number, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "expected_balance",
          "type": "number",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement ending balance expected after reconciliation."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "counterpart_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column that maps rows to counterpart accounts."
        },
        {
          "name": "tag_cols",
          "type": "object",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Mapping of statement columns to tags."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        },
        {
          "name": "balance_sign",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "transfer_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 1,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "commit",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "show_duplicates",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "preview_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 10,
          "description": "Numeric value used by this workflow."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Processes statement in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: file_path, account_id, counterpart_account_id.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "file_path": "./statement.csv",
          "account_id": "<account_id>",
          "counterpart_account_id": "<counterpart_account_id>"
        }
      }
    },
    {
      "name": "project_balances",
      "title": "Project Balances",
      "category": "Ledger and accounts",
      "summary": "Projects balances in the local Clovis ledger.",
      "signature": "(through: string, account_ids?: string[] | null, include_goals?: boolean, branch?: string | null, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "through",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "include_goals",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Projects balances in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: through, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "through": "<through>",
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "project_month_end",
      "title": "Project Month End",
      "category": "Core tools",
      "summary": "Projects month end in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, expected_inflows?: Array<Record<string, unknown>> | null, expected_outflows?: Array<Record<string, unknown>> | null, expected_paychecks?: Array<Record<string, unknown>> | null, include_pending?: boolean, include_planned?: boolean, account_ids?: string[] | null, asset_account_ids?: string[] | null, liability_account_ids?: string[] | null, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "expected_inflows",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Expected incoming cash items for projection."
        },
        {
          "name": "expected_outflows",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Expected outgoing cash items for projection."
        },
        {
          "name": "expected_paychecks",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Expected paycheck or income items for projection."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "include_planned",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Includes planned transactions in the calculation."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "asset_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset account ids to include in a projection."
        },
        {
          "name": "liability_account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of identifiers from the local Clovis ledger."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Projects month end in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "query_effects",
      "title": "Query Effects",
      "category": "Core tools",
      "summary": "Returns semantic transaction effect lines for income, expenses, balance-sheet movement, transfers, refunds, corrections, and grouped reporting.",
      "signature": "(year?: number | null, month?: number | null, date_from?: string | null, date_to?: string | null, status?: string | null, query?: string | null, account_id?: string | null, category_id?: string | null, account_type?: string | null, asset_id?: string | null, group_by?: string, limit?: number, offset?: number, sort?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": "active",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "query",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Case-insensitive description text to search for."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "category_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "account_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account type filter, such as asset, liability, equity, income, or expense."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "group_by",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "none",
          "description": "Optional grouping: none, journal, status, account, category, description_key, or month."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 100,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        },
        {
          "name": "sort",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "date_desc",
          "description": "Sort order for returned rows."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Returns semantic transaction effect lines for income, expenses, balance-sheet movement, transfers, refunds, corrections, and grouped reporting.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "recategorize_by_pattern",
      "title": "Recategorize By Pattern",
      "category": "Import, review, and reconciliation",
      "summary": "Recategorizes by pattern in the local Clovis ledger.",
      "signature": "(pattern: string, new_account_id: string, old_account_id?: string | null, date_from?: string | null, date_to?: string | null, dry_run?: boolean, persist_rule?: boolean, verbose?: boolean, status?: string, amount_min?: number | null, amount_max?: number | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "pattern",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Text or regular-expression pattern used to match descriptions."
        },
        {
          "name": "new_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "old_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "persist_rule",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Saves the pattern as a future match rule."
        },
        {
          "name": "verbose",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "amount_min",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "amount_max",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Recategorizes by pattern in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: pattern, new_account_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "pattern": "<pattern>",
          "new_account_id": "<new_account_id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "recategorize_by_patterns",
      "title": "Recategorize By Patterns",
      "category": "Import, review, and reconciliation",
      "summary": "Recategorizes by patterns in the local Clovis ledger.",
      "signature": "(rules: Array<Record<string, unknown>>, date_from?: string | null, date_to?: string | null, dry_run?: boolean, persist_rules?: boolean, old_account_id?: string | null, verbose?: boolean, status?: string, amount_min?: number | null, amount_max?: number | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "rules",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Match rules to create or apply."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "persist_rules",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "old_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "verbose",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "amount_min",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "amount_max",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Recategorizes by patterns in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: rules.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "rules": [],
          "dry_run": true
        }
      }
    },
    {
      "name": "recategorize_transaction",
      "title": "Recategorize Transaction",
      "category": "Ledger and accounts",
      "summary": "Recategorizes transaction in the local Clovis ledger.",
      "signature": "(tx_id: string, new_account_id: string, old_account_id?: string | null, correction_date?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "tx_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Transaction id."
        },
        {
          "name": "new_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "old_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "correction_date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date value, usually in YYYY-MM-DD format."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Recategorizes transaction in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: tx_id, new_account_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "tx_id": "<tx_id>",
          "new_account_id": "<new_account_id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "recognize_gain_loss",
      "title": "Recognize Gain Loss",
      "category": "Core tools",
      "summary": "Records gain loss in the local Clovis ledger.",
      "signature": "(date: string, amount: number, investment_account_id: string, description: string, gain_loss_account_id?: string | null, status?: string, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "investment_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Investment account receiving or holding the security."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "gain_loss_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account used to record realized gains or losses."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records gain loss in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, amount, investment_account_id, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "amount": 100,
          "investment_account_id": "<investment_account_id>",
          "description": "<description>"
        }
      }
    },
    {
      "name": "reconcile_diff",
      "title": "Reconcile Diff",
      "category": "Import, review, and reconciliation",
      "summary": "Reconciles difference in the local Clovis ledger.",
      "signature": "(account_id: string, date_from?: string | null, date_to?: string | null, branch?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reconciles difference in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "reconcile_planned",
      "title": "Reconcile Planned",
      "category": "Import, review, and reconciliation",
      "summary": "Reconciles planned in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, date_from?: string | null, date_to?: string | null, account_id?: string | null, account_ids?: string[] | null, asset_id?: string | null, date_tolerance_days?: number, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Reconciles planned in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "reconcile_statement",
      "title": "Reconcile Statement",
      "category": "Import, review, and reconciliation",
      "summary": "Reconciles statement in the local Clovis ledger.",
      "signature": "(account_id: string, counterpart_id: string, transactions: Array<Record<string, unknown>>, currency?: string | null, asset_id?: string | null, amount_convention?: string, statement_type?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "transactions",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reconciles statement in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, counterpart_id, transactions."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "counterpart_id": "<counterpart_id>",
          "transactions": []
        }
      }
    },
    {
      "name": "reconcile_statement_plan",
      "title": "Reconcile Statement Plan",
      "category": "Import, review, and reconciliation",
      "summary": "Builds a statement reconciliation plan without immediately applying it.",
      "signature": "(file_path: string, account_id: string, counterpart_account_id?: string | null, expected_balance?: number | null, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, amount_convention?: string, statement_type?: string | null, balance_sign?: string | null, date_tolerance_days?: number, min_likely_score?: number, sample_limit?: number, include_details?: boolean, verbosity?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "file_path",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "expected_balance",
          "type": "number",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement ending balance expected after reconciliation."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        },
        {
          "name": "balance_sign",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "min_likely_score",
          "type": "number",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0.72,
          "description": "Minimum confidence score for accepting likely reconciliation matches."
        },
        {
          "name": "sample_limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 20,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "include_details",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "verbosity",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Builds a statement reconciliation plan without immediately applying it.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: file_path, account_id.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "file_path": "./statement.csv",
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "reconcile_to_balance",
      "title": "Reconcile To Balance",
      "category": "Ledger and accounts",
      "summary": "Reconciles to balance in the local Clovis ledger.",
      "signature": "(account_id: string, target_balance: number, offset_account_id: string, date: string, description?: string | null, asset_id?: string | null, status?: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "target_balance",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "offset_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "description",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reconciles to balance in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, target_balance, offset_account_id, date.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "target_balance": 1,
          "offset_account_id": "<offset_account_id>",
          "date": "2026-06-01",
          "dry_run": true
        }
      }
    },
    {
      "name": "record_investment",
      "title": "Record Investment",
      "category": "Assets and investments",
      "summary": "Records investment in the local Clovis ledger.",
      "signature": "(date: string, amount: number, investment_account_id: string, source_account_id: string, description: string, status?: string, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "investment_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Investment account receiving or holding the security."
        },
        {
          "name": "source_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for funds, cash, or holdings."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records investment in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: date, amount, investment_account_id, source_account_id, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "date": "2026-06-01",
          "amount": 100,
          "investment_account_id": "<investment_account_id>",
          "source_account_id": "<source_account_id>",
          "description": "<description>"
        }
      }
    },
    {
      "name": "record_opening_balance",
      "title": "Record Opening Balance",
      "category": "Ledger and accounts",
      "summary": "Records opening balance in the local Clovis ledger.",
      "signature": "(account_id: string, amount: number, date: string, status?: string, asset_id?: string | null, counterpart_account_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Offsetting account used for imported rows or generated transactions."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records opening balance in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, amount, date.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "amount": 100,
          "date": "2026-06-01"
        }
      }
    },
    {
      "name": "record_opening_balances",
      "title": "Record Opening Balances",
      "category": "Ledger and accounts",
      "summary": "Records opening balances in the local Clovis ledger.",
      "signature": "(balances: Array<Record<string, unknown>>, date: string, status?: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "balances",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "pending",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records opening balances in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: balances, date.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "balances": [],
          "date": "2026-06-01"
        }
      }
    },
    {
      "name": "record_pending_expenses",
      "title": "Record Pending Expenses",
      "category": "Core tools",
      "summary": "Records pending expenses in the local Clovis ledger.",
      "signature": "(account_id: string, transactions: Array<Record<string, unknown>>, counterpart_id?: string | null, asset_id?: string | null, batch_label?: string | null, tags?: Record<string, unknown> | null, dry_run?: boolean, skip_dedup?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "transactions",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "counterpart_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "batch_label",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human label attached to the generated batch."
        },
        {
          "name": "tags",
          "type": "object",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Metadata tags to attach."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "skip_dedup",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Skips duplicate detection. Use only when the user has already reviewed the rows."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Records pending expenses in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id, transactions.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>",
          "transactions": [],
          "dry_run": true
        }
      }
    },
    {
      "name": "refresh_statement",
      "title": "Refresh Statement",
      "category": "Import, review, and reconciliation",
      "summary": "Refreshes statement in the local Clovis ledger.",
      "signature": "(action?: string, plan_id?: string | null, file_path?: string | null, account_id?: string | null, counterpart_account_id?: string | null, expected_balance?: number | null, currency?: string | null, asset_id?: string | null, date_col?: string | null, amount_col?: string | null, desc_col?: string | null, inflow_col?: string | null, outflow_col?: string | null, counterpart_col?: string | null, tag_cols?: Record<string, unknown> | null, skip_rows?: number, skip_footer_rows?: number, date_format?: string, amount_convention?: string, statement_type?: string | null, balance_sign?: string | null, date_tolerance_days?: number, row_indexes?: number[] | null, pending_transactions?: Array<Record<string, unknown>> | null, void_stale_pending?: boolean, status?: string, dry_run?: boolean, batch_label?: string | null, sample_limit?: number, include_details?: boolean, verbosity?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "action",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "plan",
          "description": "Input used by this tool."
        },
        {
          "name": "plan_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Previously generated plan id."
        },
        {
          "name": "file_path",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Local file path made available to Clovis."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "counterpart_account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Offsetting account used for imported rows or generated transactions."
        },
        {
          "name": "expected_balance",
          "type": "number",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement ending balance expected after reconciliation."
        },
        {
          "name": "currency",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Currency symbol when the file or workflow needs an explicit currency."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "date_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing transaction dates."
        },
        {
          "name": "amount_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing signed amounts."
        },
        {
          "name": "desc_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing merchant or transaction descriptions."
        },
        {
          "name": "inflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing incoming amounts."
        },
        {
          "name": "outflow_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column containing outgoing amounts."
        },
        {
          "name": "counterpart_col",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement column that maps rows to counterpart accounts."
        },
        {
          "name": "tag_cols",
          "type": "object",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Mapping of statement columns to tags."
        },
        {
          "name": "skip_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of header rows to ignore at the start of a statement file."
        },
        {
          "name": "skip_footer_rows",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of footer rows to ignore at the end of a statement file."
        },
        {
          "name": "date_format",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "auto",
          "description": "Statement date parser format, or auto for automatic parsing."
        },
        {
          "name": "amount_convention",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "signed",
          "description": "How statement amounts should be interpreted, such as signed or inflow/outflow."
        },
        {
          "name": "statement_type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Optional statement type hint, such as checking, credit card, or brokerage."
        },
        {
          "name": "balance_sign",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "date_tolerance_days",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Number of days a candidate match may differ by."
        },
        {
          "name": "row_indexes",
          "type": "integer[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Statement row indexes to apply or inspect."
        },
        {
          "name": "pending_transactions",
          "type": "object[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "void_stale_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "batch_label",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human label attached to the generated batch."
        },
        {
          "name": "sample_limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 20,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "include_details",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "verbosity",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Refreshes statement in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows.",
          "Use it only for local files the user has intentionally made available to Clovis."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Confirm the file path, permissions, and whether the agent is allowed to read or write that location.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "reopen_period",
      "title": "Reopen Period",
      "category": "Core tools",
      "summary": "Reopens period in the local Clovis ledger.",
      "signature": "(checkpoint_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "checkpoint_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Period checkpoint id to reopen."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reopens period in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: checkpoint_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "checkpoint_id": "<checkpoint_id>"
        }
      }
    },
    {
      "name": "repair_integrity",
      "title": "Repair Integrity",
      "category": "Maintenance and safety",
      "summary": "Repairs integrity in the local Clovis ledger.",
      "signature": "(dry_run?: boolean, backup?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "backup",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Repairs integrity in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it before or after risky operations to back up, inspect, or repair the ledger."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    },
    {
      "name": "reverse_ledger_operation",
      "title": "Reverse Ledger Operation",
      "category": "Ledger and accounts",
      "summary": "Runs reverse ledger operation in the local Clovis ledger.",
      "signature": "(operation_id: string, date?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "operation_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Identifier from the local Clovis ledger."
        },
        {
          "name": "date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Runs reverse ledger operation in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: operation_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "operation_id": "<operation_id>",
          "dry_run": true
        }
      }
    },
    {
      "name": "rollback_import",
      "title": "Rollback Import",
      "category": "Import, review, and reconciliation",
      "summary": "Rolls back import in the local Clovis ledger.",
      "signature": "(batch_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "batch_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Import, commit, or mutation batch id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Rolls back import in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: batch_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "batch_id": "<batch_id>"
        }
      }
    },
    {
      "name": "rollback_recategorize",
      "title": "Rollback Recategorize",
      "category": "Import, review, and reconciliation",
      "summary": "Rolls back recategorize in the local Clovis ledger.",
      "signature": "(batch_id: string, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "batch_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Import, commit, or mutation batch id."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Rolls back recategorize in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it during statement import, duplicate review, matching, categorization, or reconciliation workflows."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: batch_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "batch_id": "<batch_id>"
        }
      }
    },
    {
      "name": "search_transactions",
      "title": "Search Transactions",
      "category": "Ledger and accounts",
      "summary": "Searches transactions in the local Clovis ledger.",
      "signature": "(desc?: string | null, query?: string | null, amount_min?: number | null, amount_max?: number | null, account_id?: string | null, status?: string | null, date_from?: string | null, date_to?: string | null, posted_at_from?: string | null, posted_at_to?: string | null, limit?: number, offset?: number, include_account_effects?: boolean, sort?: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "desc",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "query",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Case-insensitive description text to search for."
        },
        {
          "name": "amount_min",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "amount_max",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Money or quantity value in the relevant asset."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "posted_at_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "posted_at_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 50,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "offset",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 0,
          "description": "Number of rows to skip before returning results."
        },
        {
          "name": "include_account_effects",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Account selected from the local chart of accounts."
        },
        {
          "name": "sort",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "date_desc",
          "description": "Sort order for returned rows."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Searches transactions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "set_budget",
      "title": "Set Budget",
      "category": "Planning and cash flow",
      "summary": "Sets budget in the local Clovis ledger.",
      "signature": "(account: string, amount: number, period?: string, year?: number | null, month?: number | null, rollover?: boolean, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account name or id to inspect."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "period",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "monthly",
          "description": "Input used by this tool."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "rollover",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Sets budget in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account, amount.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account": "<account>",
          "amount": 100
        }
      }
    },
    {
      "name": "set_budgets",
      "title": "Set Budgets",
      "category": "Planning and cash flow",
      "summary": "Sets budgets in the local Clovis ledger.",
      "signature": "(budgets: Array<Record<string, unknown>>, year?: number | null, month?: number | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "budgets",
          "type": "object[]",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Sets budgets in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: budgets.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "budgets": []
        }
      }
    },
    {
      "name": "set_goal",
      "title": "Set Goal",
      "category": "Planning and cash flow",
      "summary": "Sets goal in the local Clovis ledger.",
      "signature": "(account: string, target: number, name: string, target_date?: string | null, priority?: number, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Account name or id to inspect."
        },
        {
          "name": "target",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "name",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable name to create or update."
        },
        {
          "name": "target_date",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Date value, usually in YYYY-MM-DD format."
        },
        {
          "name": "priority",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 1,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Sets goal in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account, target, name.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "account": "<account>",
          "target": 1,
          "name": "<name>"
        }
      }
    },
    {
      "name": "spending",
      "title": "Spending",
      "category": "Reports",
      "summary": "Reports spending in the local Clovis ledger.",
      "signature": "(year: number, month: number, branch?: string | null, include_pending?: boolean, status?: string | null, account_ids?: string[] | null, entity_id?: string | null, quote_asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "include_pending",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Includes pending transactions in the calculation."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "account_ids",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "List of ledger account ids or account references."
        },
        {
          "name": "entity_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Entity id to filter reports when entity tracking is used."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reports spending in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when the user asks for a finance report or period comparison."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: year, month, quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "year": 1,
          "month": 6,
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "spending_rate",
      "title": "Spending Rate",
      "category": "Reports",
      "summary": "Calculates spending rate in the local Clovis ledger.",
      "signature": "(account?: string | null, year?: number | null, month?: number | null, status?: string, quote_asset_id: string) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "account",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Account name or id to inspect."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Calculates spending rate in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when the user asks for a finance report or period comparison."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "suggest_budgets",
      "title": "Suggest Budgets",
      "category": "Planning and cash flow",
      "summary": "Suggests budgets in the local Clovis ledger.",
      "signature": "(months?: number, year?: number | null, month?: number | null, skip_budgeted?: boolean, quote_asset_id: string) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "months",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 3,
          "description": "Numeric value used by this workflow."
        },
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "skip_budgeted",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Suggests budgets in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "tool_registry",
      "title": "Tool Registry",
      "category": "Configuration",
      "summary": "Returns the available public tools, signatures, and safety metadata.",
      "signature": "(names?: string[] | null, summary?: boolean, safety_filter?: string | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "names",
          "type": "string[]",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "summary",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Boolean switch for this workflow."
        },
        {
          "name": "safety_filter",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Returns the available public tools, signatures, and safety metadata.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {}
      }
    },
    {
      "name": "top_descriptions",
      "title": "Top Descriptions",
      "category": "Core tools",
      "summary": "Shows descriptions in the local Clovis ledger.",
      "signature": "(account_id: string, limit?: number, status?: string | null) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": 50,
          "description": "Maximum number of rows to return."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Shows descriptions in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: account_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "account_id": "<account_id>"
        }
      }
    },
    {
      "name": "transfer",
      "title": "Transfer",
      "category": "Core tools",
      "summary": "Records transfer in the local Clovis ledger.",
      "signature": "(from_account_id: string, to_account_id: string, amount: number, date: string, description: string, status?: string, asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "from_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Source account id for a transaction or transfer."
        },
        {
          "name": "to_account_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Destination account id for a transaction or transfer."
        },
        {
          "name": "amount",
          "type": "number",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Money or quantity amount in the selected asset."
        },
        {
          "name": "date",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Ledger date in YYYY-MM-DD format."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Human-readable transaction, account, rule, or journal description."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Records transfer in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: from_account_id, to_account_id, amount, date, description.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "from_account_id": "<from_account_id>",
          "to_account_id": "<to_account_id>",
          "amount": 100,
          "date": "2026-06-01",
          "description": "<description>"
        }
      }
    },
    {
      "name": "trial_balance",
      "title": "Trial Balance",
      "category": "Ledger and accounts",
      "summary": "Builds trial balance in the local Clovis ledger.",
      "signature": "(branch?: string | null, status?: string | null, asset_id: string) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "branch",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Scenario branch name or id."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Builds trial balance in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD"
        }
      }
    },
    {
      "name": "unbudgeted_spending",
      "title": "Unbudgeted Spending",
      "category": "Planning and cash flow",
      "summary": "Reports spending in the local Clovis ledger.",
      "signature": "(year?: number | null, month?: number | null, status?: string, quote_asset_id: string) => Array<Record<string, unknown>>",
      "returns": {
        "type": "object[]"
      },
      "parameters": [
        {
          "name": "year",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Four-digit year."
        },
        {
          "name": "month",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Month number from 1 to 12."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": "posted",
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "quote_asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency used to quote report values. Clovis does not infer this."
        }
      ],
      "aliases": {
        "currency": "quote_asset_id",
        "quote": "quote_asset_id",
        "quote_id": "quote_asset_id"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "supportsDryRun": false,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Reports spending in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to inspect the ledger or answer a question without changing records.",
          "Use it for budgets, goals, forecasts, month-end projections, runway, or cash planning."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: quote_asset_id.",
          "Choose the report currency or asset explicitly; Clovis does not infer report currency."
        ],
        "safety": "Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.",
        "returns": "Returns object[] from the local ledger.",
        "exampleArguments": {
          "quote_asset_id": "USD"
        }
      }
    },
    {
      "name": "update_account",
      "title": "Update Account",
      "category": "Ledger and accounts",
      "summary": "Updates account in the local Clovis ledger.",
      "signature": "(id: string, name?: string | null, type?: string | null, code?: string | null, parent_id?: string | null, color_hex?: string | null, default_asset_id?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Input used by this tool."
        },
        {
          "name": "name",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human-readable name to create or update."
        },
        {
          "name": "type",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "code",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "parent_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Parent account id."
        },
        {
          "name": "color_hex",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Display color for the account or asset."
        },
        {
          "name": "default_asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Identifier from the local Clovis ledger."
        }
      ],
      "aliases": {},
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Updates account in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it when working with accounts, transactions, balances, registers, or double-entry records."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "id": "<id>"
        }
      }
    },
    {
      "name": "update_asset",
      "title": "Update Asset",
      "category": "Assets and investments",
      "summary": "Updates asset in the local Clovis ledger.",
      "signature": "(asset_id: string, symbol?: string | null, name?: string | null, dry_run?: boolean) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "asset_id",
          "type": "string",
          "required": true,
          "nullable": false,
          "variadic": false,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "symbol",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "name",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Human-readable name to create or update."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": false
      },
      "docs": {
        "summary": "Updates asset in the local Clovis ledger.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it.",
          "Use it for assets, prices, holdings, securities, investment activity, or foreign-exchange movement."
        ],
        "beforeCalling": [
          "Have exact values for required inputs: asset_id.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "State the intended ledger change in plain language before calling the tool."
        ],
        "safety": "Can write, but supports dry-run. Ask the agent to preview the result before committing changes.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "asset_id": "USD"
        }
      }
    },
    {
      "name": "void_by_filter",
      "title": "Void By Filter",
      "category": "Core tools",
      "summary": "Voids or hard-deletes transactions matching a filter, with dry-run enabled by default.",
      "signature": "(date_from?: string | null, date_to?: string | null, account_id?: string | null, status?: string | null, asset_id?: string | null, posted_at_from?: string | null, posted_at_to?: string | null, dry_run?: boolean, hard_delete?: boolean, sample_limit?: number | null) => Record<string, unknown>",
      "returns": {
        "type": "object"
      },
      "parameters": [
        {
          "name": "date_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Start date filter in YYYY-MM-DD format."
        },
        {
          "name": "date_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "End date filter in YYYY-MM-DD format."
        },
        {
          "name": "account_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Ledger account id or resolvable account reference."
        },
        {
          "name": "status",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Transaction status filter or value: posted, pending, planned, or void."
        },
        {
          "name": "asset_id",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Asset or currency id used by the ledger."
        },
        {
          "name": "posted_at_from",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "posted_at_to",
          "type": "string",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Input used by this tool."
        },
        {
          "name": "dry_run",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": true,
          "description": "Preview the result without committing changes."
        },
        {
          "name": "hard_delete",
          "type": "boolean",
          "required": false,
          "nullable": false,
          "variadic": false,
          "default": false,
          "description": "Permanently deletes rows instead of voiding them. Use only with explicit approval."
        },
        {
          "name": "sample_limit",
          "type": "integer",
          "required": false,
          "nullable": true,
          "variadic": false,
          "default": null,
          "description": "Numeric value used by this workflow."
        }
      ],
      "aliases": {
        "asset": "asset_id"
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "safety": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false,
        "supportsDryRun": true,
        "defaultDryRun": true
      },
      "docs": {
        "summary": "Voids or hard-deletes transactions matching a filter, with dry-run enabled by default.",
        "useWhen": [
          "Use it when an agent needs to prepare a change and show a preview before committing it."
        ],
        "beforeCalling": [
          "No required inputs are needed, but date, status, asset, and account filters should still be explicit when the user cares about scope.",
          "Start with dry_run=true, show the preview, then ask before applying the change.",
          "Create or confirm a backup and get explicit approval before running it for real."
        ],
        "safety": "Destructive. This can remove, void, discard, roll back, repair, or permanently change ledger data. Require explicit user approval.",
        "returns": "Returns object from the local ledger.",
        "exampleArguments": {
          "dry_run": true
        }
      }
    }
  ]
}
