Skip to main content
Glama
keithdev21

business-central-mcp

by keithdev21

bc_close_page

Close an open Business Central page to release server resources and prevent WebSocket session leaks. Call when finished with a page.

Instructions

Closes an open Business Central page and frees its server-side resources including the WebSocket form session. Always call this when you are finished working with a page to prevent resource leaks on the BC server. Requires a pageContextId from bc_open_page.

After closing, the pageContextId becomes invalid -- any subsequent bc_read_data, bc_write_data, bc_execute_action, or bc_navigate calls using it will fail. It is safe to call this even if prior operations on the page encountered errors. If you opened a drill-down page via bc_navigate (which returns a new pageContextId), close both the drill-down page and the original list page when done.

Do NOT call this in the middle of a multi-step workflow -- finish all reads, writes, and actions on the page first. Do NOT call this to "reset" a page; use bc_read_data to refresh data instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageContextIdYesPage context ID returned by bc_open_page. Becomes invalid after closing.
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses side effects: the pageContextId becomes invalid, subsequent calls will fail, it is safe after prior errors, and it frees server-side resources including the WebSocket session. This goes beyond basic existence to explain behavioral implications.

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 efficiently structured into three focused paragraphs: core action, invalidation and safety, and exclusions. Every sentence earns its place, providing critical operational details without unnecessary verbosity.

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?

Despite having no output schema, the description is complete for the tool's complexity. It covers lifecycle, error handling, multi-step workflow constraints, and even names sibling tools for context. An agent has sufficient information to invoke this tool correctly and understand its consequences.

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?

The schema already documents the single parameter with 100% coverage, including its origin and invalidation. The description reinforces this ('Requires a pageContextId from bc_open_page') but adds no new parameter-specific semantics beyond reinforcing the schema, so 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 clearly states the tool's function: 'Closes an open Business Central page and frees its server-side resources including the WebSocket form session.' This uses a specific verb (closes) and resource (Business Central page), and it distinguishes from sibling tools like bc_read_data or bc_execute_action by focusing on cleanup and resource management.

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?

Provides explicit guidance: 'Always call this when you are finished working with a page to prevent resource leaks,' along with clear exclusions such as 'Do NOT call this in the middle of a multi-step workflow' and 'Do NOT call this to reset a page; use bc_read_data to refresh data instead.' It also addresses closing drill-down pages, making usage unambiguous.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/keithdev21/Business-Central-Mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server