Skip to main content
Glama
business-central-mcp

business-central-mcp

by SShadowS

bc_data_find_tables

Read-only

Finds Business Central tables by keyword or meaning and returns their IDs and names, so you can identify the right table before querying data.

Instructions

Finds Business Central tables by name or by meaning and returns their table IDs and names. This is the first step of the data query workflow: bc_data_find_tables -> bc_data_get_table_schema (exact field names) -> bc_data_get_table_relations (join paths, when joining tables) -> bc_data_query (compile and run an AL query). Use searchMode "keyword" with comma-separated name fragments when you can guess the table name ("customer, ledger entry"), and "semantic" with a plain-language description when you cannot ("posted invoices that are still unpaid"); semantic search ranks the source tables of matching pages and returns a score. Semantic search relies on BC's Copilot metadata search and can come back empty where that is not set up (seen on an on-prem BC 29.1 container); fall back to "keyword" when it returns no tables.

When to use: before writing an AL query for bc_data_query, to discover the table behind a business concept, including tables from extensions and tables that have no API page. When NOT to use: to read records from a known Standard API entity (bc_query is simpler), or to find a page to open in the UI (use bc_search_pages). The data query tools run on BC's own MCP server (BC 29+) and need "Data Query Tools (Preview)" enabled in BC's MCP Server Configuration; otherwise they return BC_MCP_UNAVAILABLE. They need no web-client session and no open page.

Input Schema

NameRequiredDescriptionDefault
topNoMaximum number of tables to return (default 20, max 50).
companyNoCompany to run in (exact, case-sensitive name from bc_list_companies). Defaults to the current session company, then BC_ODATA_COMPANY, then the user's default company in BC.
searchModeYes"keyword" matches table names by substring; "semantic" searches page metadata by meaning and returns the source tables of the best-matching pages.
searchTextYesFor searchMode "keyword": one or more comma-separated table name fragments (e.g., "customer, ledger entry"). For "semantic": a natural-language description of the data you need (e.g., "unpaid invoices from vendors").

Output Schema

NameRequiredDescriptionDefault
tablesYes
companyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.7

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint by disclosing the runtime prerequisite ('Data Query Tools (Preview)' enabled, BC 29+), the concrete failure mode BC_MCP_UNAVAILABLE, the fact that no web-client session or open page is required, and that semantic search depends on Copilot metadata and can return empty on some deployments. That last point is an unusual and genuinely useful degradation behavior with a stated fallback.

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, then a chained workflow, mode guidance, and a clearly labeled when/when-not block — well structured and skimmable. It is dense and includes some detail (specific on-prem 29.1 container observation) that could be trimmed, but no sentence is pure filler.

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 4-parameter discovery tool with an output schema and read-only annotations, this covers the missing pieces: prerequisites, failure handling, mode selection, workflow position, and sibling alternatives. An agent has everything needed to call it and to recover from an empty semantic result.

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 description coverage is 100%, so baseline is 3; the description adds operational meaning by tying searchMode values to concrete usage patterns and giving contrasting example inputs ('customer, ledger entry' vs. 'posted invoices that are still unpaid'), plus explaining that semantic ranks source tables of matching pages and returns a score. It does not touch top or company, which is acceptable given the schema documents them.

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?

Opening sentence gives a specific verb (Finds) and resource (Business Central tables) plus the two search modes and the return payload (table IDs and names). It also explicitly distinguishes itself from bc_query and bc_search_pages, so an agent can route correctly without reading the 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?

Provides an explicit ordered workflow (find_tables -> get_table_schema -> get_table_relations -> bc_data_query), a rule for choosing searchMode by whether the table name is guessable, and a dedicated 'When to use' / 'When NOT to use' block naming the alternatives bc_query and bc_search_pages. Nothing about selection is left to inference.

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