Skip to main content
Glama

list_constraints

Inspect a table's primary key, foreign key, unique, and check constraints, including columns and references, to understand its structure and relationships.

Instructions

List constraints on a table (primary key, foreign key, unique, check) with their columns and references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name.
schemaNoSchema (owner) of the object. Optional — defaults to the server's current schema; omit rather than guess.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.3

TDQS

A3.6/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. It discloses the return contents (constraint types with columns and references), but says nothing about permissions, row limits, or pagination for what is presumably a read-only listing.

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?

A single front-loaded sentence that names the resource first and then the returned fields. Zero waste, no filler.

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 two-parameter read tool with no output schema, the description covers what is listed and what the entries contain. The lack of a stated return shape is a minor gap but acceptable given the tool's simplicity and full schema coverage.

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 coverage is 100% and both parameters (table, schema) are fully documented in the schema, including the 'omit rather than guess' default note. The description adds no parameter detail beyond the schema, so baseline 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?

States a specific verb (list) and resource (constraints on a table), and enumerates the constraint types returned (primary key, foreign key, unique, check). This clearly separates it from list_indexes and describe_table, though it never names a sibling explicitly.

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?

Usage is implied by the resource — you call it to enumerate a table's constraints — but there is no explicit when-to-use guidance and no mention of alternatives like get_ddl or validate_fk_integrity that overlap in the integrity domain.

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