Skip to main content
Glama
SGromych

DataForge Semantic MCP Server

by SGromych

df_write_fact

DestructiveIdempotent

Create, replace, or update facts in a DataForge project version. Use create to add a new fact, replace to overwrite resetting optional fields, or update to change only provided fields.

Instructions

WRITES TO DATAFORGE. Create, replace or update a fact in a project version. mode=create adds a new one; mode=replace (PUT) overwrites it and RESETS every optional field you do not pass; mode=update (PATCH) changes only the fields you pass. replace and update require fact_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoEntity id; must match the path id if supplied
modeNocreate = POST a new entity; replace = PUT, which resets every optional field not supplied; update = PATCH, which changes only supplied fields.create
blockNo
groupNo
statusNo
commentNo
fact_idNoRequired for replace/update
formulaNo
requiredNo
fact_nameNo
fact_typeNoReference label, e.g. Primary
relevanceNo
project_idYesDataForge project id
version_idYesProject version id
visibilityNo
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.
original_objectNo
original_sourceNo
connected_sourceNoPhysical location of the data. Supplying `connection` switches the API to strict validation of db/schema/table/column against that connection's cached schema.
fact_descriptionNo
original_source_typeNo
responsible_for_dataNo
report_for_verificationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already carry destructiveHint=true and readOnlyHint=false, so the description correctly confirms a write. It adds real value beyond the annotations by disclosing the key gotcha—replace mode RESETS every optional field omitted—and the fact_id requirement for replace/update. This mode-specific destructive behavior is precisely the kind of context an agent needs. No contradiction with annotations.

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?

Three tightly-written sentences; the mode logic is front-loaded and each sentence earns its place. The only cost is the opening 'WRITES TO DATAFORGE' shout, which duplicates the tool name and serves mostly as emphasis. Otherwise it is efficient and well ordered.

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 23-parameter, no-output-schema mutating tool, the description adequately covers the procedural mode logic but leaves the individual fact fields unexplained and says nothing about the return/response format. Given low schema coverage and the absence of an output schema, it should describe more of the domain-specific fields and response behavior.

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 35%, so the description carries a heavy burden. It does explain the two highest-stakes parameters—mode semantics and fact_id's requirement—well. But roughly 14 parameters (block, group, status, formula, relevance, original_object, original_source, etc.) have no description in either the schema or the tool description, so the description only partially compensates for the coverage gap.

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?

The description states a specific verb (write) and resource (a fact in a project version), then spells out the three modes: create, replace (PUT), and update (PATCH). This fully disambiguates the operation from siblings like df_write_measure and df_write_dimension, and the single-entity nature is clear against df_bulk_write_facts.

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?

Excellent internal routing: the description clarifies exactly when to use each mode—create for new facts, replace to overwrite with reset semantics, update to change only passed fields—plus a hard prerequisite (replace/update require fact_id). It does not, however, mention exclusions such as using df_bulk_write_facts for multiple facts or df_delete_fact for removal, so it stops short of addressing alternatives.

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