Skip to main content
Glama
tum-gis

3DCityDB MCP Server

Official
by tum-gis

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CITYDB_HOSTNoPostgreSQL hostlocalhost
CITYDB_NAMENoDatabase namecitydb
CITYDB_PORTNoPostgreSQL port5432
CITYDB_USERNoDatabase usercitydb
DATABASE_URLNoFull PostgreSQL URL (overrides individual connection variables)
CITYDB_SCHEMANo3DCityDB schema namecitydb
CITYDB_PASSWORDNoDatabase password (required if not using DATABASE_URL)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_database_schemaA

Returns the 3DCityDB v5 table structures, column details, and foreign key relationships. Called once and cached.

get_query_guidelinesA

Returns SQL best practices, indexed columns, optimization tips, and expensive operations to avoid for 3DCityDB queries.

scan_objectclassesA

Scans the database for existing object classes (e.g. Building, Vegetation, LandUse). Returns the full class hierarchy with superclass chain, namespace IDs, and schema definitions.

resolve_propertiesC

For a given objectclass_id, walks the superclass hierarchy, collects all schema-defined properties, filters against the property table to keep only existing properties, determines value columns and join info, and resolves codelists for Code-type properties. Returns fully enriched PropertyDefinitions.

get_generic_attributesA

Fetches generic attributes (namespace_id=3) with categorical detection. String attributes with few distinct values include all possible values. Numeric attributes include min/max range.

get_db_context_snapshotA

Returns database-level context: coordinate system, EPSG code, bounding box, feature counts per class, available LoDs, null value percentages, and supported spatial operations.

get_lod_configA

Returns available Levels of Detail in the database, with the most common LoD set as default.

get_examplesA

Returns SQL query examples filtered to only include examples for object classes that exist in the database.

run_queryA

Executes a read-only SQL query against 3DCityDB. Only SELECT and WITH (CTE) statements are allowed. Results are automatically limited to 500 rows.

get_session_contextB

Returns or creates the current user session context.

update_module_selectionB

Narrows the user's scope to specific object classes or modules. Affects which properties, examples, and codelists are relevant.

get_historyC

Returns the conversation history for a session.

submit_feedbackC

Logs feedback for a query execution (rating, errors).

assemble_promptA

Assembles the complete system prompt by orchestrating all static and dynamic tools. Returns a structured prompt string containing database schema, object classes with resolved properties and codelists, generic attributes, spatial context, and optionally SQL examples and query guidelines. Set include_query_agent_extras=false for non-query agents.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tum-gis/3dcitydb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server