Skip to main content
Glama
SGromych

DataForge Semantic MCP Server

by SGromych

df_write_relationship

DestructiveIdempotent

Create, replace, or update star-schema relationships in DataForge. Define foreign key (fact table) and primary key (dimension group) to link data across compatible connections.

Instructions

WRITES TO DATAFORGE. Create, replace or update a star-schema relationship. foreign_key (fact table side) and primary_key (dimension group side) must name the same connection - a join cannot span two databases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNocreate = POST a new entity; replace = PUT, which resets every optional field not supplied; update = PATCH, which changes only supplied fields.create
project_idYesDataForge project id
version_idYesProject version id
foreign_keyNoPhysical location of the data. Supplying `connection` switches the API to strict validation of db/schema/table/column against that connection's cached schema.
primary_keyNoPhysical location of the data. Supplying `connection` switches the API to strict validation of db/schema/table/column against that connection's cached schema.
idempotency_keyNoOptional UUID v4. Reusing a key within 24 hours replays the original response instead of applying the change twice. One is generated automatically when omitted.
relationship_idNo
relationship_typeNo
source_fact_table_idNo
target_dimension_group_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true. The description adds the behavioral rule that the join cannot span two databases, which is beyond the annotations. It does not describe side effects of 'replace' versus 'update' beyond what the schema already covers, but the connection constraint is a useful addition, so a 3 is appropriate.

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?

The description is two sentences, front-loaded with the action, and includes a critical constraint without fluff. Every word earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

For a tool with 10 parameters, nested objects, and no output schema, the description is too minimal. It omits guidance on mode semantics (though schema covers it), required fields beyond the two IDs, and what the response contains. The connection constraint is important but does not fill the gaps needed for an agent to call this correctly without relying heavily on the schema.

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 60%, meaning some parameters (e.g., relationship_id, source_fact_table_id) lack descriptions. The description adds semantic value by explaining the relationship between foreign_key and primary_key (same connection), which is not in the schema. However, it does not compensate for the undocumented parameters, so a 3 reflects partial enhancement.

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?

The description clearly states the action ('Create, replace or update') and the resource ('star-schema relationship'), which is specific and distinct from sibling tools like df_get_relationship or df_delete_relationship. However, it does not explicitly name alternatives or contrast with them, so it stops short of a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternative write tools (e.g., df_write_measure, df_write_dimension) or when not to use it. The only usage condition mentioned is that foreign_key and primary_key must use the same connection, which is a constraint rather than a selection guideline. No exclusions or alternatives are named.

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