Skip to main content
Glama
nic01asFr
by nic01asFr

create_column

Add a new column to a Grist table, specifying its type, label, and optional formula or choices for data entry.

Instructions

Crée une nouvelle colonne dans une table.

Prérequis: - list_tables: Pour obtenir un table_id valide

Flux de travail typique: 1. list_tables(doc_id) → obtenir table_id 2. create_column(doc_id, table_id, "col_name", "Text", "Nom") → créer la colonne 3. list_columns(doc_id, table_id) → vérifier la création

Args: doc_id: L'ID du document table_id: L'ID de la table column_id: ID de la nouvelle colonne (doit être unique dans la table) column_type: Type de données. Types supportés: - Text, Numeric, Int, Bool, Date, DateTime - Choice, ChoiceList (avec paramètre choices) - Ref:TableId, RefList:TableId (références) - Attachments label: Libellé d'affichage de la colonne (optionnel) formula: Formule Python pour colonnes calculées (optionnel) widget_options: Options d'affichage comme dict (optionnel) visible_col: colRef de la colonne à afficher pour les Ref (optionnel) untie_col_id_from_label: Dissocier l'ID du label (défaut: True) description: Description de la colonne (optionnel) choices: Liste de choix pour Choice/ChoiceList (optionnel)

Returns: Dict avec statut, message et détails de la colonne créée

Examples: # Colonne texte simple create_column(doc_id, "Table1", "name", "Text", label="Nom")

# Colonne choix
create_column(doc_id, "Table1", "status", "Choice",
              choices=["Actif", "Inactif", "En attente"])

# Colonne référence
create_column(doc_id, "Table1", "owner", "Ref:Users",
              label="Propriétaire", visible_col=5)

# Colonne calculée
create_column(doc_id, "Table1", "full_name", "Text",
              formula="$first_name + ' ' + $last_name")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
doc_idYes
choicesNo
formulaNo
table_idYes
column_idYes
column_typeNoText
descriptionNo
visible_colNo
widget_optionsNo
untie_col_id_from_labelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It details the return value (dict with status, message, details) and parameters. It does not explicitly mention destructive behavior or authorization, but the creation nature is clear.

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?

The description is long but well-structured with sections (description, prerequisites, workflow, args, returns, examples). It is front-loaded with purpose and each section adds value.

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

Completeness5/5

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

Given the complexity (11 parameters, 0% schema coverage), the description is very complete. It explains all parameters, provides examples, and notes the return format. An output schema exists but the description adds context.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It explains each parameter, lists supported types for column_type, explains choices, visible_col, etc. This adds significant meaning beyond the schema.

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 'Crée une nouvelle colonne dans une table.' This is a specific verb and resource, and it is distinct from sibling tools like create_table or create_document.

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 description provides prerequisites (list_tables) and a typical workflow (1. list_tables, 2. create_column, 3. list_columns). It does not explicitly mention when not to use this tool or alternatives, 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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nic01asFr/mcp-server-grist'

If you have feedback or need assistance with the MCP directory API, please join our Discord server