Dataverse Mcp Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATAVERSE_CLIENT_ID | Yes | Your app registration client ID | |
| DATAVERSE_TENANT_ID | Yes | Your Azure tenant ID | |
| DATAVERSE_ALLOW_DELETE | No | Optional flag to enable delete operations (set to 'true' to enable) | |
| DATAVERSE_RESOURCE_URL | Yes | Your Dataverse environment URL (e.g., https://your-org.crm.dynamics.com) | |
| DATAVERSE_CLIENT_SECRET | Yes | Your client secret | |
| DATAVERSE_ENTITY_PREFIX | No | Optional default prefix filter for list_entities | |
| DATAVERSE_SOLUTION_NAME | No | Optional default solution unique name for list_entities |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_entitiesA | List tables, read-only, as a JSON array of LogicalName, DisplayName, EntitySetName, Description and IsCustomEntity. The prefix and solution filters have server defaults (see each field); with no filter in effect, the list holds every table in the org and is very large. A solution that does not exist is an error. EntitySetName is the entity_set of the record tools; get_entity_metadata shows a table's columns. |
| get_entity_metadataA | Get attributes (columns) of a specific Dataverse table. Choice-style columns (Choice, Status, State, MultiSelect) carry an option_set summary with is_global and option_count, so one dump shows which choice lists are shared org-wide. Read the option values per column with get_picklist_options. A table that does not exist is an error. For the length and other limits of one column, use get_attribute_metadata. |
| get_picklist_optionsA | Read a Local or Global OptionSet as { option_set: { name, is_global, metadata_id }, options: [{ value, label }] }. Use is_global to tell whether a column holds a local copy of the values or is bound to a shared Global OptionSet — matching values alone do not prove a binding. Works for Choice, Status, State and MultiSelect columns; a column or option set that does not exist is an error. get_entity_metadata shows which columns of a table are choices. A Status column (statuscode) also returns the table's status transition matrix: enforce_state_transitions next to options, and on each option state (the statecode value it belongs to) and transitions (the status reason values a record may move to from it). transitions [] means no move from that status reason is allowed. When enforce_state_transitions is false the matrix does not apply, whatever transitions holds: null, or a list the option still stores. To get one record's allowed transitions, read its statuscode with get_record, then take that option's transitions. |
| list_entity_keysA | List alternate keys defined on a Dataverse table. Returns a flat array of { logical_name, schema_name, display_name, key_attributes, entity_key_index_status, metadata_id }. entity_key_index_status reflects the background index build (Pending → Active, or Failed) — alt keys are not usable for keyed-PATCH upserts until Active. |
| get_attribute_metadataA | Read the definition of one column, read-only, as the JSON Dataverse returns for its type (@odata.type), with every property of that type. Its limits come with it: MaxLength for String and Memo columns, the length a write is checked against (not DatabaseLength); MinValue and MaxValue for numbers, rounded to ±9223372036854776000 for BigInt; Precision, Format and the rest. Choice options are not included; read them with get_picklist_options, which also returns the status transitions of a Status column. A table or column that does not exist is an error. Use it before writing a value whose size the column may limit; get_entity_metadata lists all columns of a table. |
| query_recordsA | Read records from a table (entity set) with optional OData select, filter, orderby and expand, and either page_size or top; returns a JSON object {records, more, cursor}. Records come one page at a time, page_size rows or 5000 when neither page_size nor top is given: while more is true, call query_records again with the same entity_set and only the returned cursor to get the next page; the last page has more false and no cursor. For stable pages, end orderby with a unique column such as the table's id. top caps the whole result and cannot be continued: when exactly top records come back more is "unknown", so do not count or sum over such a result; to count, sum or group records, use aggregate_records, which Dataverse computes without reading them. With one level of expand, an expanded collection is not paged and brings up to 5000 related rows per record; bound it with $top inside expand. With an expand nested in another, only $select and $filter are allowed inside expand, and without top every expanded collection is cut to the page size; its rest cannot be read through cursor. An unknown entity set, a bad OData expression, a bad cursor or a filter with too many conditions across relationships is an error; for a long list of ids use Microsoft.Dynamics.CRM.In(...) instead of an or chain. To read one record by its id, use get_record. |
| get_recordA | Read one record by its GUID from a table (entity set), optionally only the select columns and the expand relations; returns the record as JSON. An id that is not a GUID is refused before the request; a record that does not exist is a 404 error from Dataverse. To find records by their values rather than by id, use query_records. |
| aggregate_recordsA | Count, sum, average, or take the minimum or maximum of records of one table (entity set), optionally grouped by columns and by parts of a date, computed by Dataverse; only reads. Use it instead of reading records with query_records to count or add them up. Returns { rows: [...] }: one row per group, holding every group's and aggregate's as, ordered by order. A value that is missing is null: a group of rows where the column is empty, or an aggregate over no non-null values (count gives 0). A group by a lookup, a choice or a yes/no column also has _label, the record's name or the choice's label (null for the empty group). A date grouping gives a part of the date as a number, not a period: month is 1 to 12, week the week of the year, quarter the quarter of the fiscal year, day the day of the month; so month, quarter and week are refused unless the same column is also grouped by year, and day unless by year and month. Weeks are counted from 1 January, so the week around the new year is split into two groups, the last week of one year and week 1 of the next; for whole weeks, filter by dates. year is the calendar year: with a fiscal year that does not start on a calendar quarter, one year and quarter group can hold the ends of two fiscal quarters, so group by year and month instead. The parts are in the time zone of the user the call runs as, the one that user sees in Dynamics. Only rows that user may read are counted. Dataverse computes totals over at most 50,000 rows: a query that matches more is an error, to be narrowed by the filter, for example to a date range. One page of groups comes back, 5000 (500 on an elastic table): a query with more groups is an error, to be narrowed by the filter or by coarser groups. A Money column is summed as stored, in each record's currency: over records in several currencies, aggregate its _base instead, in the base currency, or group by transactioncurrencyid. countcolumn does not work on a Money column; use count with a not-null filter on it. An unknown entity set or column is an error. |
| create_recordA | Create a record in a table (entity set) from column values keyed by logical name; get_entity_metadata lists the columns and their types. Returns the new record's URL, which ends in its id, not the record itself. An unknown table or column, or a value already taken under an alternate key, is an error. Every call creates a new record, so a retry after an error that may have reached Dataverse can create a duplicate. |
| update_recordA | Change the given columns of an existing record by its GUID; columns not in data keep their values. A record that does not exist is a 404 error: this tool never creates one (use create_record). Returns a confirmation text, not the record; read it back with get_record if needed. When a change of statuscode fails with 0x8004f00e ("does not have valid status code"), the table may forbid that transition: read the allowed ones in transitions of get_picklist_options on the statuscode column. |
| delete_recordA | Delete a record from a table. This tool is disabled on this server: a call fails with a message on how to enable it. Setting DATAVERSE_ALLOW_DELETE=true and restarting the server turns it on. |
| invoke_actionA | Invoke a Dataverse Web API action (POST) — bound or unbound. Use for operations that are not plain CRUD, e.g. PublishDuplicateRule (bound to a duplicaterule) or QualifyLead (bound to a lead), or UnpublishDuplicateRule (unbound, takes DuplicateRuleId). Whether an action is bound is defined in the Web API $metadata. Pass entity_set+id for bound actions, neither for unbound. parameters becomes the JSON request body. |
| invoke_functionA | Invoke a Dataverse Web API function (GET) — bound or unbound. Use for read-only operations exposed as functions, e.g. WhoAmI (unbound) or RetrieveDuplicates. Pass entity_set+id for bound functions, neither for unbound. parameters are inlined into the URL as OData function arguments. |
| list_record_documentsA | List the files in a record's SharePoint document folder, the ones its Documents tab shows, files in subfolders included; only reads. Returns { files: [{ name, path, file_type, size_bytes, modified_on, modified_by, url }], total }: at most 100 files, most recently modified first, where path is relative to the record's folder and url is the file's SharePoint address as Dataverse gives it; when the folder holds more files, a note says so, and total gives their number when Dataverse could count them all (up to 5000). A record without a document folder the caller can see gets a message saying so instead of a list. An unknown entity set, a table with document management off, a record that does not exist or that the caller may not read, and a missing one-time admin setup for reading SharePoint documents through the Dataverse API are errors. With a folder structure based on Account or Contact, the list for an account or contact also holds the files in the folders of its related records, and the caller's access to those records is not checked. It returns no file content: download_record_document, where it is enabled, gets a file by its path. To read the record itself, use get_record. |
| list_solutionsA | List the visible solutions with solutionid, uniquename, friendlyname, version and ismanaged; unmanaged only unless include_managed is true. Read-only. A uniquename is the solution filter of list_entities. |
| create_entityA | Create a custom table with its primary name column and, optionally, additional columns; add_attribute adds columns later and create_record adds records. Returns the new table's URL; a name that is taken is an error. If a column fails, the error says which columns were created and how to add the rest. The table lands in the Default Solution, not in yours, so list_entities filtered by your solution, by default or by its solution field, does not show it. |
| add_attributeA | Add one column to an existing table and return the new column's URL. A table that does not exist or a logical name that is taken is an error; get_entity_metadata shows both. To create a table together with its columns use create_entity, and to change a column later update_attribute. The column lands in the Default Solution; it is in your solution only if its table was added there with all its subcomponents, otherwise add it to the solution by hand. |
| create_relationshipA | Create a relationship between two tables. OneToMany adds a lookup column on related_entity that points to one primary_entity record; ManyToMany links records on both sides through an intersect table. Returns the relationship's URL; a schema_name that is taken is an error. This server has no tool to list or delete relationships. |
| update_attributeA | Update metadata of an existing column: display name, description, required level, max length, min/max value, precision. Dataverse fixes a column's type and logical name at creation — to change either, add_attribute a new column, migrate the values with update_record, then delete_attribute the old one. |
| delete_attributeA | Delete a column from a table. This tool is disabled on this server: a call fails with a message on how to enable it. Setting DATAVERSE_ALLOW_DELETE=true and restarting the server turns it on. |
| get_attribute_dependenciesA | List CRM components that reference a column — forms, views, workflows, business rules, plugins. Call this when delete_attribute fails with 0x8004f01f, or before any destructive change to a column. Component names are best-effort: resolved for common types, null otherwise. Backed by the Dataverse RetrieveDependenciesForDelete function. |
| add_entity_keyA | Create an alternate key on a Dataverse table (composite supported via key_attributes). Use for race-safe upserts via keyed-PATCH or to enforce a uniqueness constraint that the primary key doesn't cover. NOTE: Dataverse builds the supporting unique index asynchronously — the key is not usable for keyed lookups until its EntityKeyIndexStatus becomes 'Active'. Poll with list_entity_keys. |
| delete_entity_keyA | Delete an alternate key from a table. This tool is disabled on this server: a call fails with a message on how to enable it. Setting DATAVERSE_ALLOW_DELETE=true and restarting the server turns it on. |
| add_picklist_optionA | Add an option to an existing Local or Global OptionSet (Dataverse InsertOptionValue action). Requires Customizer or System Administrator role; HTTP 403 otherwise. |
| update_picklist_optionA | Update an existing option's label/description on a Local or Global OptionSet (Dataverse UpdateOptionValue action). Requires Customizer or System Administrator role. |
| delete_picklist_optionC | Remove an option from a Local or Global OptionSet. This tool is disabled on this server: a call fails with a message on how to enable it. Setting DATAVERSE_ALLOW_DELETE=true and restarting the server turns it on. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 26 tools
Each tool targets a clearly bounded resource+action: entity metadata (get_entity_metadata), one column's type details (get_attribute_metadata), and choice values (get_picklist_options) are separated explicitly in their descriptions, as are query_records vs get_record and aggregate_records vs query_records. The only mild overlaps are the three metadata readers and invoke_action vs invoke_function, but the descriptions draw sharp boundaries (POST vs GET, table vs column vs option set).
Every tool follows a strict snake_case verb_noun pattern (list_entities, get_record, create_record, update_attribute, delete_picklist_option, invoke_function), with consistent verb semantics across resources. No camelCase mixing, no vague verbs like 'process' or 'run'.
The 26 tools cover genuinely distinct sub-domains (data CRUD, table/column metadata, option sets, alternate keys, relationships, solutions, documents, and generic Web API invocation), so most earn their place. It is slightly heavy and inflated by four tools that are disabled by default (delete_record, delete_attribute, delete_entity_key, delete_picklist_option), but the breadth justifies the size.
Record and column lifecycles are largely covered, but there are real gaps: create_entity exists with no update/delete table tool, create_relationship exists with no list/delete relationship tool (the description even admits this), and list_record_documents references a download_record_document tool that is not in the surface. Destructive operations also exist only behind a disabled-by-default flag, which agents will hit as dead ends.