Skip to main content
Glama

Publish Stamps to Dynamics 365

publish_to_dataverse
Destructive

Microsoft Copilot (Entra sign-in): writes stamped point-layer columns back to Dynamics 365 accounts keyed by accountid (1:1 Account PATCH). Needs map_session_id or ts_handle. territory_id / territory_label are computed at publish for one alignment (tal_id, default the active TAL; result stamped_tal_id). Points also carry part_id, calculate_route (route_id, route_label, stop_sequence), schedule_visits (schedule_id, visit_count, schedule_days, schedule_dates, contractor_id, contractor_label), isochrone_build (isochrone_tal_id, isochrone_ids, isochrone_labels, isochrone_count), and cluster_points (group_id, group_label). A <point_layer>_visits layer resolves to its 1:1 parent account layer and maps schedule_day/date to schedule_days/dates. field_map maps point columns to Dynamics account logical attributes (primitive columns or territoryid / ownerid lookups by name or GUID). confirm=false (default) or no field_map is a read-only preflight: status=confirmation_required, stamped_columns, candidate_target_attributes, preview_updates, ask_user. confirm=true queues the batch PATCH task.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "publish_to_dataverse"
  }
}

Input Schema

NameRequiredDescriptionDefault
tal_idNoAlignment whose territory_id / territory_label are published. Defaults to the active TAL.
confirmNoFalse (default) runs the read-only preflight to preview matched accounts and validate attributes/lookups. True dispatches the batch PATCH job after user confirmation.
field_mapNoMap of stamped point column -> Dynamics 365 account logical attribute name (e.g. {'territory_label': 'territoryid', 'route_label': 'new_routename'}). When absent, the preflight lists stamped_columns and candidate_target_attributes.
ts_handleNoTerritory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline.
point_layerNoSource point layer in the Territory Solution (default 'accounts'). A <point_layer>_visits layer resolves to its 1:1 parent account layer.accounts
map_session_idNoOpen map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set.
environment_urlNoDynamics 365 environment (e.g. https://contoso.crm.dynamics.com). Defaults to the environment the point layer was imported from, or the user's sole environment.
include_unassignedNoWhen true, accounts with an empty/unassigned stamp clear the target Dynamics attribute to null. Default false updates accounts with non-empty stamped values.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNoPresent when ok is false.
resultNoPresent when ok is true. A submission returns the task reference (task_id, next_action, sleep_ms); the completed task result carries the remaining fields.
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tal_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Alignment whose territory_id / territory_label are published. Defaults to the active TAL.",
      +  "title": "Tal Id"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the annotations: Entra sign-in requirement, preflight response fields (status=confirmation_required, stamped_columns, candidate_target_attributes, preview_updates, ask_user), async batch job dispatch, and the destructive implication that include_unassigned=true nulls target attributes. What it omits is equally relevant for a non-idempotent, destructive tool: nothing is said about re-run safety, task progress polling, or partial-batch failure handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and auth, and no sentence is filler — each parenthetical enumeration conveys which stamped columns are available for field_map. The cost is density: long chained parentheticals and slash-separated lists make it hard to scan, and the preflight/confirm behavior is buried at the end rather than called out early.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, open-world, destructive publish, the description covers inputs, prerequisite handles, the preflight contract, and the commit path, and an output schema exists so return shapes need not be restated. The remaining gap is operational: what the agent should do with the queued task afterward and how failures surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine cross-parameter meaning: the mutual dependence of map_session_id and ts_handle, that a <point_layer>_visits layer resolves to its 1:1 parent account layer, and that field_map values may be primitive columns or territoryid/ownerid lookups by name or GUID. These semantics are not fully captured in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "writes stamped point-layer columns back to Dynamics 365 accounts keyed by accountid (1:1 Account PATCH)". The 1:1 Account PATCH framing and the explicit source (stamped point-layer columns) make it unmistakable versus siblings such as push_to_designer or import_dataverse_view, without even needing the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: it needs map_session_id or ts_handle, and "confirm=false (default) or no field_map is a read-only preflight" while confirm=true queues the PATCH. That tells the agent how to sequence a safe preview-then-commit flow. It never names an alternative tool or states when this should not be used (e.g., non-Dynamics targets), so it stops short of explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources