3DCityDB MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CITYDB_HOST | No | PostgreSQL host | localhost |
| CITYDB_NAME | No | Database name | citydb |
| CITYDB_PORT | No | PostgreSQL port | 5432 |
| CITYDB_USER | No | Database user | citydb |
| DATABASE_URL | No | Full PostgreSQL URL (overrides individual connection variables) | |
| CITYDB_SCHEMA | No | 3DCityDB schema name | citydb |
| CITYDB_PASSWORD | No | Database password (required if not using DATABASE_URL) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
All 14 tools have clearly distinct purposes—retrieving different types of metadata (schema, context, examples, attributes, etc.), executing queries, scanning object classes, updating module selections, and submitting feedback. No two tools overlap in functionality.
Every tool follows the consistent verb_noun pattern using snake_case (e.g., get_database_schema, run_query, submit_feedback). Minor abbreviation ('db' vs 'database') is common and does not break consistency.
14 tools is well-suited for a 3DCityDB query agent—covering metadata retrieval, query execution, configuration, and feedback without excess or deficiency. The count feels appropriate for the domain.
The tool set covers all necessary operations for a read-only query agent: database introspection (schema, context, classes, attributes), query building guidance (examples, guidelines), query execution, session management, and feedback logging. No obvious gaps exist for the stated purpose.