Skip to main content
Glama
Dataverse Mcp Server

Dataverse Mcp Server

create_relationship

Create Dataverse table relationships: OneToMany adds a lookup column, while ManyToMany links records through an intersect table.

Instructions

Create a relationship between two tables. OneToMany adds a lookup column on related_entity that points to one primary_entity record; ManyToMany links records on both sides through an intersect table. Returns the relationship's URL; a schema_name that is taken is an error. This server has no tool to list or delete relationships.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>",
      "primary_entity": "<primary_entity>",
      "related_entity": "<related_entity>",
      "schema_name": "<schema_name>"
    },
    "name": "create_relationship"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesRelationship type
lookup_nameNoLogical name for lookup attribute (OneToMany only)
schema_nameYesUnique schema name for the relationship
primary_entityYesPrimary (referenced) entity logical name
related_entityYesRelated (referencing) entity logical name
lookup_display_nameNoDisplay name for lookup attribute (OneToMany only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses the side effects (lookup column added, intersect table created), the return value (relationship URL), the failure mode (duplicate schema_name is an error), and the lifecycle constraint that no list or delete tool exists, implying creation is effectively permanent. It omits permission requirements and whether a failed creation leaves partial artifacts.

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

Conciseness5/5

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

Three tight sentences with no filler: the core action and variant semantics come first, the return value and error condition second, and the lifecycle warning last. Every sentence carries information an agent needs before calling.

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 a six-parameter mutation with no annotations and no output schema, the description covers the key gaps: side effects, return value, error condition, and irreversibility. Only permission/auth requirements are left unstated, which is a minor but real gap for a schema-modifying operation.

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 meaning beyond the enum's bare "Relationship type" label by explaining what each value causes. It adds nothing for lookup_name and lookup_display_name beyond what the schema already states, keeping it from a 5.

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?

Names a specific verb and resource ("Create a relationship between two tables") and immediately disambiguates the two variants, OneToMany vs ManyToMany, by describing their structural effects. It does not compare itself to nearby siblings like add_attribute or create_entity, so it stops short of full sibling differentiation.

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?

The type semantics double as selection guidance: the agent learns that OneToMany creates a lookup on the related entity while ManyToMany uses an intersect table, which is exactly the decision it must make. It stops short of explicit when-to-use framing (e.g., cardinality rules of thumb) and offers no exclusions, but the context is clear.

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