Skip to main content
Glama
Dynamics 365 MCP Server

Dynamics 365 MCP Server

by Kenny-666

create_model_relationship

Destructive

Creates native 1:N (with a new lookup) or N:N relationships in Dynamics 365, previewing metadata checks and the create request by default before execution.

Instructions

Create native 1:N (with a new Lookup) or N:N relationship. Default preview runs metadata reads and read-only POST eligibility checks, then exposes cascade rules and native create body. Checks publisher, managed properties and duplicate names. No implicit publish, form editing or update of existing relationships.

Input Schema

NameRequiredDescriptionDefault
typeNo
dryRunNoDefault true performs reads/eligibility checks and returns a native request preview. Set false to execute.
lookupNo
cascadeNo
dry_runNoDefault true performs reads/eligibility checks and returns a native request preview. Set false to execute.
entity1No
entity2No
entity_1No
entity_2No
schemaNameNo
schema_nameNo
referencedEntityNo
referenced_entityNo
referencingEntityNo
referencing_entityNo
solutionUniqueNameNoExisting unmanaged solution; its publisher prefix is validated for new schemas.
environment_profileNoOptional named environment profile for this call; omit to use the configured default.
intersectEntityNameNo
solution_unique_nameNoExisting unmanaged solution; its publisher prefix is validated for new schemas.
intersect_entity_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.2
    • addedInput schema / properties / environment_profile
      Added value: +{
      +  "description": "Optional named environment profile for this call; omit to use the configured default.",
      +  "pattern": "^[A-Za-z][A-Za-z0-9_]{0,31}$",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description meaningfully extends that: it discloses the dry-run-first contract, that the preview performs metadata reads plus read-only POST eligibility checks, that it checks publisher prefix, managed properties and duplicate names, and that it returns cascade rules and a native create body. It stops short of stating permission requirements or failure modes on execute.

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 operative verb and resource, then four tight sentences covering preview semantics, checks, and exclusions. Dense but nearly waste-free; the 'then exposes cascade rules and native create body' clause is the only slightly opaque fragment.

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

Completeness3/5

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

For a 20-parameter, nested-object, mutation-capable tool with no output schema, the description conveys the right mental model (preview then execute) and the safety-relevant checks. It does not, however, explain the two mutually exclusive parameter sets implied by the oneOf in the schema, which is the main thing an agent could get wrong here.

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

Parameters3/5

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

Schema description coverage is only 25% across 20 parameters, so the description must compensate and it does so only partially: it clarifies the type enum, that lookup is newly created, and that cascade rules are surfaced/checked. Key inputs such as referencedEntity vs referencingEntity, entity1/entity2, schemaName, and intersectEntityName go unmentioned, as do the dual alias fields.

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

Purpose4/5

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

Opens with a specific verb+resource pair and immediately splits the two supported shapes: 'native 1:N (with a new Lookup) or N:N relationship'. That is far more precise than the bare name. It does not name the sibling it complements (update_model_relationship) explicitly, leaving the create-vs-update split to be inferred from 'No ... update of existing relationships'.

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: the default run is a preview, set dryRun false to execute, and the tool explicitly excludes publishing, form editing, and updating existing relationships. The exclusions implicitly route the agent to update_model_relationship/publish tools, but no sibling is named outright and no prerequisites (e.g. required privileges) are stated.

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

Deploy Server

Other Tools