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 "imported" | "needs_account" | "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.

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.
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. 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"
      +}
  2. 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"
      +]
  3. 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"
      +    }
      +  ]
      +}
  4. 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"
      +]
  5. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already say readOnlyHint=true and destructiveHint=false, and the description reinforces this with 'This tool reads only — it changes nothing.' It goes further by disclosing important runtime behavior: 'not_found_yet' is not an error, null counts mean unknown rather than zero, and 'records' contains only minted transactions. These details materially shape how an agent interprets results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence earns its place: core purpose, call cadence, status semantics, null handling, records scope, and read-only guarantee. The bullet list for statuses makes the dense information scannable, and the most important usage instruction is front-loaded before the status details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a polling/query tool with three parameters, strong annotations, and an output schema, the description covers everything an agent needs: when to call, what each status means, how to interpret nulls, what records contain, and that the operation is side-effect free. Even without the output schema, the description would be almost sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema coverage is 100%, so the schema already fully documents document_id, workspace_id, and conversation_id. The description adds contextual value by tying document_id to the value returned by well_create_statement_upload, but it does not add meaning beyond what the parameter descriptions already provide. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Read the outcome of a bank-statement upload started with well_create_statement_upload, by the document_id that tool returned.' It clearly separates this read tool from its creation counterpart by stating it does not create or redraw the card. No agent could mistake it for the upload or create tools in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit call timing: 'Call it once, shortly after the client has uploaded the file bytes' and explains when not to call again: 'The card polls this import result itself until it settles, so call this tool again only if the user asks.' It also treats 'not_found_yet' as a normal early state and instructs to poll again after upload. This is strong, actionable usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources