-
Notifications
You must be signed in to change notification settings - Fork 16
mcp_manage_form
PhuocLe edited this page Jun 20, 2026
·
3 revisions
| Field | Value |
|---|---|
| Tool name | manage_form |
| MCP title | Manage entity forms |
| Category | standard |
| Implementation | DynamicsCrm.DevKit.Cli/Mcp/Tools/ManageFormTool.cs |
| Estimated token count | ~725 tokens (tools/list tool JSON, o200k_base, measured 2026-06-18) |
| Last verified | 2026-06-18 |
Form definitions for a Dataverse entity. Actions: list (optional form_type/include_formxml); detail (form_id or form_name); update (form_id+operations or form_id+formxml); rename (form_id+form_name); undo (form_id+backup path). Update flow: manage_form(update, operations=[...]) → auto-builds FormXML+backup+validate+import+publish. Operations support manage_tab, manage_section, manage_fields, manage_subgrid, manage_library, manage_event. Safety: auto-backup, XSD validate, backup failure blocks update. See schema://formxml + docs://instructions_for_formxml.
OPERATION JSON: when tool action='update', each item in operations needs action='manage_tab|manage_section|manage_fields|manage_subgrid|manage_library|manage_event' plus manage_action='add|update|rename|move|remove|delete' (availability depends on family). For JavaScript events use library_name, event_name, function_name, pass_execution_context. Example: [{"action":"manage_event","manage_action":"add","event_name":"onload","function_name":"Namespace.onLoad","library_name":"new_/js/account.js","pass_execution_context":true}].
WHEN TO USE:
- Inspect existing forms (list, detail) before editing
- Apply operations via action=update (recommended) or provide raw formxml (advanced)
- Rename a form, restore from backup (undo)
NAME RESOLUTION: entity_name and operation field references accept Display Name or logical/schema name. Display Name contains is resolved first, then logical/schema contains.
Fuzzy on form_name (contains): 0/multi → tool returns disambiguation list and stops; AI must ask user. 1 → auto-detail.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action |
string |
Yes | - |
'list', 'detail', 'update', 'rename', 'undo'. |
entity_name |
string |
Yes | - |
Entity Display Name or logical name (Display Name is resolved first; e.g. 'Account' or 'account'). |
form_id |
string |
No | "" |
GUID. Required: detail/update/rename/undo. |
form_name |
string |
No | "" |
Name contains. 1 match → auto-detail. Ignored if form_id set. |
form_type |
integer |
No | 0 |
2=Main, 5=Mobile, 6=QuickView, 7=QuickCreate. 0 = all. |
include_formxml |
boolean |
No | false |
List mode only. Detail always includes. |
formxml |
string |
No | "" |
update (advanced/undo): raw FormXML or backup file path (.formxml). Auto-detects. Use 'operations' for recommended flow. |
operations |
string |
No | "" |
update (recommended): JSON array. Example: [{"action":"manage_event","manage_action":"add","event_name":"onload","function_name":"Namespace.onLoad","library_name":"new_/js/account.js","pass_execution_context":true}]. Read docs://instructions_for_formxml. |
validate |
boolean |
No | true |
XSD validate before write. |
backup |
boolean |
No | true |
Backup before overwrite. Failure blocks update. |
{
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "'list', 'detail', 'update', 'rename', 'undo'."
},
"entity_name": {
"type": "string",
"description": "Entity Display Name or logical name (Display Name is resolved first; e.g. 'Account' or 'account')."
},
"form_id": {
"type": "string",
"description": "GUID. Required: detail/update/rename/undo.",
"default": ""
},
"form_name": {
"type": "string",
"description": "Name contains. 1 match → auto-detail. Ignored if form_id set.",
"default": ""
},
"form_type": {
"type": "integer",
"description": "2=Main, 5=Mobile, 6=QuickView, 7=QuickCreate. 0 = all.",
"default": 0
},
"include_formxml": {
"type": "boolean",
"description": "List mode only. Detail always includes.",
"default": false
},
"formxml": {
"type": "string",
"description": "update (advanced/undo): raw FormXML or backup file path (.formxml). Auto-detects. Use 'operations' for recommended flow.",
"default": ""
},
"operations": {
"type": "string",
"description": "update (recommended): JSON array. Example: [{\"action\":\"manage_event\",\"manage_action\":\"add\",\"event_name\":\"onload\",\"function_name\":\"Namespace.onLoad\",\"library_name\":\"new_/js/account.js\",\"pass_execution_context\":true}]. Read docs://instructions_for_formxml.",
"default": ""
},
"validate": {
"type": "boolean",
"description": "XSD validate before write.",
"default": true
},
"backup": {
"type": "boolean",
"description": "Backup before overwrite. Failure blocks update.",
"default": true
}
},
"required": [
"action",
"entity_name"
]
}| Resource | URI / URI template | MIME type | Reason |
|---|---|---|---|
formxml_instructions |
docs://instructions_for_formxml |
text/markdown |
Mentioned in MCP metadata: Rules and best practices for modifying Dataverse form XML definitions. Read this before making any changes to FormXML via manage_form. |
formxml_schema |
schema://formxml |
application/xml |
Mentioned in MCP metadata: Returns the XML schema defining the structure of Dataverse forms. FormType is the root element. Structure: form > tabs > tab > columns > column > sections > section > rows > row > cell > control. Read this schema before creating or modifying FormXML. |
- Inspect existing forms (list, detail) before editing
- Apply operations via action=update (recommended) or provide raw formxml (advanced)
- Rename a form, restore from backup (undo)
- NAME RESOLUTION: entity_name and operation field references accept Display Name or logical/schema name. Display Name contains is resolved first, then logical/schema contains.
{
"action": "string",
"entity_name": "string"
}Returns CallToolResult from the MCP server. The response content and structured fields follow the tool implementation and model returned by ManageFormTool.manage_form.
- "List Account main forms and identify which one should be updated."
- "Add this JavaScript library and onload handler to the Contact main form."
- "Add these fields to a new section on the Opportunity form with validation enabled."