Skip to main content
Glama

akb_alter_table

Modify database table schemas by adding, removing, or renaming columns, indexes, and unique keys using ALTER TABLE DDL. Requires admin role.

Instructions

Modify a table's schema — add, remove, or rename columns via ALTER TABLE DDL. Requires admin role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYesTable URI — akb://{vault}[/coll/{coll_path}]/table/{name}
add_columnsNoColumns to add
add_indexesNoLookup indexes to add: [{name?, columns}]. A column is a bare string or {name, order} (order 'asc'|'desc').
drop_columnsNoColumn names to remove
drop_indexesNoIndex names to drop (as shown in indexes metadata).
alter_columnsNoRich column ops: [{name, set_default?, drop_default?, set_check?, drop_check?, set_not_null?, drop_not_null?, set_enum?/enum?, rename_enum_values?}]
rename_columnsNoRename columns: {old_name: new_name}
add_unique_keysNoUNIQUE keys to add: [{name?, columns}]. Adding a key on a table with existing data preflights for duplicate rows and fails before any DDL if any are found.
_vault_skill_ackNoOpaque acknowledgement returned as vault_skill.ack_token. After applying that guide, retry the unchanged operation with this value. The bundled proxy supplies it automatically.
drop_unique_keysNoUNIQUE-key names to drop (as shown in unique_keys metadata).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed11 schema fields changedv2.0.14
    • addedInput schema / properties / _vault_skill_ack
      Added value: +{
      +  "description": "Opaque acknowledgement returned as vault_skill.ack_token. After applying that guide, retry the unchanged operation with this value. The bundled proxy supplies it automatically.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / add_columns / items / properties / check
      Added value: +{
      +  "type": "object"
      +}
    • addedInput schema / properties / add_columns / items / properties / default
      Added value: +{}
    • addedInput schema / properties / add_columns / items / properties / enum
      Added value: +{
      +  "type": "array"
      +}
    • addedInput schema / properties / add_columns / items / properties / index
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / add_columns / items / properties / on_delete
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / add_columns / items / properties / references
      Added value: +{
      +  "type": "object"
      +}
    • addedInput schema / properties / add_columns / items / properties / required
      Added value: +{
      +  "type": "boolean"
      +}
    • changedInput schema / properties / add_columns / items / properties / type / enum
      Previous value: -[
      -  "text",
      -  "number",
      -  "boolean",
      -  "date",
      -  "json"
      -]New value: +[
      +  "text",
      +  "int",
      +  "float",
      +  "numeric",
      +  "number",
      +  "boolean",
      +  "uuid",
      +  "date",
      +  "timestamp",
      +  "jsonb",
      +  "json",
      +  "text[]",
      +  "enum"
      +]
    • addedInput schema / properties / add_columns / items / properties / unique
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / alter_columns
      Added value: +{
      +  "description": "Rich column ops: [{name, set_default?, drop_default?, set_check?, drop_check?, set_not_null?, drop_not_null?, set_enum?/enum?, rename_enum_values?}]",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed4 schema fields changedv2.0.13
    • addedInput schema / properties / add_indexes
      Added value: +{
      +  "description": "Lookup indexes to add: [{name?, columns}]. A column is a bare string or {name, order} (order 'asc'|'desc').",
      +  "items": {
      +    "properties": {
      +      "columns": {
      +        "items": {
      +          "oneOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "properties": {
      +                "name": {
      +                  "type": "string"
      +                },
      +                "order": {
      +                  "enum": [
      +                    "asc",
      +                    "desc"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "name"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "columns"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / add_unique_keys
      Added value: +{
      +  "description": "UNIQUE keys to add: [{name?, columns}]. Adding a key on a table with existing data preflights for duplicate rows and fails before any DDL if any are found.",
      +  "items": {
      +    "properties": {
      +      "columns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "columns"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / drop_indexes
      Added value: +{
      +  "description": "Index names to drop (as shown in indexes metadata).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / drop_unique_keys
      Added value: +{
      +  "description": "UNIQUE-key names to drop (as shown in unique_keys metadata).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changedv2.0.7
    • changedInput schema / properties / uri / description
      Previous value: -"Table URI (akb://{vault}/table/{name})"New value: +"Table URI — akb://{vault}[/coll/{coll_path}]/table/{name}"
  4. Addedv2.0.4
  5. Removedv2.0.1
  6. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses that admin role is required and that it executes ALTER TABLE DDL, but it does not mention side effects, transactional behavior, reversibility, locking, or what happens if part of a multi-operation call fails. For a mutating DDL tool this is a significant transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded: it states the action, the target, and the key operations in a single sentence, then adds the access requirement. There is no filler or repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool with 10 parameters, nested objects, no output schema, and no annotations. The minimal description does not explain the variety of schema modifications available (indexes, unique keys, column alterations), when to use them, or what the operation returns. The schema covers parameter details, but the overall tool context is incomplete for an agent to invoke it confidently.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters, including add_columns, drop_columns, alter_columns, indexes, and unique keys. The description itself adds little beyond the general ALTER TABLE framing, but because the schema fully covers parameter semantics, the baseline of 3 is appropriate.

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 uses a specific verb ('Modify') and resource ('a table's schema'), and names the core operations: add, remove, or rename columns. It clearly conveys that this is an ALTER TABLE operation, distinguishing it from table creation/drop tools like akb_create_table and akb_drop_table, though it does not explicitly name those siblings.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives. It states that admin role is required, but there is no mention of when to prefer this over akb_sql or create/drop table, nor any exclusions or fallback conditions.

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

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/dnotitia/akb'

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