Skip to main content
Glama

Get statement import result

well_get_statement_import_result
Read-only

Read the outcome of a bank-statement upload started with well_create_statement_upload, by the document_id that tool returned.

well_create_statement_upload already renders a card from its own result — this tool does not create or redraw it. Call it once, shortly after the client has uploaded the file bytes, to learn what happened. The card polls this import result itself until it settles, so call this tool again only if the user asks.

  • status "not_found_yet": the upload has not landed yet — a NORMAL result right after minting the slot, not an error. Poll again once the file has been uploaded.

  • status "processing": the file is uploaded and the statement is still being extracted / promoted.

  • status "needs_account": a terminal outcome, and NOT an import. The statement was read but waits for its bank account; none of its transactions are in Well yet. Say it waits for its bank account, never that it was imported, landed or promoted, and follow the hint.

  • status "imported" | "duplicate" | "skipped" | "failed": the terminal outcome. On "imported", matched_count / review_count / minted_count / already_present_count report the promotion's own snapshot counts, taken once at import time and covering every promotable line of the file disjointly; null on any of them means the row predates count tracking — treat as unknown, never as 0. records lists the minted transactions only — matched or ambiguous lines link an existing transaction and are excluded; graph is the frozen record graph for the same snapshot; records_url opens the workspace's transactions table.

This tool reads only — it changes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesThe document_id well_create_statement_upload returned — pre-allocated at mint, before the upload lands.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
include_previewNoSet by the import card to draw the statement image. Leave unset: the preview is for the card, not the model.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
errorNo
graphNoThe frozen record graph for this import, taken from the same snapshot as `records`. Never present on "processing" or "not_found_yet". Like `records`, its counterparty fields are null (frozen before resolution runs) — see `records_url` for the live values.
phaseNo
reasonNo
statusNo
recordsNoTransactions this import minted as new rows — matched or ambiguous lines link an existing transaction and are excluded. Present only on a terminal "imported" result that carries a snapshot. The snapshot freezes at mint time, so `counterparty` is always null here — resolution runs asynchronously after import; open `records_url` for the live resolved value.
successYes
document_idNo
imported_atNo
records_urlNoLogin-gated deep link to the workspace's transactions table — opened on the first minted record when `records` is non-empty, otherwise the plain table.
minted_countNoLines minted as new transactions. Absent means the row predates count tracking — treat as unknown, never as 0.
review_countNoLines skipped as an ambiguous cross-connector match, pending review. Absent means the row predates count tracking — treat as unknown, never as 0.
matched_countNoLines linked to an existing cross-connector transaction. Absent means the row predates count tracking — treat as unknown, never as 0.
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
already_present_countNoLines an earlier import already carried — a partial-overlap re-export mints only the new lines, so the four counts cover the file's promotable lines. Absent means the row predates count tracking — treat as unknown, never as 0.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.
counterparties_pendingNoWhether any minted transaction still awaits its counterparty. True right after import while the from/to parties resolve in the background; absent when the result carries no minted transactions.
statement_extraction_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  2. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / include_preview
      Added value: +{
      +  "description": "Set by the import card to draw the statement image. Leave unset: the preview is for the card, not the model.",
      +  "type": "boolean"
      +}
  5. Changed4 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_note
      Added value: +{
      +  "description": "Present only when the server opened a fresh lane, stating that no choice recorded earlier was read.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_source
      Added value: +{
      +  "description": "Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.",
      +  "enum": [
      +    "host_meta",
      +    "argument",
      +    "minted"
      +  ],
      +  "type": "string"
      +}
  6. Changed2 schema fields changed
    • changedOutput schema / properties / graph / properties / graph / properties / edges / items / properties / kind / enum
      Previous value: -[
      -  "company_person",
      -  "invoice_issuer",
      -  "invoice_receiver",
      -  "invoice_transaction",
      -  "invoice_document",
      -  "transaction_document",
      -  "account_transaction",
      -  "journal_entry_transaction",
      -  "journal_entry_ledger_account",
      -  "business_relation",
      -  "workspace_connector_link",
      -  "invoice_payment_means",
      -  "transaction_payment_means",
      -  "task_invoice",
      -  "journal_journal_entry",
      -  "provider_for",
      -  "workspace_membership",
      -  "same_entity"
      -]New value: +[
      +  "company_person",
      +  "invoice_issuer",
      +  "invoice_receiver",
      +  "invoice_transaction",
      +  "invoice_document",
      +  "transaction_document",
      +  "account_transaction",
      +  "journal_entry_transaction",
      +  "journal_entry_ledger_account",
      +  "business_relation",
      +  "workspace_connector_link",
      +  "invoice_payment_means",
      +  "transaction_payment_means",
      +  "task_invoice",
      +  "journal_journal_entry",
      +  "provider_for",
      +  "workspace_membership",
      +  "company_note",
      +  "person_note",
      +  "note_note",
      +  "same_entity"
      +]
    • changedOutput schema / properties / graph / properties / graph / properties / nodes / items / properties / type / enum
      Previous value: -[
      -  "company",
      -  "account",
      -  "person",
      -  "invoice",
      -  "transaction",
      -  "document",
      -  "ledger_account",
      -  "journal_entry",
      -  "workspace_connector",
      -  "payment_means",
      -  "card",
      -  "check",
      -  "task",
      -  "media",
      -  "journal",
      -  "blueprint_run",
      -  "chat_conversation",
      -  "connector",
      -  "membership",
      -  "memory",
      -  "custom_column",
      -  "field_rule",
      -  "provider"
      -]New value: +[
      +  "company",
      +  "account",
      +  "person",
      +  "invoice",
      +  "transaction",
      +  "document",
      +  "ledger_account",
      +  "journal_entry",
      +  "workspace_connector",
      +  "payment_means",
      +  "card",
      +  "check",
      +  "task",
      +  "media",
      +  "journal",
      +  "blueprint_run",
      +  "chat_conversation",
      +  "connector",
      +  "membership",
      +  "memory",
      +  "custom_column",
      +  "field_rule",
      +  "provider",
      +  "note"
      +]
  7. Changed3 schema fields changed
    • addedOutput schema / properties / counterparties_pending
      Added value: +{
      +  "description": "Whether any minted transaction still awaits its counterparty. True right after import while the from/to parties resolve in the background; absent when the result carries no minted transactions.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / phase
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "queued",
      +        "extracting",
      +        "categorized",
      +        "importing"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  8. Changed14 schema fields changed
    • addedOutput schema / properties / records / items / properties / amount / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / records / items / properties / amount / type
      Removed value: -"number"
    • addedOutput schema / properties / records / items / properties / balanceAtFrom
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / category
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / closingBooked
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / currency / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / records / items / properties / currency / type
      Removed value: -"string"
    • addedOutput schema / properties / records / items / properties / domain
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / openingBooked
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / primaryBadge
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / receiver
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "logo_url": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "logo_url"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / records / items / properties / root
      Added value: +{
      +  "enum": [
      +    "companies",
      +    "people",
      +    "invoices",
      +    "documents",
      +    "transactions",
      +    "accounts",
      +    "connectors",
      +    "workspace_connectors",
      +    "ledger_accounts",
      +    "journals",
      +    "journal_entries",
      +    "tax_rates",
      +    "invoice_transactions",
      +    "memberships",
      +    "payment_means",
      +    "media",
      +    "emails",
      +    "phones",
      +    "web_links",
      +    "locations",
      +    "categories",
      +    "invoice_items",
      +    "account_balances",
      +    "exchange_rates",
      +    "cards",
      +    "checks",
      +    "invoice_payment_means",
      +    "workspaces",
      +    "blueprint_runs",
      +    "chat_conversations",
      +    "tasks",
      +    "billing_events"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / records / items / properties / secondaryBadge
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / records / items / required
      Previous value: -[
      -  "id",
      -  "date",
      -  "label",
      -  "amount",
      -  "currency",
      -  "counterparty"
      -]New value: +[
      +  "root",
      +  "id",
      +  "date",
      +  "label",
      +  "amount",
      +  "currency",
      +  "counterparty",
      +  "receiver",
      +  "category",
      +  "primaryBadge",
      +  "secondaryBadge",
      +  "openingBooked",
      +  "closingBooked",
      +  "balanceAtFrom",
      +  "domain"
      +]
  9. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources