Skip to main content
Glama

CockroachDB MCP Server

create_table

Define table names, columns, and their types to create new tables in CockroachDB. Streamline database setup and schema evolution using natural language inputs directly via the MCP server.

Instructions

Enable the creation of new tables in the current database. You can instruct the AI to define table names, columns, and their types, streamlining database setup and schema evolution directly through natural language.

Args: table_name (str): Name of the table. columns (List[Dict[str, str]]): List of dicts with keys: - 'name' (str): column name (required) - 'datatype' (str): column datatype (required) - 'constraint' (str): column constraint (optional)

Returns: A success message or an error message.

Example: columns = [ {"name": "id", "datatype": "SERIAL", "constraint": "PRIMARY KEY"}, {"name": "username", "datatype": "TEXT", "constraint": "NOT NULL"}, {"name": "created_at", "datatype": "TIMESTAMP"} ]

Input Schema

NameRequiredDescriptionDefault
columnsYes
table_nameYes

Input Schema (JSON Schema)

{ "properties": { "columns": { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "title": "Columns", "type": "array" }, "table_name": { "title": "Table Name", "type": "string" } }, "required": [ "table_name", "columns" ], "title": "create_tableArguments", "type": "object" }

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/amineelkouhen/mcp-cockroach'

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