Skip to main content
Glama

set_primary_key

Replaces a table's primary key with specified columns, supporting composite keys for database modeling.

Instructions

Alias of create_primary_key: replaces the table's primary key with the given columns (composite supported).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
columnsYes
dry_runNo
model_idYes
table_refYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It does disclose that the operation replaces the existing primary key and that composite columns are supported, which gives some meaningful behavioral context. However, it omits details about destructive consequences, whether dry_run affects behavior, failure conditions, or what happens to dependent schema objects.

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 a single lean sentence that front-loads the core action ('replaces the table's primary key with the given columns' before adding the composite note). No words are wasted and the alias reference is useful context rather than filler.

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 mutation tool with no annotations, no output schema, and five parameters with zero schema descriptions. The description explains the primary function but is missing important context: what dry_run does, how table_ref identifies the table, whether the operation fails or succeeds when no primary key exists, and what response to expect. An agent gets too little context to call it safely.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters beyond their names. The description only clarifies the meaning of 'columns', especially composite support, leaving model_id, table_ref, name, and dry_run entirely unexplained. This partial compensation warrants a low score.

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 uses a specific verb ('replaces') and resource ('the table's primary key'), and further clarifies that it is an alias of create_primary_key, which differentiates it from sibling tools. Composite key support is also stated. This is enough for an agent to know exactly what operation is performed.

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 by saying the tool replaces the primary key, but it gives no explicit guidance on when to choose set_primary_key versus create_primary_key or remove_primary_key. It doesn't state whether this is the preferred tool when a key already exists, nor does it mention any exclusions or alternatives beyond the alias mention.

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