Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

Lint naming conventions

lint_naming_conventions
Read-only

Detect inconsistent table, column, and index naming in a PostgreSQL schema by identifying the majority style per schema and table, flagging outliers, and checking index prefixes.

Instructions

Lint table / column / index naming in a schema. Detects the majority case style (snake_case / camelCase / PascalCase / SCREAMING_SNAKE) per schema and per table, then flags outliers. Also flags indexes whose names do not start with a conventional prefix (idx_, ix_, pk_, uq_, fk_ by default). Findings carry the offender's style and the detected majority — agents can use the style field to filter for renames vs accept-as-is. Pure read. Returns an object with schema_style (detected majority), findings (list of style outliers), and index_prefix_findings (indexes with non-conventional prefixes).

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": {
      "schema": "<schema>"
    },
    "name": "lint_naming_conventions"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaYes
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
schemaYes
findingsYes
schema_majority_styleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint=false, and the description reinforces that with 'Pure read' rather than contradicting it. It adds real behavioral detail beyond the annotations: how the majority style is detected per schema and per table, the default prefix set (idx_, ix_, pk_, uq_, fk_), and the shape of findings; it does not mention cost or permissions, but those are minor here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and detection logic are front-loaded and efficient, but the final sentence enumerating `schema_style`, `findings`, and `index_prefix_findings` largely restates the output schema that is already supplied, spending words on information the agent already has.

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 two-parameter read-only linter with a full output schema and readOnly/openWorld annotations, the description covers detection logic, defaults, and how to triage findings — enough to call it correctly. It does not discuss multi-database targeting or output volume, but the schema covers the former and the output schema covers the latter.

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

Parameters4/5

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

With only 50% schema coverage, the description compensates by making the scope of `schema` concrete — majority style is computed per schema and per table within that schema. It adds nothing about the `database` parameter, but that parameter is fully documented in the schema itself (configured read-only secondary ids, rejection of unconfigured names).

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?

States a specific verb (lint) and precise resource scope (table/column/index naming in a schema), and the detection rules described (majority-case style per schema and per table, index prefix conventions) make it clearly distinguishable from siblings like run_advisors or compare_schemas.

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 context is implied by the purpose and the description explains how to act on results ('agents can use the style field to filter for renames vs accept-as-is'), but it never states when to choose this over alternatives such as run_advisors or audit_database, nor any when-not conditions.

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

Deploy Server

Other Tools