Skip to main content
Glama
cityjson-mcp

cityjson-mcp

by Yarroudh

Import CityJSON into cjdb

cityjson_db_import

Converts a CityJSON dataset to CityJSONSeq with cjio, then imports it into PostgreSQL/PostGIS using cjdb; supply the database password through PGPASSWORD.

Instructions

Convert the dataset to CityJSONSeq with cjio and import it into PostgreSQL/PostGIS using cjdb. PostgreSQL password should be supplied through PGPASSWORD, not tool arguments.

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": {
      "dataset_id": "<dataset_id>",
      "connection": "<connection>"
    },
    "name": "cityjson_db_import"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionYes
dataset_idYesFilename returned by cityjson_open, cityjson_import, or a transformation. Internal dataset handles also work for compatibility.
attribute_indexesNo
partial_attribute_indexesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedInput schema / properties / dataset_id / description
      Previous value: -"Dataset handle returned by cityjson_import, cityjson_open, cityjson_import_text, or another transformation tool."New value: +"Filename returned by cityjson_open, cityjson_import, or a transformation. Internal dataset handles also work for compatibility."
  2. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With zero annotations the description carries the full burden, and it does disclose the real pipeline (cjio conversion to CityJSONSeq before cjdb ingest) plus an authentication requirement: the password must come from the PGPASSWORD environment variable rather than arguments. It says nothing about what tables/rows are created, whether existing data is overwritten, or how failures are handled, which matters for a write-to-database operation.

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?

Two short sentences, front-loaded with the conversion/import pipeline and followed by the credential constraint. Nothing is padded, though the auth note could have been folded into a fuller usage sentence.

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

Completeness3/5

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

For a tool that converts and writes data into a database with no annotations and no output schema, the description covers the what and the auth mechanism but leaves the agent guessing about index parameters, target table naming, and idempotency. Adequate as a starting point, but not sufficient for confident invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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, and it does not: attribute_indexes and partial_attribute_indexes are undocumented in both places, and the nested connection fields (host, user, database, schema) carry no descriptions. The only parameter-adjacent information is the negative statement that no password argument exists, which is useful but narrow.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs and resources: convert the dataset to CityJSONSeq with cjio, then import it into PostgreSQL/PostGIS using cjdb. That distinguishes it from generic siblings like cityjson_import or cityjson_save because it names the exact target and toolchain, though it never explicitly contrasts itself with cityjson_import or cityjson_db_export.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance and no stated alternatives, so the agent has to infer that this (rather than cityjson_import or cityjson_export) is the path to a PostGIS database. The PGPASSWORD note is an operational prerequisite, not selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.