Documentation

preview_import

preview_import MCP tool reference, parameters, return type, and safety hints.

npm

What it does

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>
read-only

Read-only. This is appropriate for inspection, reporting, diagnostics, and first-pass agent answers.

When to use it

Use this section to decide whether the tool fits the user request before calling it.

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.

Before calling

Agents should gather these facts or confirmations first.

1

Have exact values for required inputs: file_path, account_id, counterpart_account_id.

2

Confirm the file path, permissions, and whether the agent is allowed to read or write that location.

Parameters

Required inputs are marked clearly. Optional inputs can usually be omitted unless the workflow needs them.

file_pathrequired
string

Local file path made available to Clovis.

account_idrequired
string

Ledger account id or resolvable account reference.

counterpart_account_idrequired
string

Offsetting account used for imported rows or generated transactions.

rowsoptional
integer

Rows to import, review, or mutate.

Default: 3
currencyoptional
string | null

Currency symbol when the file or workflow needs an explicit currency.

Default: null
asset_idoptional
string | null

Asset or currency id used by the ledger.

Default: null
date_coloptional
string | null

Statement column containing transaction dates.

Default: null
amount_coloptional
string | null

Statement column containing signed amounts.

Default: null
desc_coloptional
string | null

Statement column containing merchant or transaction descriptions.

Default: null
inflow_coloptional
string | null

Statement column containing incoming amounts.

Default: null
outflow_coloptional
string | null

Statement column containing outgoing amounts.

Default: null
skip_rowsoptional
integer

Number of header rows to ignore at the start of a statement file.

Default: 0
skip_footer_rowsoptional
integer

Number of footer rows to ignore at the end of a statement file.

Default: 0
date_formatoptional
string

Statement date parser format, or auto for automatic parsing.

Default: "auto"
amount_conventionoptional
string

How statement amounts should be interpreted, such as signed or inflow/outflow.

Default: "signed"
statement_typeoptional
string | null

Optional statement type hint, such as checking, credit card, or brokerage.

Default: null

Agent call shape

Use the exact tool name and pass arguments as structured JSON through the MCP client.

preview_import

Copy this shape into agent instructions, evals, or MCP client tests.

{
  "tool": "preview_import",
  "arguments": {
    "file_path": "./statement.csv",
    "account_id": "<account_id>",
    "counterpart_account_id": "<counterpart_account_id>"
  }
}

Metadata