Skip to main content
Glama
informatics-isi-edu

Deriva MCP Server

Official

create_table

Create a new table in a Deriva domain schema, defining columns with types and constraints, and optionally adding foreign keys to reference other tables.

Instructions

Create a new table in the domain schema.

This tool creates a standard table (not an asset table). For tables that store files with automatic URL/checksum tracking, use create_asset_table instead.

Process Overview:

  1. Define columns with names, types, and constraints

  2. Optionally define foreign keys to reference other tables

  3. The table is created in the domain schema

  4. The navigation bar is automatically updated

Args: table_name: Name for the new table (e.g., "Subject", "Experiment", "Protocol"). columns: Column definitions, each dict with: - name (str, required): Column name - type (str): One of "text", "int2", "int4", "int8", "float4", "float8", "boolean", "date", "timestamp", "timestamptz", "json", "jsonb", "markdown" (default: "text") - nullok (bool): Allow null values (default: True) - comment (str): Column description foreign_keys: Foreign key definitions, each dict with: - column (str, required): Column name in this table (must also be in columns list) - referenced_table (str, required): Name of the table to reference - referenced_column (str): Column in referenced table (default: "RID") - on_delete (str): Action on delete - "NO ACTION", "CASCADE", "SET NULL" (default: "NO ACTION") comment: Description of the table's purpose. schema: Schema to create the table in. If not provided, uses the default domain schema. Useful when a catalog has multiple domain schemas.

Returns: JSON with status, table_name, schema, columns.

Examples: Simple table: create_table("Subject", [ {"name": "Name", "type": "text", "nullok": false}, {"name": "Age", "type": "int4"}, {"name": "Notes", "type": "markdown"} ])

Table with foreign key:
    create_table("Sample", [
        {"name": "Name", "type": "text", "nullok": false},
        {"name": "Subject", "type": "text", "nullok": false},
        {"name": "Collection_Date", "type": "date"}
    ], foreign_keys=[
        {"column": "Subject", "referenced_table": "Subject", "on_delete": "CASCADE"}
    ])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNo
columnsNo
commentNo
table_nameYes
foreign_keysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses a process overview (define columns, foreign keys, creation in domain schema, automatic navigation bar update) and states the return format. However, it does not mention error conditions (e.g., duplicate table name) or permission requirements, which would enhance transparency for a mutation tool.

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 lengthy but well-organized with clear sections (Process Overview, Args, Returns, Examples). The redundancy of 'domain schema' in the first line and step 3 is minor. Overall, every sentence adds value, though a slight tightening would make it more concise.

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 tool's complexity (5 parameters, nested structures) and the lack of schema descriptions, the description covers all necessary aspects: purpose, process, parameters, return value, and examples. It also notes the automatic navigation bar update, which is a side effect not inferable from the schema. The presence of an output schema further helps, but the description already includes return details.

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 fully compensates by documenting every parameter in depth. It explains table_name with examples, columns with each subfield and valid types/defaults, foreign_keys with all subfields and defaults, comment, and schema behavior. This is far beyond what the minimal schema provides.

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 clearly states 'Create a new table in the domain schema' and immediately distinguishes itself from create_asset_table ('not an asset table'). It names the specific sibling tool to use for asset tables, making the tool's scope unambiguous.

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

Usage Guidelines5/5

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

Explicit guidance is provided: 'For tables that store files with automatic URL/checksum tracking, use create_asset_table instead.' It also gives detailed examples of common use cases, making it clear when and how to use this tool vs. alternatives.

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/informatics-isi-edu/deriva-mcp'

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