Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Generate jOOQ config

generate_jooq_config
Read-only

Read a PostgreSQL schema and emit a jooq-codegen configuration XML pointing at it. Unlike the other exporters, jOOQ generates Java code itself from a live database — the artefact here is the configuration file the user feeds to mvn…

Instructions

Read a PostgreSQL schema and emit a jooq-codegen configuration XML pointing at it. Unlike the other exporters, jOOQ generates Java code itself from a live database — the artefact here is the configuration file the user feeds to mvn jooq-codegen:generate (or the Gradle task). The XML lists every base table explicitly via an regex, excludes MCPg's bookkeeping tables, and emits a for every json / jsonb column so they map to org.jooq.JSON / org.jooq.JSONB out of the box. Default Java package is com.example.jooq; override via the target_package arg. Schema/table/column names must be plain identifiers ([A-Za-z_][A-Za-z0-9_]*); delimited names (hyphens, spaces, mixed-case-only) are not supported here because they become source identifiers in generated code — use SQL tools (export_table, dump_database) for those objects. See docs/identifier-policy.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.
target_packageNocom.example.jooq
target_directoryNosrc/main/java

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.8

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover readOnlyHint and openWorldHint, yet the description discloses substantial behavior beyond them: the artefact is an XML file consumed by mvn jooq-codegen:generate or the Gradle task, tables are listed via an <includes> regex, MCPg bookkeeping tables are excluded, and a <forcedType> is emitted for every json/jsonb column. These are the exact traits an agent needs to predict the output and its side effects.

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

Conciseness4/5

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

Front-loaded with the core purpose, then the distinguishing detail, then the constraint and alternative. Every sentence carries information, though the closing identifier-policy sentence is somewhat dense. Length is justified by the complexity.

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

Completeness5/5

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

With an output schema present, the description need not explain return values, and it already covers the artefact, its consumers, the includes/forcedType behavior, the identifier constraint, and alternatives. The only thin spot is target_directory, which is a minor omission for a tool this well-specified.

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 description coverage is only 25%, so the description must compensate. It does explain target_package (default com.example.jooq) and imposes the identifier policy on schema/table/column names, but it never mentions target_directory or clarifies the database parameter's semantics beyond what the schema already documents. Partial compensation only.

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 and resource (read a PostgreSQL schema, emit a jooq-codegen configuration XML) and immediately differentiates from the other generation exporters by explaining that jOOQ generates Java itself from a live DB and the artefact here is only the config file. An agent can distinguish this from generate_prisma_schema / generate_drizzle_schema without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use it (plain identifiers, base tables) and when not to (delimited names with hyphens, spaces, or mixed-case), naming the alternative tools (export_table, dump_database) and pointing to docs/identifier-policy.md. This is textbook when/when-not/alternative guidance.

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