Skip to main content
Glama

Wait for a process

well_wait_for_process
Read-only

Waits up to 5 seconds for one background process of the workspace and returns where it stands. Before each call, announce it with the sentence for its kind, and nothing else, unless the skill says to make that call with no announce sentence:

  • bank_sync: "Retrieving transactions from your bank…"

  • transaction_categories: "Categorizing transactions from your counterparties…"

  • invoice_matching: "Retrieving invoices and matching with transactions…"

  • reconciliation: "Matching invoices with your bank transactions…"

  • statement_import: "Reading your statements…" (pass document_ids)

  • demo_seed: "Preparing your sample data…" (a demo workspace only; any other workspace answers done at once) Pass call: 1 on the first call of a turn and 1 more on each next call; keep every other argument the same. status "still_running": call again now, at most 60 calls in one turn, then end the turn on the last headline (invoice_matching: after the last of them, go on to the close instead of ending the turn; reconciliation: after the last of them, go on to the next step of the flow instead of ending the turn). A next_step that says to stop ends the loop at once, even on still_running. status "done": quote the headline in one line and continue. status "needs_account" (statement_import only): a statement waits for its bank account, and 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 next_step. status "failed": stop the loop and take the failure branch the headline names. When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callNoWhich call of this turn this is: 1 on the first call of a turn, then 1 more on each next call. On call 60, next_step says to stop.
kindYesThe background process to wait for.
periodsNoThe months the flow waits on, at most 6. Name each period ONE way: { calendar_year, calendar_month } or { fiscal_year, fiscal_period }, never both. Required for transaction_categories and invoice_matching. Optional for bank_sync: omit it before the months are chosen. Not taken by reconciliation or demo_seed: they read the whole workspace on their own, and a call that passes periods is refused.
timeout_sNoDefault 5, clamped to 5-60.
document_idsNostatement_import only: every document_id well_claim_statement_draft or well_upload_statement_bytes returned for the statements being imported.
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.
expected_rowsNoinvoice_matching only: how many picked gap rows the enqueue covered.
snapshot_onlyNoReturn the current state at once, without waiting.
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.
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.
counterparty_idsNoinvoice_matching only: the company_id of every row of well_enqueue_invoice_fetch's enqueued list. Each one comes back in invoice_matching.vendors with the state of its collection.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
errorNo
statusNo
successYes
headlineNo
bank_syncNo
elapsed_sNo
next_stepNo
already_doneNoThe first read was already terminal: no waiting happened.
reconciliationNo
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.
invoice_matchingNo
statement_importNo
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.
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.
transaction_categoriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields 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."
    • addedOutput schema / properties / statement_import / properties / imported / description
      Added value: +"Statements whose transactions are in the workspace."
    • addedOutput schema / properties / statement_import / properties / needs_account / description
      Added value: +"Statements that wait for their bank account. None of their transactions are in the workspace yet."
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "still_running",
      -  "done",
      -  "failed"
      -]New value: +[
      +  "still_running",
      +  "done",
      +  "needs_account",
      +  "failed"
      +]
  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. Changed2 schema fields changed
    • addedOutput schema / properties / bank_sync / properties / connectors / items / properties / history_state
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "loading",
      +        "complete",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / bank_sync / properties / connectors / items / required
      Previous value: -[
      -  "name",
      -  "state",
      -  "transactions_imported",
      -  "running_for_minutes",
      -  "estimated_remaining_minutes",
      -  "last_successful_sync_at",
      -  "last_refreshed_days",
      -  "fresh",
      -  "reconnect_url",
      -  "install_url"
      -]New value: +[
      +  "name",
      +  "state",
      +  "transactions_imported",
      +  "running_for_minutes",
      +  "estimated_remaining_minutes",
      +  "last_successful_sync_at",
      +  "last_refreshed_days",
      +  "fresh",
      +  "reconnect_url",
      +  "install_url",
      +  "history_state"
      +]
  5. Changed3 schema fields changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "bank_sync",
      -  "transaction_categories",
      -  "invoice_matching",
      -  "reconciliation",
      -  "statement_import"
      -]New value: +[
      +  "bank_sync",
      +  "transaction_categories",
      +  "invoice_matching",
      +  "reconciliation",
      +  "statement_import",
      +  "demo_seed"
      +]
    • changedInput schema / properties / periods / description
      Previous value: -"The months the flow waits on, at most 6. Name each period ONE way: { calendar_year, calendar_month } or { fiscal_year, fiscal_period }, never both. Required for transaction_categories and invoice_matching. Optional for bank_sync: omit it before the months are chosen. Not taken by reconciliation: it reads the recent ended months of the whole workspace on its own, and a call that passes periods is refused."New value: +"The months the flow waits on, at most 6. Name each period ONE way: { calendar_year, calendar_month } or { fiscal_year, fiscal_period }, never both. Required for transaction_categories and invoice_matching. Optional for bank_sync: omit it before the months are chosen. Not taken by reconciliation or demo_seed: they read the whole workspace on their own, and a call that passes periods is refused."
    • changedOutput schema / properties / kind / enum
      Previous value: -[
      -  "bank_sync",
      -  "transaction_categories",
      -  "invoice_matching",
      -  "reconciliation",
      -  "statement_import"
      -]New value: +[
      +  "bank_sync",
      +  "transaction_categories",
      +  "invoice_matching",
      +  "reconciliation",
      +  "statement_import",
      +  "demo_seed"
      +]
  6. Changed2 schema fields changed
    • changedInput schema / properties / counterparty_ids / description
      Previous value: -"invoice_matching only: the company_id of every row of well_enqueue_invoice_fetch's enqueued list."New value: +"invoice_matching only: the company_id of every row of well_enqueue_invoice_fetch's enqueued list. Each one comes back in invoice_matching.vendors with the state of its collection."
    • addedOutput schema / properties / invoice_matching / properties / vendors
      Added value: +{
      +  "description": "One entry per distinct counterparty_ids entry, in that order: where its collection stands. Present only when the call named counterparties.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "company_id": {
      +        "type": "string"
      +      },
      +      "documents": {
      +        "anyOf": [
      +          {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Documents the finished run brought back. Set only on collected."
      +      },
      +      "failure": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "auth_wall",
      +              "portal_blocked",
      +              "no_documents",
      +              "no_entitlement",
      +              "retrieval_failed",
      +              "extension_unavailable",
      +              "extension_refused",
      +              "extension_timeout",
      +              "dispatch_failed",
      +              "unreported",
      +              "unknown"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Why the collection failed. Set only on failed."
      +      },
      +      "state": {
      +        "description": "not_started: no run has started for this vendor yet. running: a browser run is in progress. collected: the run finished. failed: the run ended in error or never reached the extension. cancelled: the task or its run was cancelled. manual_upload: the vendor has no browser route; its invoice needs an upload.",
      +        "enum": [
      +          "not_started",
      +          "running",
      +          "collected",
      +          "failed",
      +          "cancelled",
      +          "manual_upload"
      +        ],
      +        "type": "string"
      +      },
      +      "task_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The collection task the state was read from; null when the counterparty has none."
      +      }
      +    },
      +    "required": [
      +      "company_id",
      +      "task_id",
      +      "state",
      +      "documents",
      +      "failure"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  7. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources