-
Notifications
You must be signed in to change notification settings - Fork 16
mcp_manage_command
PhuocLe edited this page Jun 20, 2026
·
3 revisions
| Field | Value |
|---|---|
| Tool name | manage_command |
| MCP title | Manage modern command bar buttons (appaction) — ONLY for explicitly modern/Power Fx requests |
| Category | advanced |
| Implementation | DynamicsCrm.DevKit.Cli/Mcp/Tools/ManageCommandTool.cs |
| Estimated token count | ~1087 tokens (tools/list tool JSON, o200k_base, measured 2026-06-18) |
| Last verified | 2026-06-18 |
Modern command bar buttons (appaction) for MDA + visibility/enable rules (appactionrule).
TOOL SELECTION: ONLY for 'modern', 'Power Fx', 'formula', 'appaction', 'new command bar', 'command designer'. NOT for 'button'/'ribbon'/'custom button'/'nút'/generic button → use manage_ribbon. When in doubt → manage_ribbon.
Actions:
- list: filter by entity/location/app/origin/action_type
- detail: command_id OR label → full + rules + children
- create: entity_name + location + label + (app_id OR app_name)
- update: command_id + ≥1 field
- hide: command_id OR (label+entity_name+location+app_name) — auto-overrides OOB
- show: command_id OR (label+entity_name+location) — deletes OOB hide override, or unhides custom command
- add_flyout (Dropdown Button): entity_name+location+label+(app_id|app_name)+items
- update_flyout: command_id
- add_flyout_item: flyout_command_id+label (works on Dropdown + Split)
- remove_flyout_item: command_id
- add_split_button (left=direct, arrow=dropdown): entity_name+location+label+(app_id|app_name)+items
- update_split_button: command_id
origin='default' excludes auto-migrated. Commands are app-scoped (same entity differs per app). CRITICAL: if error mentions 'classic ribbon button', STOP and report — don't call other tools.
WHEN TO USE:
- Add/update modern command bar buttons in MDA (Power Fx / appaction only)
- Hide/show OOB or custom commands in a specific app
- Inspect appactionrule visibility/enable rules (include_rules=true)
NAME RESOLUTION: entity_name, app_name, javascript_webresource, and icon_webresource resolve Display Name contains first, then logical/unique/schema contains.
Fuzzy on label (within entity_name + location + app): 0/multi → tool returns disambiguation list and stops; AI must ask user (re-call with command_id). 1 → auto-resolve.
Fuzzy on app_name (contains): 0/multi → ask user. 1 → auto.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action |
string |
Yes | - |
list/detail/create/update/hide/show/add_flyout/update_flyout/add_flyout_item/remove_flyout_item/add_split_button/update_split_button. |
command_id |
string |
No | "" |
appaction GUID. Required: detail/update. |
entity_name |
string |
No | "" |
Entity Display Name or logical name. Required: create. |
location |
string |
No | "" |
form/main_grid/sub_grid/associated_grid/quick_form/global_header/dashboard. Required: create. |
app_id |
string |
No | "" |
App module GUID. Required: create (or app_name). |
label |
string |
No | "" |
Button label. Required: create. |
onclick_type |
string |
No | "" |
none/javascript/formula. Default 'none'. |
javascript_webresource |
string |
No | "" |
WR name or GUID for onclick. |
javascript_function |
string |
No | "" |
Handler (e.g. 'Namespace.fn'). |
font_icon |
string |
No | "" |
Icon name (e.g. 'SalesPlaybook'). 'none' = clear. |
icon_webresource |
string |
No | "" |
Icon WR name/GUID. 'none' = clear. |
tooltip_title |
string |
No | "" |
- |
tooltip_description |
string |
No | "" |
- |
sequence |
integer |
No | 0 |
Order. Default 100 on create. |
hidden |
boolean |
No | false |
- |
app_name |
string |
No | "" |
MDA name contains. |
origin |
string |
No | "" |
default/migrated/enhanced_migrated/all. |
action_type |
string |
No | "" |
javascript/formula/none filter. |
name_filter |
string |
No | "" |
Command name contains. |
include_rules |
boolean |
No | false |
Add appactionrule records. |
include_children |
boolean |
No | false |
Dropdown/split items. |
max_records |
integer |
No | 50 |
1–500. |
items |
string |
No | "" |
JSON array of items for add_flyout/add_split_button: {label, onclick_type, javascript_webresource, javascript_function, sequence}. |
flyout_command_id |
string |
No | "" |
GUID of Dropdown or Split Button. Required: add_flyout_item. |
{
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "list/detail/create/update/hide/show/add_flyout/update_flyout/add_flyout_item/remove_flyout_item/add_split_button/update_split_button."
},
"command_id": {
"type": "string",
"description": "appaction GUID. Required: detail/update.",
"default": ""
},
"entity_name": {
"type": "string",
"description": "Entity Display Name or logical name. Required: create.",
"default": ""
},
"location": {
"type": "string",
"description": "form/main_grid/sub_grid/associated_grid/quick_form/global_header/dashboard. Required: create.",
"default": ""
},
"app_id": {
"type": "string",
"description": "App module GUID. Required: create (or app_name).",
"default": ""
},
"label": {
"type": "string",
"description": "Button label. Required: create.",
"default": ""
},
"onclick_type": {
"type": "string",
"description": "none/javascript/formula. Default 'none'.",
"default": ""
},
"javascript_webresource": {
"type": "string",
"description": "WR name or GUID for onclick.",
"default": ""
},
"javascript_function": {
"type": "string",
"description": "Handler (e.g. 'Namespace.fn').",
"default": ""
},
"font_icon": {
"type": "string",
"description": "Icon name (e.g. 'SalesPlaybook'). 'none' = clear.",
"default": ""
},
"icon_webresource": {
"type": "string",
"description": "Icon WR name/GUID. 'none' = clear.",
"default": ""
},
"tooltip_title": {
"type": "string",
"description": "",
"default": ""
},
"tooltip_description": {
"type": "string",
"description": "",
"default": ""
},
"sequence": {
"type": "integer",
"description": "Order. Default 100 on create.",
"default": 0
},
"hidden": {
"type": "boolean",
"description": "",
"default": false
},
"app_name": {
"type": "string",
"description": "MDA name contains.",
"default": ""
},
"origin": {
"type": "string",
"description": "default/migrated/enhanced_migrated/all.",
"default": ""
},
"action_type": {
"type": "string",
"description": "javascript/formula/none filter.",
"default": ""
},
"name_filter": {
"type": "string",
"description": "Command name contains.",
"default": ""
},
"include_rules": {
"type": "boolean",
"description": "Add appactionrule records.",
"default": false
},
"include_children": {
"type": "boolean",
"description": "Dropdown/split items.",
"default": false
},
"max_records": {
"type": "integer",
"description": "1–500.",
"default": 50
},
"items": {
"type": "string",
"description": "JSON array of items for add_flyout/add_split_button: {label, onclick_type, javascript_webresource, javascript_function, sequence}.",
"default": ""
},
"flyout_command_id": {
"type": "string",
"description": "GUID of Dropdown or Split Button. Required: add_flyout_item.",
"default": ""
}
},
"required": [
"action"
]
}This tool does not require any MCP resources.
- Add/update modern command bar buttons in MDA (Power Fx / appaction only)
- Hide/show OOB or custom commands in a specific app
- Inspect appactionrule visibility/enable rules (include_rules=true)
- TOOL SELECTION: ONLY for 'modern', 'Power Fx', 'formula', 'appaction', 'new command bar', 'command designer'. NOT for 'button'/'ribbon'/'custom button'/'nút'/generic button → use manage_ribbon. When in doubt → manage_ribbon.
- NAME RESOLUTION: entity_name, app_name, javascript_webresource, and icon_webresource resolve Display Name contains first, then logical/unique/schema contains.
{
"action": "string"
}Returns CallToolResult from the MCP server. The response content and structured fields follow the tool implementation and model returned by ManageCommandTool.manage_command.
- "List modern command bar commands for Account main grid in this app."
- "Create a JavaScript command button on the Contact form command bar."
- "Hide this out-of-box command in the specified model-driven app."