Skip to main content
Glama

ohmyho.st

Create a table in the project's database

database_table_create
Idempotent

Create one ordinary table in the public schema of a Dev or Prod database, as the migration role with the same access as migration tables, so a row-change watch can attach later. Each column has a lower-case name, a type (text, integer, bigint, boolean, numeric, double precision, timestamptz, date, uuid or jsonb) and optional nullable, identity (integer or bigint only) and default (now for timestamptz, uuid for uuid); at most 64 columns, 8 primary-key columns and 100 tables per database. An identical repeat answers created: false; a table of the same name with another definition is refused with database_table_conflict. Tables created this way are not in the repository's migration files: record them in project notes and add a migration when the source should reproduce the database. Requires confirmed: true and an idempotency key. Refused with project_budget_exceeded while the Stop budget is reached. If the selected environment has no database, follow database_not_set_up.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "orders",
      "columns": [
        {
          "name": "id",
          "type": "bigint",
          "identity": true,
          "nullable": false
        },
        {
          "name": "total",
          "type": "numeric"
        }
      ],
      "environment": "dev",
      "primary_key": [
        "id"
      ]
    },
    "name": "database_table_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYesName of the new table in the public schema. Lower-case, not a PostgreSQL reserved word and not starting with pg_.
columnsYesColumns in the order written. Names are unique, and at most one column is an identity column.
confirmedYes
project_idYesProject identifier.
environmentYes
primary_keyNoColumns of the primary key, each one of the table's columns. Identity and primary key columns are NOT NULL; omitted when the table has no primary key.
idempotency_keyYesIdentifies one mutation and its canonical request payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: identical repeats return created: false, same-name-different-definition is refused with database_table_conflict, idempotency and confirmation are required, budget and unprovisioned-environment failure modes are named, and the tables are declared out-of-band from migration files. This is exactly the mutation-consequence context annotations do not carry.

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?

Dense but front-loaded, leading with the operation and scope before constraints, failure modes and follow-up. It is a single long run-on block that could be split into constraint and failure-mode sentences, but no sentence is filler.

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?

For a 7-parameter mutating tool with no output schema, the description covers success semantics (created: false), failure codes, quotas, idempotency, confirmation and post-creation obligations. An agent has everything needed to invoke it correctly and interpret the result.

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

Parameters4/5

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

Schema coverage is 71%, and the description adds real meaning on top: allowed column types, per-column defaults constrained by type (now only for timestamptz, uuid only for uuid), identity limited to integer/bigint, and hard limits of 64 columns, 8 primary-key columns and 100 tables per database. Some of this duplicates schema text, but the cross-field constraints and quotas are additive.

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?

States a specific verb and resource (create one ordinary table in the public schema) plus scope (Dev or Prod database, migration role access) and ties the outcome to a sibling concern (a row-change watch can attach later). An agent can distinguish this from database_watch_create without opening a schema.

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?

Gives clear preconditions (confirmed: true, an idempotency key) and explicit branches: budget reached → project_budget_exceeded, no database → database_not_set_up, and follow-up guidance to record the table in project notes and add a migration. It does not name an alternative tool for schema changes outside the public schema, so it stops short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.