Skip to main content
Glama

create_table

Define and create new tables in CockroachDB by specifying table names, columns, and data types using natural language, simplifying database setup and schema 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. It states the tool creates tables, implying a write operation, but doesn't disclose behavioral traits like permissions needed, whether it's idempotent, if it affects existing data, or error handling specifics. The mention of 'success message or an error message' adds minimal context, but key details are missing 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 appropriately sized and front-loaded, starting with the purpose, followed by structured sections for Args, Returns, and Example. Each sentence adds value, such as clarifying natural language use. Minor verbosity in the first paragraph slightly reduces efficiency, but overall it's well-organized.

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 (a mutation tool with 2 parameters, no annotations, and no output schema), the description is partially complete. It covers purpose and parameters well but lacks behavioral context like side effects or error details. The absence of output schema means the description should ideally explain return values more thoroughly, which it does minimally with 'success message or an error message.'

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 compensate. It provides detailed parameter semantics: 'table_name' is explained as the table name, and 'columns' is described with a list of dicts including required keys ('name', 'datatype') and optional ones ('constraint'), along with an example. This adds significant meaning beyond the bare schema.

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 description clearly states the tool's purpose: 'Enable the creation of new tables in the current database.' It specifies the verb ('create') and resource ('tables'), and distinguishes it from siblings like 'create_database' or 'create_view' by focusing on tables. However, it doesn't explicitly differentiate from 'create_index' or 'create_view' in the same sentence, which prevents a perfect score.

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?

The description implies usage for 'database setup and schema evolution' and mentions 'streamlining... through natural language,' which suggests when to use it. However, it lacks explicit guidance on when to choose this over alternatives like 'create_database' or 'create_view,' and doesn't mention prerequisites or exclusions, such as requiring an active database connection.

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-cockroachdb'

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