Skip to main content
Glama
business-central-mcp

business-central-mcp

by SShadowS

bc_open_page

Read-only

Opens a Business Central page by numeric page ID, returning its full section state and a pageContextId for page-scoped reads, writes, actions, and navigation.

Instructions

Opens a Business Central page by its numeric page ID and returns its complete state as a list of sections. Each section has a sectionId, kind (header / lines / factbox / subpage / requestPage), caption, and the appropriate content shape. Card-shape sections (most headers, factboxes, requestPages) carry fields[] (and headers also carry actions[]). List-shape sections (lines, list-bodied headers, repeater subpages) carry rows[] (the rows BC loaded; page through more with bc_read_data range). The header section adapts to its page: it is card-shape on Card pages and list-shape on List pages -- the kind stays "header" either way for path stability. This is the entry point for interactive, page-scoped work -- it returns a pageContextId that the page-scoped tools (bc_read_data, bc_write_data, bc_execute_action, bc_navigate, bc_respond_dialog, bc_close_page, bc_lookup) take as input, plus a stateVersion you can pass as expectedStateVersion to bc_write_data / bc_execute_action to guard against stale state. (bc_query, bc_run_report, bc_search_pages, bc_list_companies, and bc_switch_company do NOT need a pageContextId.) For bulk, read-only data over standard entities, prefer bc_query -- it needs no open page. Use bc_search_pages first if you do not know the page ID for an entity.

Card pages (single-record views like Customer Card=21) return one header (card-shape) plus any FactBox sections attached to the page. List pages (Customer List=22) return a header (list-shape, rows[] populated). Document pages (Sales Order=42) return a header (card-shape), a "lines" list-shape section with the document lines, and any FactBoxes.

Option/enum fields and boolean fields in card-shape sections carry two extra properties: "options" (the allowed choices as [{text, value}]) and "selectedOption" (the currently chosen entry). Always use the "value" string from "options" as the SaveValue payload when writing an enum field -- do NOT guess or invent values. Example: Item Card "Type" field returns options=[{text:"Inventory",value:"0"},{text:"Service",value:"1"},{text:"Non-Inventory",value:"2"}] and selectedOption={text:"Inventory",value:"0"}.

Typical workflow: bc_open_page -> bc_read_data (refresh / filter / paginate a section) -> bc_write_data (edit fields in any section) -> bc_execute_action (post / release / delete) -> bc_close_page. Always call bc_close_page when done. Do NOT call this if the page is already open -- reuse the existing pageContextId. On BC Online the first call opens a local Microsoft sign-in window (password and Authenticator stay in that window; never pass them as tool arguments). Retry after completing sign-in.

Optional bookmark parameter opens a Card page to a specific record. Bookmarks come from list rows in any prior section.

Examples:

  • { "pageId": 22 } opens Customer List. Sections: [{ "sectionId": "header", "kind": "header", "rows": [...], "actions": [...] }] (no fields[] on a list-shape header).

  • { "pageId": 21, "bookmark": "..." } opens Customer Card. Sections include the header card plus FactBoxes (e.g. { "sectionId": "factbox:Customer Statistics", "kind": "factbox", "fields": [...] }).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pageId": "<pageId>"
    },
    "name": "bc_open_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYesNumeric BC page ID (e.g., 22 for Customer List, 21 for Customer Card). Use bc_search_pages to find IDs.
bookmarkNoOpen the page to a specific record. Bookmarks come from list row results in bc_open_page or bc_read_data.
tenantIdNoBC tenant ID. Defaults to the server-configured tenant. Only needed in multi-tenant deployments.

Output Schema

NameRequiredDescriptionDefault
captionYes
isModalYes
pageTypeYes
sectionsYes
stateVersionYes
pageContextIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv3.0.0
    • changedOutput schema / properties / sections / items / additionalProperties
      Previous value: -{}New value: +false
    • addedOutput schema / properties / sections / items / properties / actions
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "systemAction": {
      +        "type": "number"
      +      },
      +      "wizardNav": {
      +        "enum": [
      +          "back",
      +          "next",
      +          "finish",
      +          "cancel"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / properties / caption
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sections / items / properties / cues
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "groupCaption": {
      +        "type": "string"
      +      },
      +      "hasAction": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "synopsis": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "value",
      +      "hasAction"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / properties / fields
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "editable": {
      +        "type": "boolean"
      +      },
      +      "isLookup": {
      +        "type": "boolean"
      +      },
      +      "lookupCustom": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "options": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "text": {
      +              "type": "string"
      +            },
      +            "value": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "text",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "selectedOption": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "text": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "showMandatory": {
      +        "type": "boolean"
      +      },
      +      "tab": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "editable",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / properties / filters
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "column": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "column",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / properties / hasMore
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / sections / items / properties / kind
      Added value: +{
      +  "enum": [
      +    "header",
      +    "lines",
      +    "factbox",
      +    "subpage",
      +    "requestPage"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / sections / items / properties / newRowBookmark
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sections / items / properties / rows
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bookmark": {
      +        "type": "string"
      +      },
      +      "cells": {
      +        "additionalProperties": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "bookmark",
      +      "cells"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / properties / sectionId
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sections / items / properties / sort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "column": {
      +          "type": "string"
      +        },
      +        "direction": {
      +          "enum": [
      +            "asc",
      +            "desc"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "column",
      +        "direction"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / sections / items / properties / tabs
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sections / items / required
      Added value: +[
      +  "sectionId",
      +  "kind",
      +  "caption"
      +]
  2. Changed1 schema field changedv2.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "caption": {
      +      "type": "string"
      +    },
      +    "isModal": {
      +      "type": "boolean"
      +    },
      +    "pageContextId": {
      +      "type": "string"
      +    },
      +    "pageType": {
      +      "type": "string"
      +    },
      +    "sections": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "stateVersion": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "pageContextId",
      +    "pageType",
      +    "caption",
      +    "isModal",
      +    "sections",
      +    "stateVersion"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv1.7.0
    • removedInput schema / properties / pageId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / pageId / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  4. 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 declare readOnlyHint/openWorldHint; the description adds substantial behavior beyond that: a returned pageContextId shared by page-scoped tools, a stateVersion for stale-state guards, the BC Online sign-in window flow with 'never pass credentials as arguments', and the mandatory bc_close_page cleanup. It also distinguishes which siblings do not need a pageContextId. Not contradictory — the tool doesn't mutate data, so readOnlyHint holds.

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 the purpose and return shape, then workflow, then examples. Dense but nearly every paragraph carries operational information. It is on the long side, and some section-shape exposition overlaps with the output schema.

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?

Though an output schema exists, the description still explains section kinds, card- vs list-shape headers, and the options/selectedOption pattern with a concrete Item Card example — the kind of semantics a schema alone rarely conveys. Auth handling, cleanup, and lifecycle are all covered.

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 parameters are already documented. The description still adds value: it explains that bookmark targets Card pages and comes from list rows in prior sections, and gives worked examples ({pageId:22}, {pageId:21, bookmark:'...'}) that show what each parameter produces.

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 (opens a BC page by numeric page ID) plus exactly what it returns (a list of sections with kind/caption/content shape). It names the sibling entry alternatives (bc_query, bc_search_pages), so an agent can distinguish it 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?

Explicit when-to-use (entry point for interactive page-scoped work) and when-not (do NOT call if the page is already open; use bc_query for bulk read-only data; use bc_search_pages first if the ID is unknown). Names the concrete alternatives and the condition that selects each.

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