Skip to main content
Glama
Northwind PostgreSQL MCP Server

Northwind PostgreSQL MCP Server

by mosesliao

query

Execute read-only SELECT or WITH SQL queries against the Northwind PostgreSQL database and return results as row dictionaries, capped at 500 rows.

Instructions

Execute a read-only SQL query and return results as a list of row dicts. Only SELECT and WITH (CTE) statements are allowed. Results are capped at 500 rows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it declares read-only intent, restricts statement types, and discloses the 500-row result cap. Gaps remain around failure behavior (what happens on a rejected write statement), timeouts, and whether the row cap is silent truncation or an error.

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?

Three short sentences, no waste, with the read-only nature and return format front-loaded and constraints following. Every sentence contributes a distinct fact.

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 single-parameter tool of low complexity with an output schema available, the definition covers the essentials: what it does, what is permitted, and how much comes back. Only error and truncation semantics are missing, which is a minor gap given the output schema covers the return shape.

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 0% for the single `sql` parameter, so the description must compensate, and it partially does by specifying which statement classes the string may contain. It adds no information about dialect, parameter binding/placeholders, or multi-statement handling, which matters for a free-form SQL string.

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?

"Execute a read-only SQL query" is a specific verb+resource and the return shape ("list of row dicts") is stated, so the tool's function is unambiguous. It does not explicitly distinguish itself from the introspection siblings (list_tables, describe_table, sample_table, get_schema), but the arbitrary-SQL purpose is distinct enough in practice.

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?

"Only SELECT and WITH (CTE) statements are allowed" is a hard constraint rather than when-to-use guidance, and it is the closest thing to routing advice present. Nothing says when an agent should prefer this over sample_table or describe_table for exploring a dataset.

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