Microsoft Dynamics 365 MCP by usefulapi
v1.1.0Read tables and records, run FetchXML; create and update records in Microsoft Dynamics 365.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
dynamics365_whoami Who am I
Return the user id, business unit id and organization id that the app user acts as in this environment. Good first call to confirm the connection. Dataverse Web API: GET /api/data/v9.2/WhoAmI.
dynamics365_list_tables List tables
List Dataverse tables (entity definitions) with their logical name, entity set name and whether they are custom. Use the entity set name in the record tools. Dataverse Web API: GET /api/data/v9.2/EntityDefinitions.
| Parameter | Type | Description |
|---|---|---|
custom_only | boolean | Return only custom tables (default false). |
top | integer | Maximum tables (1-1000, default 200). |
dynamics365_get_table_columns Get table columns
List the columns (attributes) of one table: logical name, schema name, type, and whether it is the primary id or primary name. Dataverse Web API: GET /api/data/v9.2/EntityDefinitions(LogicalName='<table>')/Attributes.
| Parameter | Type | Description |
|---|---|---|
table * | string | Table logical name, e.g. account, contact, opportunity. |
dynamics365_list_records List records
List rows of one entity set with optional column selection, OData $filter, $orderby and $top. If the reply has @odata.nextLink, pass that value as next_link to get the next page (the other options are then ignored). Dataverse Web API: GET /api/data/v9.2/<entity_set>.
| Parameter | Type | Description |
|---|---|---|
entity_set * | string | Entity set name, e.g. accounts, contacts, opportunities. |
filter | string | OData $filter, e.g. statecode eq 0 and revenue gt 1000000. |
next_link | string | The @odata.nextLink value of an earlier reply from this environment. |
orderby | string | OData $orderby, e.g. createdon desc. |
select | string | Comma-separated column names to return, e.g. name,revenue. |
top | integer | Maximum rows (1-500). Use @odata.nextLink in the reply to page. |
dynamics365_get_record Get record
Return one record by id, with optional column selection. Dataverse Web API: GET /api/data/v9.2/<entity_set>(<id>).
| Parameter | Type | Description |
|---|---|---|
entity_set * | string | Entity set name, e.g. accounts, contacts, opportunities. |
id * | string | Record id (GUID). |
select | string | Comma-separated column names to return, e.g. name,revenue. |
dynamics365_run_fetchxml Run FetchXML query
Run a FetchXML query for complex joins, aggregates and link-entities. The root <entity name> is the table logical name. Keep the query under about 4000 characters. Dataverse Web API: GET /api/data/v9.2/<entity_set>?fetchXml=...
| Parameter | Type | Description |
|---|---|---|
entity_set * | string | Entity set name, e.g. accounts, contacts, opportunities. |
fetch_xml * | string | A complete <fetch> document. |
dynamics365_create_record Create record
Create one record in an entity set and return the created row. Writes data in the customer's environment. Dataverse Web API: POST /api/data/v9.2/<entity_set> with Prefer: return=representation.
| Parameter | Type | Description |
|---|---|---|
entity_set * | string | Entity set name, e.g. accounts, contacts, opportunities. |
fields * | object | Column values by logical name, e.g. {"name": "Contoso"}. Lookups use "<field>@odata.bind": "/accounts(<guid>)". |
dynamics365_update_record Update record
Update the given columns of one existing record. It never creates a record: the request sends If-Match: *, so an unknown id returns an error. Writes data in the customer's environment. Dataverse Web API: PATCH /api/data/v9.2/<entity_set>(<id>).
| Parameter | Type | Description |
|---|---|---|
entity_set * | string | Entity set name, e.g. accounts, contacts, opportunities. |
fields * | object | Column values by logical name, e.g. {"name": "Contoso"}. Lookups use "<field>@odata.bind": "/accounts(<guid>)". |
id * | string | Record id (GUID). |