Skip to main content
Glama

get-table-constraints

get-table-constraints

Retrieves PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, and CHECK constraints for a table, listing constrained columns and references.

Instructions

Returns PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, and CHECK constraints for a table, including constrained columns and references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table whose relational metadata should be returned

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.10.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Returns' implies a read-only operation, and the description adds useful output context about constrained columns and references, but it does not disclose error behavior, schema qualification, or explicitly confirm a lack of side effects beyond the verb's implication.

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 compact sentence, front-loaded with the action and main resource, and it lists the constraint types without filler or repetition of the parameter schema.

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

Completeness4/5

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

For a simple one-parameter, read-only metadata tool, the description is broad enough to let an agent invoke it correctly: it states what is returned (PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK) and that columns and references are included. It does not describe the exact return structure, but the low complexity and the fact that no output schema is present make this acceptable.

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?

The only parameter, tableName, is already described in the schema with equivalent wording ('Name of the table whose relational metadata should be returned'). The description adds no additional format, casing, or schema-qualification details. With 100% schema coverage, the baseline of 3 applies.

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 ('Returns') and identifies the exact resource (constraints for a table) while enumerating the covered constraint types and the inclusion of columns and references. It is clear and distinct from siblings like get-table-indexes and get-table-triggers, though it does not explicitly name an alternative to differentiate from.

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?

There is no guidance on when to use this tool versus alternatives such as describe-table, get-table-indexes, or execute-query, and no exclusions or prerequisites are mentioned. The only usage signal is the implicit one from the purpose statement, which is not explicit routing guidance.

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