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

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 the enqueued list of the invoice fetch (well_create_browser_task, browser goal_kind invoice_fetch). Each one comes back in invoice_matching.vendors with the state of its collection.

Output 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. Changed1 schema field changed
    • changedInput schema / properties / counterparty_ids / description
      Previous value: -"invoice_matching only: the company_id of every row of the enqueued list of the invoice fetch (well_create_task, browser goal_kind invoice_fetch). Each one comes back in invoice_matching.vendors with the state of its collection."New value: +"invoice_matching only: the company_id of every row of the enqueued list of the invoice fetch (well_create_browser_task, browser goal_kind invoice_fetch). Each one comes back in invoice_matching.vendors with the state of its collection."
  2. Changed10 schema fields changed
    • removedOutput schema / properties / bank_sync / properties / connectors / items / properties / install_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / bank_sync / properties / connectors / items / properties / install_url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / bank_sync / properties / connectors / items / properties / last_successful_sync_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / bank_sync / properties / connectors / items / properties / last_successful_sync_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / bank_sync / properties / connectors / items / properties / reconnect_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / bank_sync / properties / connectors / items / properties / reconnect_url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / invoice_matching / properties / vendors / items / properties / task_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / invoice_matching / properties / vendors / items / properties / task_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed1 schema field 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. Each one comes back in invoice_matching.vendors with the state of its collection."New value: +"invoice_matching only: the company_id of every row of the enqueued list of the invoice fetch (well_create_task, browser goal_kind invoice_fetch). Each one comes back in invoice_matching.vendors with the state of its collection."
  4. 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"
      +]
  5. 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"
      +}
  6. 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"
      +}
  7. 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"
      +]
  8. 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"
      +]
  9. 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"
      +}
  10. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, openWorldHint=false, destructiveHint=false, so the safety profile is already given; the description adds real substance beyond that: the 5-second wait, the 60-call cap, the four status branches, the needs_account semantics for statement_import, and the rule that a next_step of stop ends the loop even on still_running.

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

Conciseness4/5

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

The first sentence is front-loaded and the body is organized as a bulleted kind list plus per-status branches, so it is navigable despite being long. The announce-sentence block is verbose procedural text, though it is functional guidance an agent must follow.

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 an 11-parameter, six-kind, five-status polling tool with an output schema, the description covers loop control, termination, error branches and workspace selection without needing to restate return values. Nothing essential for correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each argument, but the description adds the invariant-arguments rule across calls and the workspace direct-call rule, plus which kinds take periods/document_ids. It stops short of explaining snapshot_only or timeout_s behavior, which the schema only minimally covers.

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?

Opens with a specific verb, resource and scope: waits up to 5 seconds for one background process of the workspace and returns where it stands. The 'kind' enum and the per-kind announce sentences make it immediately distinguishable from siblings like well_get_worklist_status or the enqueue tools.

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?

Explicitly says when to call (poll after a background process is enqueued), how to sequence calls (call=1 then increment, keep other arguments the same, max 60 per turn), and when to stop. It also routes correctly per status, including the still_running exceptions for invoice_matching and reconciliation, and the next_step override.

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