Query Tools

Schema discovery for databases, tables, columns, and available tools

Explore available data sources to prevent query errors and build dynamic UIs. Provides schema information about databases, tables, columns, operators, and available MCP tools.

Scopes:

  • tools: List all available MCP tools by category
  • databases: Available databases (mastr_db, energy_charts_api, etc.)
  • tables: Tables in a specific database (requires database parameter)
  • columns: Columns in a table (requires database + table parameters)
  • operators: Available grid operators and energy suppliers
  • locations: Available regions, states, and postal codes (optional region filter)
  • examples: Sample queries for common use cases

Use Cases:

  • Prevent query errors (validate parameters before execution)
  • Build dynamic UIs with available options
  • Explore data structure without documentation
  • Auto-complete functionality for query builders
  • Validate grid operator names before queries
post/api/query/discover

Request

  • Base URL: https://api.cernion.de
  • URL: https://api.cernion.de/api/query/discover
  • Auth: none declared

Query parameters

tokenstring

Optional Cernion MCP token as URL query parameter. If provided, it overrides CERNION_TOKEN for this request. Prefer Authorization Bearer header in production to reduce token exposure in URLs/logs.

Request body

scope'tools' | 'databases' | 'tables' | 'columns' | 'operators' | 'locations' | 'examples' required

Discovery scope - what to explore

databasestring

Database name (required for tables/columns scope)

tablestring

Table name (required for columns scope)

regionstring

Optional filter for locations scope

tokenstring

Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

Example request

{
  "scope": "databases",
  "database": "mastr_db",
  "table": "solar_extended",
  "region": "Baden-Württemberg"
}

Response

Discovery result with requested information

successboolean
scopestring
dataobject

Discovery results (structure depends on scope)

metadataobject

Example response

{
  "success": true,
  "scope": "databases"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.