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

MCPg - Production-grade PostgreSQL MCP Server

Describe property graph

describe_property_graph
Read-only

Retrieve a property graph's schema, vertex tables, and edge tables by schema-qualified name, so agents can inspect full membership before composing PGQ queries. Requires PostgreSQL 19+.

Instructions

Describe one SQL/PGQ property graph by schema-qualified name. Requires PG 19+; raises an error otherwise. Useful when an agent has located a graph via list_property_graphs and needs the full membership before composing a run_pgq query. Returns an object with schema, name, vertex_tables (list of schema.table strings), and edge_tables (same shape).

Example: describe_property_graph(schema='public', name='org_chart')

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": "<name>"
    },
    "name": "describe_property_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
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
nameYes
schemaYes
edge_tablesYes
vertex_tablesYes

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.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely new behavior in the PG 19+ version gate and the fact that it raises an error otherwise. It also enumerates the returned fields (`schema`, `name`, `vertex_tables`, `edge_tables`), though that information is largely duplicated by the existing output schema.

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?

Three tight sentences plus an example; the version gate and usage path are front-loaded before the return-shape detail. The example is mildly redundant with the parameter names but cheap and clarifying.

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?

The description covers version requirements, error behavior, call-site context, and return contents, and an output schema exists so return details need not be fully restated. The one real hole is the undocumented `database` parameter for secondary read-only targets, which an agent could easily overlook.

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 33%: `schema` and `name` have no schema descriptions, and the third parameter `database` (targeting a configured secondary read-only database) is never mentioned in the description. The worked example (`describe_property_graph(schema='public', name='org_chart')`) partially compensates for the two required params, but the multi-database targeting behavior is left entirely to the schema.

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 concrete verb and resource ("Describe one SQL/PGQ property graph by schema-qualified name") and scopes it to a single object, which separates it from the list-style siblings. The "SQL/PGQ" qualifier implicitly distinguishes it from the Apache AGE-oriented `describe_graph`/`list_graphs` tools, and it is not a tautology of the title.

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

Usage Guidelines4/5

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

Gives a clear upstream/downstream chain: locate the graph with `list_property_graphs`, then call this, then compose a `run_pgq` query. It does not explicitly say when NOT to use it (e.g., when `describe_graph` is the right tool for non-PGQ graphs), so the routing is strong but not exhaustive.

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