msx
v1.1.0MCP server for Microsoft Dynamics 365 / MSX CRM operations
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
crm_whoami
Validate CRM access and return the current user identity (UserId, fullName, email).
crm_query
Execute a read-only OData GET against an allowed Dynamics 365 entity set. Supports $filter, $select, $orderby, $top, $expand. Auto-paginates up to 500 records. Allowed entity sets: accounts, contacts, opportunities, msp_engagementmilestones, msp_dealteams, msp_workloads, msp_salesplaymappings, msp_accountplansalesplaybooks, msp_solutionplayextensions, competitors, msp_licensingprograms, tasks, systemusers, transactioncurrencies, connections, connectionroles, processstages, msp_mcemprocesses, EntityDefinitions, savedqueries, territories, opportunityproducts, msp_salesplaychecklists, teams.
| Parameter | Type | Description |
|---|---|---|
entitySet * | string | Entity set name, e.g. "opportunities", "accounts", "msp_engagementmilestones" |
expand | string | OData $expand expression |
filter | string | OData $filter expression |
orderby | string | OData $orderby expression |
select | string | Comma-separated field names for $select |
top | number | Maximum number of records to return |
crm_get_record
Retrieve a single Dynamics 365 record by entity set and GUID. Allowed entity sets: accounts, contacts, opportunities, msp_engagementmilestones, msp_dealteams, msp_workloads, msp_salesplaymappings, msp_accountplansalesplaybooks, msp_solutionplayextensions, competitors, msp_licensingprograms, tasks, systemusers, transactioncurrencies, connections, connectionroles, processstages, msp_mcemprocesses, EntityDefinitions, savedqueries, territories, opportunityproducts, msp_salesplaychecklists, teams.
| Parameter | Type | Description |
|---|---|---|
entitySet * | string | Entity set name, e.g. "opportunities", "accounts" |
id * | string | Record GUID |
select | string | Comma-separated field names for $select |
list_opportunities
List open opportunities for one or more account IDs or by customer name keyword. Returns opportunity name, dates, owner, solution play.
| Parameter | Type | Description |
|---|---|---|
accountIds | array | Array of Dynamics 365 account GUIDs |
customerKeyword | string | Customer name keyword — resolves matching accounts internally |
includeCompleted | boolean | Include opportunities past their estimated completion date (default: false) |
get_milestones
Get engagement milestones scoped by customer name, opportunity name/GUID, milestoneId, milestone number, or owner. Always requires a scoping parameter — never returns all milestones unscoped. Resolves customer/opportunity keywords to GUIDs internally — no need to call list_opportunities first. Supports batch opportunityIds, status/keyword filtering, task-presence filtering, and inline task embedding. When mine=true, only active milestones are returned by default (excludes Completed/Cancelled/Closed); pass statusFilter="all" to override. Use format="triage" for urgency-classified output (ov…
| Parameter | Type | Description |
|---|---|---|
capacityFilter | string | Filter by Azure region/capacity presence (Azure-workload milestones only — non-Azure milestones are excluded): has-region (has a real region, not None/empty), missing-region (Azure milestone with re… |
commentFilter | string | Filter by forecast comment presence/recency: none (no forecast comments), stale (has forecast comments but last modified >30 days ago), none-or-stale (either no comments or stale comments), any (no fi… |
commitmentFilter | string | Filter by commitment recommendation. Maps to CRM values: committed, uncommitted, best-case (best case), pipeline. Default: no filter (returns all). |
customerKeyword | string | Customer name keyword — resolves accounts → opportunities → milestones in one call |
dateRange | string | Fiscal period filter: Q1-Q4, H1-H2, FY, JUL-JUN (single month), current-Q, current-H, current-M, current-FY (relative to now), OR absolute: FY26 / FY27 (whole year) / FY27-Q1 / FY27-H2 / FY27-AUG. |
format | string | Response format: compact (default — table-friendly fields only, ~500 B/record), full / detail (raw OData record with all annotations), summary (grouped aggregates), or triage (urgency-classified). P… |
includeTasks | boolean | When true, embeds linked tasks inline on each milestone (avoids separate get_milestone_activities call). Default: false |
keyword | string | Case-insensitive keyword filter across milestone name, opportunity, and workload |
milestoneId | string | Direct milestone GUID lookup |
milestoneNumber | string | Milestone number to search for, e.g. "7-123456789" |
mine | boolean | When explicitly set to true, returns milestones owned by the authenticated CRM user. Automatically filters to active milestones (excludes Completed/Cancelled/Closed) unless statusFilter="all" is passe… |
opportunityId | string | Opportunity GUID to list milestones for |
opportunityIds | array | Array of opportunity GUIDs for batch milestone retrieval |
opportunityKeyword | string | Opportunity name keyword — resolves matching opportunities → milestones in one call |
ownerId | string | Owner system user GUID to list milestones for |
statusFilter | string | Filter by status: active = Not Started/On Track/Blocked/At Risk |
taskFilter | string | Filter milestones by task presence |
workloadFilter | string | Filter by workload TYPE (msp_milestoneworkload optionset): azure (Azure workload, code 861980000), d365 (D365 workload, code 861980001), security (Security workload, code 861980002), modern-work (Mode… |
get_team_accounts
Get accounts from the user's territory via the CRM 'My Team Accounts' system view. Uses the savedQuery parameter to execute the view as the current user.
| Parameter | Type | Description |
|---|---|---|
customerKeyword | string | Case-insensitive customer name filter |
get_my_active_opportunities
Returns your active "My Opps": the deterministic union of (1) active opportunities you OWN and (2) active opportunities where you own ≥1 ACTIVE milestone. Active = opportunity statecode 0 (open, not Won/Lost) with an estimated completion date in the recent/future window; milestone ownership requires an active milestone (excludes Completed/Cancelled/Closed/Lost/Hygiene). Does NOT include opportunities you are merely on the deal team for, nor territory-wide opportunities you neither own nor have a milestone on — use list_my_territory_opportunities / Territory View for those. Optionally filte…
| Parameter | Type | Description |
|---|---|---|
customerKeyword | string | Case-insensitive customer name filter |
dateRange | string | Fiscal period filter: Q1-Q4, H1-H2, FY, JUL-JUN (single month), current-Q, current-H, current-M, current-FY (relative to now), OR absolute: FY26 / FY27 (whole year) / FY27-Q1 / FY27-H2 / FY27-AUG. |
list_my_territory_opportunities
List ALL opportunities in your territory (via "My Team Accounts" saved view), regardless of owner. Useful for territory-wide views where you want to see opportunities you do NOT own. Supports filtering by opportunity type (billed/consumption/all), fiscal date range, and state (open/won/lost). Includes Owner column since results are multi-owner. Applies billed FY window filter to prevent cross-FY leakage.
| Parameter | Type | Description |
|---|---|---|
dateRange | string | Fiscal period filter: Q1-Q4, H1-H2, FY, JUL-JUN (single month), current-Q, current-H, current-M, current-FY (relative to now), OR absolute: FY26 / FY27 (whole year) / FY27-Q1 / FY27-H2 / FY27-AUG. For… |
oppType | string | Opportunity type filter: billed (606820000), consumption (606820001), or all (default) |
status | string | Opportunity state filter (default: open) |
pipeline_health
Run a full MCEM pipeline health check. Analyzes the UNION of (1) all milestones on opportunities you own and (2) all milestones where you are the owner — deduplicated. Checks: overdue milestones (UC1), active opps with no active milestones (UC4, shows last completed milestone), milestones expiring within 14 days (UC7), your opps in non-CSU MCEM stages (UC8), committed Production milestones on your opps owned by a non-CSU member (UC9a — flags only genuine STU→CSU handoff misses, not valid CSA/CSAM collaboration), POC/Pilot milestones wrongly owned by you instead of SE/STU (UC9b), and Bloc…
handoff_check
Evaluates all active opportunities and their milestones against the MCEM 8-scenario ownership matrix (stage × commitment status → expected role group) to detect MCEM handoff violations. Specifically catches: ATU→STU handoffs not completed (Stage 2–3 milestones still owned by ATU instead of STU/SSP), STU→CSU handoffs not completed (committed milestones owned by STU or ATU instead of CSU/CSAM/CSA), CSU ownership of uncommitted milestones in Stages 1–3 (cross-org contamination), and Stage 4–5 milestones not owned by CSU. Returns violations grouped by severity (high = missed committed…
stage_map
Groups all active opportunities by MCEM stage (1 = Listen & Consult, 2 = Inspire & Design, 3 = Empower & Achieve, 4 = Realize Value, 5 = Manage & Optimize). For each stage, returns the list of opportunities with: owner name, role group (ATU/STU/CSU), committed milestone count, uncommitted milestone count, total milestone count, and an ownershipAlert flag when the opportunity owner's role group does not match the expected group for that stage (ATU for Stage 1, STU for Stages 2–3, CSU for Stages 4–5). Also flags stages with zero opportunity coverage. Use this tool when the user asks for: a p…
mcem_stage_lookup_search
Search whitelisted MCEM stage blocker lookup options. Only supports known blocker lookups such as Customer Decision Maker and Primary Competitor; returns human-readable labels plus selected ids/bind paths.
| Parameter | Type | Description |
|---|---|---|
field * | string | Whitelisted lookup blocker field to search |
accountId | string | Optional account GUID context for contact lookup |
entitySet | string | Expected entity set from the preflight lookup contract |
limit | number | Maximum options to return, capped at 50 |
opportunityId | string | Opportunity GUID for account-scoped lookup context |
q | string | Alias for term from typeahead controls |
skip | number | Optional offset for simple single-source pagination |
term | string | Search text typed by the user |
crm_creation_lookup_search
Search whitelisted Dataverse lookup values for create-opportunity and create-milestone modals, plus return the dynamic Solution Area -> Sales Play map.
| Parameter | Type | Description |
|---|---|---|
entity * | string | Lookup entity or special mapping mode |
accountId | string | Optional account GUID context |
context | object | Optional context: accountId/opportunityId/solutionArea |
limit | number | Maximum options to return, capped at 50 |
opportunityId | string | Optional opportunity GUID context |
q | string | Alias for term from typeahead controls |
skip | number | Offset for paging |
term | string | Search text typed by the user |
delete_opportunity
Rollback a recently-created opportunity when the mandatory first-milestone flow is cancelled. It does not hard-delete; it closes/cancels the opportunity as Lost because normal users lack delete privilege. Safety checks: current user owns it, it was created recently, and it has no active milestones.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID to cancel/close |
create_opportunity_preflight
Validate a create-opportunity modal payload without writing CRM. Returns blockers, duplicate candidates, normalized payload preview, and ATU owner-disclaimer flags.
| Parameter | Type | Description |
|---|---|---|
account | ||
accountId | ||
allowDuplicate | boolean | |
currency | ||
currencyId | ||
description | string | |
estimatedCompletionDate | string | |
estimatedStartDate | string | |
name | string | |
opportunityType | ||
owner | ||
ownerId | ||
ownerMode | string | |
parentAccountId | ||
plays | array | Ordered list of selected plays (primary first). Backend resolves playId + globalSolutionArea from the unscoped map at preflight time. |
salesPlay | string | number | Deprecated — use plays array. Kept for backward compatibility. |
solutionArea | string | number | Deprecated — use plays array. Kept for backward compatibility. |
title | string | |
transactionCurrencyId |
create_opportunity
Stage a multi-step opportunity create for modal-approved execution. Re-runs preflight, stages create + owner/date patch + checklist rows, and execute_operation performs the writes.
| Parameter | Type | Description |
|---|---|---|
account | ||
accountId | ||
allowDuplicate | boolean | |
currency | ||
currencyId | ||
description | string | |
estimatedCompletionDate | string | |
estimatedStartDate | string | |
name | string | |
opportunityType | ||
owner | ||
ownerId | ||
ownerMode | string | |
parentAccountId | ||
plays | array | Ordered list of selected plays (primary first). Backend resolves playId + globalSolutionArea from the unscoped map at preflight time. |
salesPlay | string | number | Deprecated — use plays array. Kept for backward compatibility. |
solutionArea | string | number | Deprecated — use plays array. Kept for backward compatibility. |
title | string | |
transactionCurrencyId |
create_milestone_preflight
Validate a create-milestone modal payload without writing CRM. Returns blockers, duplicate candidates, parent opportunity date patch preview, and normalized payload preview.
| Parameter | Type | Description |
|---|---|---|
allowDuplicate | boolean | |
azureCapacityType | string | |
commitmentRecommendation | number | string | |
currency | ||
currencyId | ||
customerCommitment | number | string | |
deliveredBy | number | string | |
forecastComments | string | |
milestoneCategory | number | |
milestoneComments | string | |
milestoneDate | string | |
milestoneStatus | number | string | |
milestoneStatusReason | number | string | |
monthlyUse | number | |
name | string | |
opportunityEstimatedCompletionDate | string | |
opportunityEstimatedStartDate | string | |
opportunityId | string | |
owner | ||
ownerId | ||
ownerMode | string | |
parentOperationId | string | Batch Mode: the OP-N of a create_opportunity staged in this batch, instead of opportunityId. |
preferredAzureRegion | number | string | |
transactionCurrencyId | ||
workload | ||
workloadId | ||
workloadType | number |
get_opportunity_owner_roles
Return the opportunity owner + msp_rolegroup (ATU/STU/CSU) and the list of open milestones with their owner + msp_rolegroup. Used by the Update Stage flow to validate that owners are in the expected role for the target MCEM stage. Open milestone = statecode=0 and msp_milestonestatus not in {Completed, Cancelled, Closed as Incomplete}.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
mcem_stage_preflight
Preflight for MCEM opportunity stage movement. Takes an opportunity ID and target MCEM stage, reads current BPF state, plans forward or backward movement, and returns only real user-actionable blockers. Optional fieldValues saves blocker fields and reruns preflight, but never stages or executes stage movement. BPF checklist fields are forward-move auto-fill internals and are never surfaced.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
targetStage * | string | number | Target MCEM stage number/name, e.g. 4 or "Realize Value" |
fieldValues | object | Optional blocker field values to save before rechecking. Does not stage or execute movement. |
update_opportunity_stage
Stage a write-safe MCEM opportunity stage transition for approval. Uses BPF movement through the MCEM process instance, supports forward and backward target stages, and silently auto-fills BPF checklist fields to Yes only for forward movement. Does not patch msp_activesalesstage as the movement mechanism and never auto-creates milestones.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
targetStage * | string | number | Target MCEM stage number/name, e.g. 4 or "Realize Value" |
fieldValues | object | Optional values for real non-BPF blockers, e.g. msp_solutionarea, msp_salesplay, description, parentcontactid@odata.bind, msp_PrimaryCompetitor@odata.bind, msp_competethreatlevel. |
reassign_opportunity
Reassign an opportunity to a new owner. The change is staged for user approval before execution.
| Parameter | Type | Description |
|---|---|---|
newOwnerId * | string | System user GUID of the new owner |
opportunityId * | string | Opportunity GUID to reassign |
change_owner
Change owner for an existing opportunity or engagement milestone. Stages a PATCH ownerid@odata.bind and execute_operation applies it.
| Parameter | Type | Description |
|---|---|---|
entityType * | string | Record type to reassign |
newOwnerId * | string | System user GUID for the new owner |
recordId * | string | Opportunity or milestone GUID |
close_opportunity
Close/deactivate an opportunity. Supports closing as Won or Lost. The change is staged for user approval before execution. If the standard status code fails (e.g. MCAPS custom codes), the tool auto-discovers valid codes from CRM metadata on retry.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID to close |
status * | string | Close as "won" or "lost" |
description | string | Optional close description/reason |
statusCode | number | Optional explicit status code override. If omitted, tries standard codes (3=Won, 4=Lost) with auto-discovery fallback. |
close_msx_opportunity
Close an MSX/MCAPS opportunity with all required custom fields (msp_engagementstatus, close date, comments, etc.). Handles Consumption and/or Billed opportunity types, applies the correct MSX status codes, and optionally completes open milestones. More complete than close_opportunity — use this for MSX-managed opportunities. Consumption close reasons: completed (Won), cancelled_customer, cancelled_delayed, hygiene, lost, consolidated. Only "completed" → Won (opportunitystatecode=1) is empirically confirmed; others → Lost (inferred). The change is staged for user approval before execution…
| Parameter | Type | Description |
|---|---|---|
closeReason * | string | Consumption close reason (sets msp_engagementstatusreason). "completed" — Won (statecode=1, statuscode=861980021, confirmed). "cancelled_customer" — Cancelled by Customer (861820000, Lost, inferre… |
opportunityId * | string | Opportunity GUID to close |
closeDate | string | Actual close date (YYYY-MM-DD). Defaults to today. |
comments | string | Closing comments written to msp_engagementclosingcomments / msp_billedclosingcomments. |
completeOpenMilestones | boolean | Complete (set msp_milestonestatus=861980003) all open milestones for Consumption opportunities. Defaults to false. Mirrors the "Mark all open milestones as Completed" checkbox in the Close Consumption… |
reactivate_msx_opportunity
Reactivate a closed MSX/MCAPS opportunity. Performs a single PATCH to restore statecode=0/Active and clear MSX close fields. Empirically confirmed from real network capture — no SetState action needed in this MCAPS environment. The change is staged for user approval before execution.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID to reactivate |
update_opportunity
Update fields on an opportunity. Supports estimated close date, description, estimated revenue, and forecast comments. Changes are staged for user approval. Stage changes are rejected here; use update_opportunity_stage for MCEM BPF movement.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
commentAuthorGuid | string | Dataverse UserId GUID of the comment author. Stored as-is in msp_forecastcommentsjsonfield to match native CRM format. |
commentAuthorName | string | Full display name of the person writing the comment. Used for initials in the plain-text journal. When provided alongside forecastComments, appends to history instead of overwriting. |
description | string | Opportunity description/notes |
estimatedCloseDate | string | New estimated close date in YYYY-MM-DD format |
estimatedCompletionDate | string | New estimated completion date (msp_estcompletiondate) in YYYY-MM-DD format |
estimatedRevenue | number | Revenue estimate (estimatedvalue) |
forecastComments | string | Forecast comments text |
stage | string | Deprecated. Direct msp_activesalesstage writes are rejected; use update_opportunity_stage. |
create_milestone
Stage a multi-step engagement milestone create linked to an opportunity. Requires runtime CRM fields such as status reason and milestone comments; execute_operation performs parent opportunity date patch, create, owner patch, and verification. In Batch Mode a milestone for an opportunity staged in the same batch passes parentOperationId instead of opportunityId: it waits for that create and runs right after it.
| Parameter | Type | Description |
|---|---|---|
azureCapacityType * | string | Required. Azure Capacity Type (MultiSelectPicklist — comma-separated codes). |
deliveredBy * | number | string | Required for milestone view. Delivered By: 606820000=Customer, 606820001=Partner, 606820002=ISD, 606820003=Microsoft Support. |
milestoneCategory * | number | Required. Milestone category: 861980000=POC/Pilot, 861980002=Production, 861980003=Deal Registration, 861980004=Dual Credit, 861980005=Other Adjustments, 861980006=Partner Reported ACR, 861980007=Cred… |
milestoneComments * | string | Required by CRM runtime. Risk/blocker/details text. |
milestoneDate * | string | Required. Milestone date in YYYY-MM-DD format |
milestoneStatus * | number | string | Required. Milestone status code/name from live metadata. |
monthlyUse * | number | Required. Monthly use value |
name * | string | Milestone name/title |
preferredAzureRegion * | number | string | Required for milestone view. Preferred Azure Region. |
allowDuplicate | boolean | Allow create even when duplicate candidates are found |
commitmentRecommendation | number | string | Alias for customerCommitment. Customer Commitment: 861980000=Uncommitted, 861980003=Committed |
currencyId | Transaction currency GUID semantic alias | |
customerCommitment | number | string | Required semantic field. Customer Commitment: 861980000=Uncommitted, 861980003=Committed |
forecastComments | string | Forecast comments text |
helpNeeded | number | string | Help needed reason (name or code). For quota/capacity blockers use Azure Capacity=861980001. |
milestoneStatusReason | number | string | Milestone status reason code/name. Required by backend validation only when milestoneStatus is Blocked and no capacity blocker default applies. |
opportunityEstimatedCompletionDate | string | Optional parent opportunity est. completion date; defaults to milestoneDate when parent is missing it. |
opportunityEstimatedStartDate | string | Optional parent opportunity est. start date; defaults to milestoneDate when parent is missing it. |
opportunityId | string | Opportunity GUID to link the milestone to. Required unless parentOperationId is set. |
ownerId | System user GUID/lookup object to assign as owner. Defaults to current CRM behavior if omitted. | |
ownerMode | string | Owner mode. Use other with ownerId to assign a selected user. |
parentOperationId | string | Batch Mode only: the OP-N id of a create_opportunity staged in this batch. The milestone links to the opportunity it creates and runs right after it. Use instead of opportunityId. |
transactionCurrencyId | Transaction currency GUID/lookup object | |
workloadId | Required. Workload GUID or lookup object | |
workloadType | number | Optional. Backend derives Workload Type from selected workload when omitted. Values: 861980000=Azure, 861980001=Dynamics 365, 861980002=Security, 861980003=Modern Work. |
create_task
Create a task linked to an engagement milestone. Optionally specify category, subject, due date, and owner.
| Parameter | Type | Description |
|---|---|---|
milestoneId * | string | Engagement milestone GUID to link the task to |
subject * | string | Task subject/title |
category | number | Task category code. Valid values: 606820005 (Technical Close/Win Plan), 861980004 (Architecture Design Session), 861980006 (Blocker Escalation), 861980008 (Briefing), 861980007 (Consumption Plan), 861… |
description | string | Task description |
dueDate | string | Due date in YYYY-MM-DD format |
ownerId | string | System user GUID to assign as owner |
update_task
Update fields on an existing task (subject, due date, description, status).
| Parameter | Type | Description |
|---|---|---|
taskId * | string | Task GUID |
description | string | New description |
dueDate | string | New due date YYYY-MM-DD |
statusCode | number | New status code |
subject | string | New subject |
close_task
Close a task using the CloseTask action (with fallback to bound Close endpoint).
| Parameter | Type | Description |
|---|---|---|
statusCode * | number | Status code for the closure (e.g. 5 = Completed, 6 = Cancelled) |
taskId * | string | Task GUID |
subject | string | Close subject (defaults to "Task Closed") |
update_milestone
Update fields on an engagement milestone. Only fields you provide will be changed — all other fields are preserved. Supports name, date, monthly use, status, status reason, help needed, category, commitment, workload, owner, currency, comments, milestone comments, workload type, delivered by, preferred Azure region, and Azure capacity type.
| Parameter | Type | Description |
|---|---|---|
milestoneId * | string | Engagement milestone GUID |
azureCapacityType | string | Azure Capacity Type (MultiSelectPicklist — comma-separated codes). Common: 861980000=None, 861980037=Av2/Dv2/Dv3/Ev3/Dsv3/Esv3 (Intel) (Cores), 861980065=Azure SQL Database (Cores or DTUs), 86198008… |
commentAuthorGuid | string | Dataverse UserId GUID of the person writing the comment. Stored as userId in msp_forecastcommentsjsonfield to match native CRM format. If omitted, resolved via WhoAmI or falls back to authorName. |
commentAuthorName | string | Full display name of the person writing the comment (e.g. 'Joaquin Perez del Real'). Used to build forecast comment initials. If omitted, resolved via WhoAmI. |
commitmentRecommendation | number | string | Commitment recommendation: 861980000=Uncommitted, 861980003=Committed |
deliveredBy | number | string | Delivered By: 606820000=Customer, 606820001=Partner, 606820002=ISD, 606820003=Microsoft Support |
forecastComments | string | Forecast comments text |
helpNeeded | number | string | Help needed reason (name or code). For quota/capacity blockers use Azure Capacity=861980001. |
milestoneCategory | number | Milestone category: 861980000=POC/Pilot, 861980002=Production, 861980003=Deal Registration, 861980004=Dual Credit, 861980005=Other Adjustments, 861980006=Partner Reported ACR, 861980007=Credit Offer,… |
milestoneComments | string | Milestone comments text. CRM requires this when status is Blocked or At Risk (a business rule enforces it server-side). Pass user-provided context describing why the milestone is blocked/at-risk. |
milestoneDate | string | New milestone date YYYY-MM-DD |
milestoneStatus | number | string | Milestone status (name or code): On Track=861980000, At Risk=861980001, Blocked=861980002, Completed=861980003, Cancelled=861980004, Lost to Competitor=861980005, Hygiene/Duplicate=861980006, Closed a… |
milestoneStatusReason | number | string | Milestone status reason (name or code), required by CRM when status is Blocked. For quota/capacity blockers use Capacity/Service Availability=861980009. |
monthlyUse | number | New monthly use value (msp_monthlyuse) — the CONSUMPTION quantity, in currency. Use `seats` instead for usage milestones (Modern Work, D365, Power Platform, ABS, Intent), whose quantity lives in a d… |
name | string | New milestone name/title (cannot be empty) |
ownerId | string | New owner system user GUID |
preferredAzureRegion | number | string | Preferred Azure Region. Common: 861980005=East US - Blue Ridge, 861980006=East US 2 - Boydton, 861980018=Central US - Des Moines, 861980040=West US 2 - Quincy, 861980036=West US 3 - Phoenix, 861980001… |
seats | number | New seats value (msp_noofactivations) — the USAGE quantity, in users/devices. This is the field the UI shows as "N seats"; writing monthlyUse on a usage milestone updates a field nobody is looking a… |
skipOwnershipCheck | boolean | Skip client-side ownership verification. CRM API still enforces permissions. |
transactionCurrencyId | string | New transaction currency GUID |
workloadId | string | New workload GUID (use null to clear) |
workloadType | number | Workload Type: 861980000=Azure, 861980001=Dynamics 365, 861980002=Security, 861980003=Modern Work |
list_accounts_by_tpid
Find accounts by MS Top Parent ID (TPID). Returns account GUIDs and names.
| Parameter | Type | Description |
|---|---|---|
tpids * | array | Array of TPID values (numeric strings) |
get_milestone_field_options
Retrieve available picklist options for milestone fields from Dynamics 365 metadata. Use before create_milestone to discover valid values for required fields.
| Parameter | Type | Description |
|---|---|---|
field * | string | Which milestone picklist field to retrieve options for |
get_task_status_options
Retrieve available task status/statuscode options from Dynamics 365 metadata.
get_milestone_activities
List tasks/activities linked to one or more engagement milestones. Supports batch retrieval via milestoneIds array.
| Parameter | Type | Description |
|---|---|---|
milestoneId | string | Single engagement milestone GUID |
milestoneIds | array | Array of milestone GUIDs for batch retrieval |
find_milestones_needing_tasks
Composite tool: resolves customer keywords → accounts → opportunities → milestones, then identifies milestones without linked tasks.
| Parameter | Type | Description |
|---|---|---|
customerKeywords * | array | Array of customer name keywords to search |
statusFilter | string | Milestone status filter (default: active) |
view_milestone_timeline
Return timeline-friendly milestone events for a user or opportunity, with render hints for Copilot UI.
| Parameter | Type | Description |
|---|---|---|
fromDate | string | Start date (YYYY-MM-DD) |
opportunityId | string | Opportunity GUID to filter milestones |
ownerId | string | System user GUID to filter milestone owner |
toDate | string | End date (YYYY-MM-DD) |
view_opportunity_cost_trend
Return monthly cost/consumption trend points for an opportunity with chart/table render hints.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
includeMilestones | boolean | Include milestone monthly-use points (default true) |
view_staged_changes_diff
Build a render-friendly before/after diff table from staged write payloads.
| Parameter | Type | Description |
|---|---|---|
after * | object | Proposed values object (after) |
before * | object | Current values object (before) |
context | string | Optional context label (e.g. operation ID) |
list_pending_operations
List all staged CRM write operations awaiting human approval. Includes both pending and stale-conflict ops.
execute_operation
Approve and execute a single staged CRM write operation by ID. Executing a staged opportunity create also runs the milestones staged with it (create_milestone parentOperationId), right after it.
| Parameter | Type | Description |
|---|---|---|
id * | string | Operation ID (e.g. "OP-1") |
override | boolean | Force override stale-conflict by re-reading current record and applying with fresh etag |
execute_all
Approve and execute ALL pending staged operations in sequence. Milestones staged with a new opportunity (create_milestone parentOperationId) run right after it; if it is not created they are skipped and stay queued.
cancel_operation
Cancel/reject a single staged operation by ID. No CRM changes are made. Cancelling a staged opportunity create also cancels the milestones staged with it.
| Parameter | Type | Description |
|---|---|---|
id * | string | Operation ID (e.g. "OP-1") |
cancel_all
Cancel/reject ALL pending staged operations. No CRM changes are made.
list_failed_operations
List all CRM write operations that failed after exhausting retries (dead-letter queue).
retry_failed_operation
Move a failed operation from the dead-letter queue back to pending for retry.
| Parameter | Type | Description |
|---|---|---|
operationId * | string | Operation ID (e.g. "OP-1") |
crm_auth_status
Check authentication status — shows current user, expiry, CRM URL.
read_skill
Read MCEM domain knowledge. Available skills: mcem-pipeline-azure (Azure consumption pipeline), mcem-pipeline-usage (Usage/M365/BizApps pipeline), mcem-framework (MCEM stages and orchestration), mcaps-glossary (MCAPS terminology), msxiq-data-catalog (what data MSX-IQ can access). Use this when you need detailed pipeline rules, ownership logic, or MCEM methodology beyond the basics in the system prompt.
| Parameter | Type | Description |
|---|---|---|
skill_name * | string | Skill directory name: mcem-pipeline-azure, mcem-pipeline-usage, mcem-framework, mcaps-glossary, or msxiq-data-catalog |
list_territory_accounts
List all accounts in an MSX territory or by geography attributes. Scope by ATU Group, Sales Unit, Sales Group, Area, Territory Code (territoryid.name), Country (with tolerant matching), or Segment. At least one filter is required. Use specific ATU Group names (e.g. "USA - Healthcare - Provider Major") or Territory Code (e.g. "SE.ES.EC.OCI.01.MG.02") for narrow results, or broader Sales Group / Area / Country / Segment for wider scope.
| Parameter | Type | Description |
|---|---|---|
area | string | Geography area name. Valid values: United States, Canada, Latam, UK & Ireland, North Europe, South Europe, Germany & Austria, France, Netherlands, Switzerland, EMEA HQ, MEA, India, Japan, Korea, Great… |
atuGroup | string | ATU Group name (e.g. "USA - Healthcare - Provider Major"). Partial match. |
country | string | Country name or code (e.g. "Spain", "España", "ES"). Tolerant matching with common aliases. |
limit | number | Maximum number of accounts to return (default 100) |
salesGroup | string | Sales Group name (e.g. "USA - Health & FinServ"). Partial match. |
salesUnit | string | Sales Unit name (e.g. "USA - Healthcare"). Partial match. |
segment | string | Customer segment label (e.g. "Upper Majors Commercial"). Case-insensitive match on segment FormattedValue. |
territoryCode | string | Territory code (e.g. "SE.ES.EC.OCI.01.MG.02"). Exact match on territoryid.name field. |
list_territory_opportunities
List opportunities across an MSX territory or by geography attributes. Scope by ATU Group, Sales Unit, Sales Group, Area, Territory Code, Country, or Segment. At least one filter is required. Opportunities are aggregated across all matching accounts. Each returned record carries `@odata.etag`, an opaque version token for concurrency control. Pass it as `expectedEtag` to subsequent update tools; do not display it to users.
| Parameter | Type | Description |
|---|---|---|
area | string | Geography area name. Valid values: United States, Canada, Latam, UK & Ireland, North Europe, South Europe, Germany & Austria, France, Netherlands, Switzerland, EMEA HQ, MEA, India, Japan, Korea, Great… |
atuGroup | string | ATU Group name (e.g. "USA - Healthcare - Provider Major"). Partial match. |
country | string | Country name or code (e.g. "Spain", "España", "ES"). Tolerant matching with common aliases. |
limit | number | Maximum number of opportunities to return (default 50) |
minValue | number | Minimum estimated value filter |
salesGroup | string | Sales Group name (e.g. "USA - Health & FinServ"). Partial match. |
salesUnit | string | Sales Unit name (e.g. "USA - Healthcare"). Partial match. |
segment | string | Customer segment label (e.g. "Upper Majors Commercial"). Case-insensitive match on segment FormattedValue. |
status | string | Filter by opportunity status (default: open) |
territoryCode | string | Territory code (e.g. "SE.ES.EC.OCI.01.MG.02"). Exact match on territoryid.name field. |
get_territory_overview
Complete territory overview: account count, pipeline summary by stage, top opportunities. Scope by ATU Group, Sales Unit, Sales Group, Area, Territory Code, Country, or Segment. At least one filter is required. Each returned record carries `@odata.etag`, an opaque version token for concurrency control. Pass it as `expectedEtag` to subsequent update tools; do not display it to users.
| Parameter | Type | Description |
|---|---|---|
area | string | Geography area name. Valid values: United States, Canada, Latam, UK & Ireland, North Europe, South Europe, Germany & Austria, France, Netherlands, Switzerland, EMEA HQ, MEA, India, Japan, Korea, Great… |
atuGroup | string | ATU Group name (e.g. "USA - Healthcare - Provider Major"). Partial match. |
country | string | Country name or code (e.g. "Spain", "España", "ES"). Tolerant matching with common aliases. |
salesGroup | string | Sales Group name (e.g. "USA - Health & FinServ"). Partial match. |
salesUnit | string | Sales Unit name (e.g. "USA - Healthcare"). Partial match. |
segment | string | Customer segment label (e.g. "Upper Majors Commercial"). Case-insensitive match on segment FormattedValue. |
territoryCode | string | Territory code (e.g. "SE.ES.EC.OCI.01.MG.02"). Exact match on territoryid.name field. |
get_opportunity_solutions
Get the product line items (solutions/products) attached to an opportunity. Shows product name, quantity, pricing, and extended amount.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
find_opportunities_by_product
Find opportunities that have a specific product or solution attached. Searches across opportunity product line items and returns parent opportunities with matched product details. Each returned record carries `@odata.etag`, an opaque version token for concurrency control. Pass it as `expectedEtag` to subsequent update tools; do not display it to users.
| Parameter | Type | Description |
|---|---|---|
productName * | string | Product or solution name to search for (contains match) |
accountIds | array | Optional account GUIDs to narrow scope |
limit | number | Maximum results (default 25) |
status | string | Filter by opportunity status (default: open) |
update_account
Update fields on a customer account (company profile data: name, phone, website, email, address, industry, revenue, headcount, primary contact, owner). Changes are staged for user approval — nothing is written until approved via execute_operation. Allowed fields: name, telephone1, websiteurl, emailaddress1, description, industrycode, revenue, numberofemployees, address1_line1, address1_line2, address1_city, address1_stateorprovince, address1_postalcode, address1_country, primarycontactid@odata.bind, ownerid@odata.bind.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Account GUID |
fields * | object | Object of field name → new value (e.g. { "telephone1": "+1-425-555-1212", "websiteurl": "https://contoso.com" }). Use "primarycontactid@odata.bind": "/contacts(<guid>)" for primary contact and "owne… |
reason | string | Why this change is being made (audited and shown to reviewers) |
update_contact
Update fields on a customer contact (person profile data: name, job title, email, phone, mobile, address, description, parent account, owner). Changes are staged for user approval — nothing is written until approved via execute_operation. Allowed fields: firstname, lastname, jobtitle, emailaddress1, emailaddress2, telephone1, mobilephone, description, address1_line1, address1_city, address1_stateorprovince, address1_postalcode, address1_country, parentcustomerid_account@odata.bind, ownerid@odata.bind.
| Parameter | Type | Description |
|---|---|---|
contactId * | string | Contact GUID |
fields * | object | Object of field name → new value (e.g. { "jobtitle": "VP Engineering", "emailaddress1": "alex@contoso.com" }). Use "parentcustomerid_account@odata.bind": "/accounts(<guid>)" to reparent to a differe… |
reason | string | Why this change is being made (audited and shown to reviewers) |
create_contact
Create a new contact (person) linked to an account. Changes are staged for user approval — nothing is written until approved via execute_operation. Allowed fields: firstname, lastname, jobtitle, emailaddress1, telephone1, mobilephone, description, address1_city, address1_country, parentcustomerid_account@odata.bind.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Account GUID to parent the contact to |
lastName * | string | Last (family) name — required |
city | string | City |
country | string | Country |
description | string | Free-form notes about the contact |
email | string | Primary email address |
firstName | string | First (given) name |
jobTitle | string | Job title |
mobile | string | Mobile phone |
phone | string | Business phone |
reason | string | Why this contact is being created (audited and shown to reviewers) |
add_opportunity_solution_play
Add a Solution Play to an opportunity. Looks up the Solution Play by name (contains, case-insensitive) in msp_accountplansalesplaybooks and creates a row in msp_salesplaychecklists linking it to the opportunity. Staged for user approval.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
primary | boolean | Mark this Solution Play as the primary one for the opportunity. Defaults to true when no other primary play exists, otherwise false. |
reason | string | Why this play is being added (audited and shown to reviewers). |
solutionArea | string | Solution Area to disambiguate when multiple active Solution Plays share the same name. Matched case-insensitively against the play's msp_globalsolutionarea formatted label. Ignored when solutionPlayId… |
solutionPlayId | msp_accountplansalesplaybook GUID. Takes precedence over solutionPlayName when both are provided. | |
solutionPlayName | string | Solution Play name (e.g. "Copilot and Agents at Work"). Contains-match, case-insensitive. Provide this OR solutionPlayId. |
set_opportunity_solution_play_primary
Promote an existing Solution Play on an opportunity to primary. Demotes any other primary plays and syncs opportunity.msp_solutionarea to the new primary's area. Staged for user approval.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
reason | string | Why this play is being made primary (audited). |
solutionArea | string | Solution Area to disambiguate when the opportunity has multiple checklist rows with the same play name. |
solutionPlayChecklistId | msp_salesplaychecklists row GUID. Takes precedence over solutionPlayName. | |
solutionPlayName | string | Solution Play name on the existing checklist row. Provide this OR solutionPlayChecklistId. |
remove_opportunity_solution_play
Remove a Solution Play from an opportunity by deleting its msp_salesplaychecklists row. Refuses to delete the current primary play — promote another play first via set_opportunity_solution_play_primary. Staged for user approval.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
reason | string | Why this play is being removed (audited). |
solutionArea | string | Solution Area to disambiguate when the opportunity has multiple checklist rows with the same play name. |
solutionPlayChecklistId | msp_salesplaychecklists row GUID. Takes precedence over solutionPlayName. | |
solutionPlayName | string | Solution Play name on the existing checklist row. Provide this OR solutionPlayChecklistId. |
manage_deal_team
List, add, or remove deal team members on an opportunity via D365 Access Teams. "add" resolves a person by email or systemUserId then stages adding them to the opportunity access team; "list" returns current members; "remove" stages removing a user. Add/remove require approval via execute_operation.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
opportunityId * | string | Opportunity GUID |
email | string | Email address of the person to add/remove (used to resolve systemuserid) |
reason | string | Optional reasoning for this change (audited and shown in confirmation dialog). |
systemUserId | SystemUser GUID (if known — skips email lookup) |
add_me_to_deal_team
Add the current signed-in user to an opportunity deal team (D365 Access Team, the "Deal Team" tab in MSX). Resolves you via WhoAmI, returns alreadyMember=true if you are already on the team, otherwise stages the add for approval via execute_operation.
| Parameter | Type | Description |
|---|---|---|
opportunityId * | string | Opportunity GUID |
reason | string | Optional reasoning for this change (audited and shown in confirmation dialog). |
manage_milestone_team
List, add, or remove members on a milestone's access team (the "Milestone Team" tab in MSX) via D365 Access Teams. Add/remove require approval via execute_operation.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
milestoneId * | string | Engagement milestone GUID |
email | string | Email address of the person to add/remove (used to resolve systemuserid) |
reason | string | Optional reasoning for this change (audited and shown in confirmation dialog). |
systemUserId | SystemUser GUID (if known — skips email lookup) |
query_audit_log
Query audit log with filters (startDate, endDate, entitySet, method, phase, actor, correlationId, search, source, outcome). Returns {total, entries}.
| Parameter | Type | Description |
|---|---|---|
actor | string | Actor email |
correlationId | string | Correlation ID (batch identifier) |
endDate | string | End date (ISO 8601) |
entitySet | string | Entity set name (e.g., "opportunities") |
limit | number | Max records to return (default 50) |
method | string | HTTP method (GET, POST, PATCH, DELETE) |
offset | number | Offset for pagination (default 0) |
outcome | string | Outcome filter: "ok" (phase === "executed") | "attention" (phase in {failed, stale-conflict, dead-letter, uncertain}) |
phase | string | Phase (staged, executed) |
search | string | Free-text search in description/recordName |
source | string | Source filter: "batch" (correlationId != null) | "manual" (correlationId == null) |
startDate | string | Start date (ISO 8601) |
get_audit_entry
Get a single audit entry by ID (ChangeRecord id, e.g., chg_<uuid>).
| Parameter | Type | Description |
|---|---|---|
id * | string | ChangeRecord id (chg_<uuid>) |