Skip to main content
Glama
MadeByNando

MCP Postgres Server

by MadeByNando

get_constraints

Retrieve table constraints from a PostgreSQL database using the MCP Postgres Server. Specify schema and table names to extract detailed constraint information for efficient database management.

Instructions

Get constraints for a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
tableYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get constraints for a table', implying a read-only operation, but doesn't clarify aspects like whether it requires authentication, what happens if the table doesn't exist, or if there are rate limits. While it doesn't contradict annotations (since none exist), it fails to provide essential behavioral context for a tool with parameters and potential database interactions.

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 extremely concise with a single sentence, 'Get constraints for a table', which is front-loaded and wastes no words. Every part of the sentence contributes to the core purpose, making it efficient and easy to parse, though this brevity comes at the cost of detail.

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?

Given the tool's complexity (2 required parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain what 'constraints' entail, how results are returned, or error handling, leaving significant gaps for the agent. While conciseness is high, the lack of contextual details makes it inadequate for effective tool selection and invocation.

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?

The input schema has 2 parameters ('schema' and 'table') with 0% description coverage, meaning the schema provides no semantic details. The description 'Get constraints for a table' implies that 'table' is the target but doesn't explain the role of 'schema' (e.g., database schema name) or any constraints on these parameters. It adds minimal meaning beyond the schema, insufficient to compensate for the low coverage, resulting in poor parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get constraints for a table' states a clear verb ('Get') and resource ('constraints for a table'), which provides a basic understanding of the tool's function. However, it lacks specificity about what types of constraints are retrieved (e.g., primary keys, foreign keys, unique constraints) and doesn't differentiate from sibling tools like 'describe_table' or 'list_indexes', which might overlap in functionality. This makes the purpose somewhat vague but not misleading.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, such as needing specific permissions or database context, nor does it compare to sibling tools like 'describe_table' (which might include constraint info) or 'list_indexes' (which could relate to constraints). This absence leaves the agent without clear usage context, though it's not misleading.

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

Install Server

Other Tools

Related Tools

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/MadeByNando/mcp-postgres-server'

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