Skip to main content
Glama
SShadowS

business-central-mcp

by SShadowS

bc_respond_dialog

Destructive

Respond to a Business Central dialog or confirmation prompt opened by an action, write, or report, using the returned dialogFormId to resume the workflow.

Instructions

Responds to an open Business Central dialog or confirmation prompt. Dialogs are triggered by bc_execute_action, bc_write_data, or bc_run_report when BC requires user input (e.g., "Do you want to post?", "Delete this record?", validation warnings, or a report request page). When those tools return a dialogsOpened array with requiresDialogResponse: true, or bc_run_report returns a requestPage, you MUST call this tool (response: "ok" for a report request page) to continue the workflow.

The dialogFormId comes from the dialogsOpened array in the triggering tool's response. The response parameter accepts: "ok" (confirm/accept), "cancel" (dismiss/abort), "yes" or "no" (answer a yes/no question), "abort" (only for a dialog that shows an Abort button; on any other dialog BC ignores it and the call fails with INPUT_VALIDATION_ERROR, the dialog still open), or "close" (close a modal information page). Choose the response that matches the dialog's intent -- confirmation dialogs typically need "yes", acceptance dialogs need "ok".

After responding, check the changedSections array in the result to see which page sections were affected. For example, posting a Sales Order may change all sections. If the dialog response triggers another dialog (chained confirmations), the response will include a new dialogsOpened array -- respond to each dialog in sequence.

Do NOT call this without a preceding dialog -- there is no dialog to respond to unless dialogsOpened was returned by bc_execute_action / bc_write_data, or a requestPage was returned by bc_run_report. Do NOT guess the dialogFormId -- always use the exact value from the dialogsOpened array (or requestPage.formId).

Example: { "pageContextId": "abc", "dialogFormId": "dialog-123", "response": "yes" }

If the action produces a file (Open in Excel, Print, export), its bytes appear in downloads[] (an operationId replay returns the metadata with error code NOT_REPLAYED instead of the bytes); links BC would open externally appear in externalUris[] and are never fetched by the server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
responseYes"ok" confirms, "cancel" dismisses, "yes"/"no" answers a question, "abort" force-closes, "close" closes a modal info page.
operationIdNoOptional idempotency key (e.g. a UUID you generate). Retrying with the same operationId and the same arguments returns the first call's stored result instead of running the change again, so a retry after a dropped connection or timeout cannot double-post. Reusing it with different arguments is rejected (OPERATION_ID_REUSED). If the first call's outcome is unknown, the retry returns OPERATION_IN_DOUBT: check the record's state before acting again under a new operationId. Every result of this tool carries replaySafe: true means BC's response proved that re-running the same call (even under a new operationId, after an unknown outcome) cannot apply the change twice -- the write was echoed as an absolute value, or the form it acted on is closed so BC rejects a re-run; false means a re-run may double-apply or nothing proved otherwise, so read the record back before retrying. Replay is time-limited: a completed entry is kept for BC_OPERATION_TTL (default 24h), after which the same operationId runs the call again; check with bc_get_operation before a late retry. A replayed result carries download metadata (fileName, contentType, sizeBytes, savedPath) but not the file bytes.
dialogFormIdYesDialog form ID from the dialogsOpened array returned by bc_execute_action or bc_write_data, or requestPage.formId returned by bc_run_report.
pageContextIdYesPage context ID of the page that triggered the dialog.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
downloadsYes
replaySafeYes
openedPagesYes
externalUrisYes
dialogsOpenedYes
changedSectionsYes
requiresDialogResponseYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / operationId
      Added value: +{
      +  "description": "Optional idempotency key (e.g. a UUID you generate). Retrying with the same operationId and the same arguments returns the first call's stored result instead of running the change again, so a retry after a dropped connection or timeout cannot double-post. Reusing it with different arguments is rejected (OPERATION_ID_REUSED). If the first call's outcome is unknown, the retry returns OPERATION_IN_DOUBT: check the record's state before acting again under a new operationId. Every result of this tool carries replaySafe: true means BC's response proved that re-running the same call (even under a new operationId, after an unknown outcome) cannot apply the change twice -- the write was echoed as an absolute value, or the form it acted on is closed so BC rejects a re-run; false means a re-run may double-apply or nothing proved otherwise, so read the record back before retrying. Replay is time-limited: a completed entry is kept for BC_OPERATION_TTL (default 24h), after which the same operationId runs the call again; check with bc_get_operation before a late retry. A replayed result carries download metadata (fileName, contentType, sizeBytes, savedPath) but not the file bytes.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "changedSections": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "dialogsOpened": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "formId": {
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "formId"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "downloads": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "contentType": {
      +            "type": "string"
      +          },
      +          "fileName": {
      +            "type": "string"
      +          },
      +          "savedPath": {
      +            "type": "string"
      +          },
      +          "sizeBytes": {
      +            "type": "number"
      +          },
      +          "style": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "fileName",
      +          "contentType",
      +          "sizeBytes",
      +          "style"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "externalUris": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "style": {
      +            "type": "string"
      +          },
      +          "uri": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "uri",
      +          "style"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "openedPages": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "caption": {
      +            "type": "string"
      +          },
      +          "pageContextId": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "pageContextId",
      +          "caption"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "replaySafe": {
      +      "type": "boolean"
      +    },
      +    "requiresDialogResponse": {
      +      "type": "boolean"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "changedSections",
      +    "dialogsOpened",
      +    "requiresDialogResponse",
      +    "openedPages",
      +    "downloads",
      +    "externalUris",
      +    "replaySafe"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.5.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the coarse profile (destructive=true, idempotent=false); the description adds substantial behavior beyond that: the abort value's failure mode (INPUT_VALIDATION_ERROR and the dialog staying open), which response string matches which dialog intent, chained-dialog sequencing, changedSections inspection, and the operationId replay/OPERATION_IN_DOUBT semantics. This is far more than the annotations carry.

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?

Front-loaded with purpose and the mandatory trigger before any edge-case detail, and the example invocation is placed usefully. The trailing paragraph about downloads[]/externalUris[] is only loosely connected to responding to a dialog and could be trimmed, keeping it just short of a 5.

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?

An output schema exists, so return values need not be re-explained, yet the description still surfaces the two result fields an agent must act on (changedSections, a new dialogsOpened). For a destructive, multi-step, stateful tool this is complete enough to call correctly.

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 baseline is 3, but the description adds operational meaning the schema does not: the exact provenance of dialogFormId (dialogsOpened vs requestPage.formId), the anti-guessing rule, and the mapping of "ok" specifically to a report request page. It adds modest but real value over the enum descriptions already present.

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?

States a specific verb and resource (respond to an open Business Central dialog/confirmation prompt) and immediately names the sibling tools that produce the dialogs it consumes (bc_execute_action, bc_write_data, bc_run_report). An agent can distinguish it from bc_wizard_navigate or bc_close_page without opening a schema.

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?

Gives an explicit trigger condition (dialogsOpened with requiresDialogResponse: true, or requestPage from bc_run_report) and an explicit exclusion ("Do NOT call this without a preceding dialog"). It also covers the sequencing case of chained dialogs, so when-to-use is fully specified.

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