Skip to main content
Glama
Grist MCP Server
by nic01asFr

Create Schema

create_schema

Creates a validated schema with tables, columns, and references in a Grist document, skipping existing tables to prevent duplicates.

Instructions

Crée un schéma complet avec tables, colonnes et relations.

Algorithme:

  1. Validation du schéma (rien n'est créé si elle échoue)

  2. Création des tables avec leurs colonnes simples

  3. Création des colonnes de référence (colonne affichée réglée)

  4. Création des relations inverses (références à double sens)

  5. Insertion des données (optionnel)

Les tables déjà présentes dans le document ne sont jamais modifiées : ni colonnes, ni références, ni données ne leur sont ajoutées. Relancer le même schéma ne crée donc pas de doublons. Elles restent utilisables comme cibles de références.

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": {
      "doc_id": "<doc_id>",
      "schema": "<schema>"
    },
    "name": "create_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYesL'ID du document
schemaYesSchéma complet à créer
insert_dataNoSi True, insère les données définies (défaut: True)
skip_existingNoSi True (défaut), ignore les tables existantes. Si False, échoue sans rien créer quand une table existe déjà.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.2
    • addedInput schema / properties / doc_id / description
      Added value: +"L'ID du document"
    • addedInput schema / properties / insert_data / description
      Added value: +"Si True, insère les données définies (défaut: True)"
    • addedInput schema / properties / schema / description
      Added value: +"Schéma complet à créer"
    • addedInput schema / properties / skip_existing / description
      Added value: +"Si True (défaut), ignore les tables existantes. Si False,\néchoue sans rien créer quand une table existe déjà."
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full behavioral burden and does well: it discloses the ordered execution steps, that validation failure creates nothing, that existing tables are left completely untouched (no columns, references or data appended), that re-running the same schema does not duplicate, and that existing tables remain valid reference targets. The remaining gap is atomicity after step 1 – it does not say whether a failure at step 3 or 5 rolls back the tables already created.

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?

Purpose is front-loaded in one line, followed by a scannable numbered algorithm and a short paragraph on existing-table semantics. The structure is effective; the closing note could be tightened since 'reste utilisables comme cibles de références' is a minor addendum rather than decision-relevant information.

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 complex multi-step provisioning tool with a nested free-form 'schema' object, the description covers ordering, idempotency and collision handling, and an output schema exists so return values need no prose. The only substantive omission is what happens on a mid-execution failure after validation has passed.

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 100%, so the schema already documents all four parameters and establishes the baseline of 3. The description adds meaning to the nested 'schema' object by enumerating what it must contain (tables, simple columns, reference columns, inverse relations), but it never mentions the skip_existing=False path where the call fails on an existing table, leaving the agent to discover that from the schema alone.

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 first sentence states a specific verb and resource set ('Crée un schéma complet avec tables, colonnes et relations'), which is clearly an aggregate operation rather than a single-object creation. It does not explicitly contrast itself with the sibling single-object tools (create_table, create_column, create_reference_column), so an agent must infer that this is the batch variant.

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

Usage Guidelines3/5

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

Usage is only implied: the numbered algorithm makes clear this is the tool for provisioning a whole schema in one shot, and the idempotency note tells the agent it is safe to retry. There is no explicit 'use X instead when you only need one table/column', and no stated prerequisites or permissions.

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