Skip to main content
Glama
business-central-mcp

business-central-mcp

by SShadowS

bc_api_list

Read-only

Reads records from any Business Central API List action with OData filter, select, orderby, top and skip, returning JSON rows, etags and paging flags for API pages or queries.

Instructions

Reads records through any Business Central API List action found with bc_api_search, with server-side OData filter, select, orderby, top and skip. Rows come back as JSON objects with the API's field names plus "@odata.etag" for API pages (pass that etag as "If-Match" when modifying the record with bc_api_invoke). totalCount is the number of matching records and hasMore says whether another page exists; top defaults to 10.

Use it for any API page or API query — standard, ISV or custom — including ones bc_query does not know (bc_query covers only the Standard API v2.0 entities). Check field names with bc_api_describe first; a filter on a non-filterable field is rejected. When NOT to use: for tables without an API (bc_data_query runs an AL query over any table), or to change data (bc_api_invoke). Read-only. Runs on BC's own MCP server (BC 29+, API tools enabled); needs no web-client session.

Input Schema

NameRequiredDescriptionDefault
topNoRows to return (default 10).
skipNoRows to skip, for paging with top.
filterNoOData filter, e.g. "city eq 'London'", "amount gt 1000 and open eq true", "contains(tolower(displayName),'contoso')". Operators: eq ne lt le gt ge and or; functions: contains startswith endswith tolower toupper. "or" only on the same field; no "not". Filterable fields are listed by bc_api_describe.
selectNoComma-separated fields to return, e.g. "number,displayName,balanceDue". Omit for all fields.
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.
orderbyNoOData orderby, e.g. "postingDate desc", "city, number". Not every API allows it: use it only when bc_api_describe lists "orderby" for the action.
actionNameYesA List_* action name from bc_api_search, e.g. "List_CustomerLedgerEntries_QRY30302".

Output Schema

NameRequiredDescriptionDefault
rowsYes
companyYes
hasMoreYes
rowCountYes
actionNameYes
totalCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.7

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses return shape (JSON objects with API field names plus "@odata.etag"), paging signals (totalCount, hasMore), the top default of 10, and a concrete downstream behavior — pass the etag as "If-Match" with bc_api_invoke. It also states the runtime prerequisite (BC 29+, API tools enabled, no web-client session) and a failure mode (filter on a non-filterable field is rejected). Its "Read-only" statement is consistent with the annotations rather than contradicting them.

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 what the tool does, then usage, then exclusions and environment — a logical order with dense, information-bearing sentences. Minor waste: "Read-only" repeats readOnlyHint, and "top defaults to 10" appears in both the prose and the schema; the three-paragraph block is longer than strictly necessary.

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 7-parameter read tool with an output schema, annotations and 100% schema coverage, the description supplies everything else an agent needs: prerequisites (BC 29+, API tools enabled), discovery workflow (bc_api_search then bc_api_describe), paging model, and the exact alternative for non-API tables or writes. Nothing required to invoke it correctly is missing.

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?

Schema description coverage is 100%, so every parameter including actionName, filter, select, orderby and company is already documented in the schema, and the description largely restates those constraints (top default 10, filterable fields from bc_api_describe). It adds marginal cross-tool meaning by tying a returned "@odata.etag" to the "If-Match" parameter of bc_api_invoke, but does not explain parameter interactions or pitfalls beyond the schema. Baseline 3 in line with the high-coverage rule.

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?

Opens with a specific verb and resource: "Reads records through any Business Central API List action found with bc_api_search," and immediately scopes it via server-side OData filter/select/orderby/top/skip. It distinguishes itself from bc_query (Standard API v2.0 only), bc_data_query (tables without an API) and bc_api_invoke (writes), so an agent can pick it without opening any 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?

Explicitly covers the positive case ("Use it for any API page or API query — standard, ISV or custom — including ones bc_query does not know") and the negative cases ("When NOT to use: for tables without an API (bc_data_query...), or to change data (bc_api_invoke)"). It also routes the agent to bc_api_search and bc_api_describe as prerequisites, leaving nothing to inference.

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