Skip to main content
Glama

create_table

Define and create new tables in CockroachDB by specifying table names, columns, and data types directly through natural language commands, simplifying database schema setup and management.

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

TableJSON Schema
NameRequiredDescriptionDefault
columnsYes
table_nameYes
Behavior2/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 of behavioral disclosure. It states the tool creates tables, implying a write/mutation operation, but does not disclose critical behavioral traits such as required permissions, whether changes are reversible, error handling specifics, or rate limits. The mention of 'streamlining database setup' hints at utility but lacks operational details needed for safe invocation.

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 appropriately sized and front-loaded, starting with the core purpose. The Args and Returns sections are structured for clarity, though the inclusion of an example adds length that could be considered slightly verbose. Every sentence earns its place by providing essential information, but minor trimming might improve conciseness.

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?

Given the complexity of a table creation tool with no annotations and no output schema, the description is partially complete. It covers purpose, parameters, and a basic return indication ('success message or an error message'), but lacks details on behavioral aspects like permissions, idempotency, or error conditions. The parameter semantics are well-documented, but overall context for safe and effective use is incomplete.

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?

The schema description coverage is 0%, so the description must fully compensate. It provides detailed parameter semantics beyond the schema: it explains that 'table_name' is the name of the table, and 'columns' is a list of dicts with required keys ('name', 'datatype') and an optional key ('constraint'), including examples of valid values. This adds significant meaning not present in the bare 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 clearly states the specific action ('Enable the creation of new tables'), resource ('in the current database'), and scope ('define table names, columns, and their types'), distinguishing it from siblings like create_database, create_view, or drop_table. It explicitly mentions 'streamlining database setup and schema evolution', which adds context about its role in schema management.

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 clear context for usage ('database setup and schema evolution') and implies when to use it versus alternatives by specifying it creates tables 'in the current database', distinguishing from create_database. However, it does not explicitly state when not to use it or name specific alternatives like create_view or drop_table, which prevents a perfect score.

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

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

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