Skip to main content
Glama
EdwardHayes91

business-central-mcp

bc_close_page

Closes an open Business Central page to free server-side resources and prevent resource leaks. Requires a pageContextId; once closed, the ID becomes invalid.

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?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It transparently explains that the pageContextId becomes invalid after closing, that it is safe to call even after prior errors, and that it frees specific server-side resources (WebSocket form session). This is rich behavioral context beyond the schema.

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 well-structured and front-loaded with the primary purpose. Every sentence adds value: purpose, resource implications, requirement, invalidation warning, safety, and explicit don'ts. There is no fluff or redundancy.

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 a single-parameter tool with no output schema, the description is complete. It covers what the tool does, when to use it, what side effects occur, safety properties, and exclusions. No critical information is missing for an agent to invoke it 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?

The schema already provides 100% coverage for the single parameter pageContextId, so the baseline is 3. The description adds meaningful lifecycle semantics: 'Requires a pageContextId from bc_open_page. After closing, the pageContextId becomes invalid.' This helps the agent understand the parameter's provenance and post-conditions.

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 is a specific verb+resource combination, and it distinguishes the tool from its siblings (e.g., bc_open_page, bc_read_data) by focusing on the closing action and resource cleanup.

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 guidance is provided: 'Always call this when you are finished working with a page to prevent resource leaks' and '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.' This clearly states when and when not to use it, and even references an alternative for resetting.

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/EdwardHayes91/Business-Central-Mcp'

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