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 account records keyed by accountid (1:1 Account PATCH). Needs map_session_id or ts_handle. Point layers carry derived stamps from builds/realign (part_id, territory_id, territory_label), 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 resolved by name or GUID). With confirm=false (default) or no field_map, runs a read-only preflight returning status=confirmation_required, stamped_columns, candidate_target_attributes, preview_updates, and ask_user. With confirm=true, queues the batch PATCH task.

Input Schema

NameRequiredDescriptionDefault
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. Added

TDQS

A4.4/5.0
Behavior4/5

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

Adds real context beyond the annotations: Entra/Copilot sign-in requirement, that the operation is a 1:1 Account PATCH rather than a bulk overwrite, and the exact preflight return payload (status=confirmation_required, stamped_columns, preview_updates, ask_user). It leaves the destructive/irreversibility implications implicit, relying on destructiveHint=true rather than stating what happens to overwritten attribute values.

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

Conciseness3/5

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

Front-loaded with purpose and mode behavior, which is good, but roughly half the text is a per-builder enumeration of every derived stamp column. That list is largely redundant because the preflight returns stamped_columns and candidate_target_attributes anyway, and the single dense paragraph is hard to scan.

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

Completeness5/5

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

For a 7-parameter, destructive, open-world write tool with an output schema, the description covers auth mode, session-handle sourcing, mapping semantics, environment defaults, and the preflight/confirm gate. An agent has everything needed to decide and invoke correctly.

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

Parameters5/5

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

Schema coverage is already 100%, but the description still adds meaning: field_map targets can be primitive columns or territoryid/ownerid lookups resolved by name or GUID, and a <point_layer>_visits layer resolves to its 1:1 parent account layer with schedule_day/date remapped to schedule_days/dates. That resolution behavior is not derivable from the schema alone.

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 precise verb and target ('writes stamped point-layer columns back to Dynamics 365 account records keyed by accountid (1:1 Account PATCH)'), naming the exact resource and write shape. This clearly separates it from siblings like push_to_designer, export_geojson, and import_dataverse_view without needing the schema.

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 explicit selection context: needs map_session_id or ts_handle, and spells out the two-mode workflow (confirm=false or no field_map => read-only preflight; confirm=true => queued batch PATCH). It does not name a sibling as the alternative for adjacent cases (e.g. push_to_designer vs this), which keeps it short of a 5.

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