Skip to main content
Glama
CityEngine Cloud MCP Server

CityEngine Cloud MCP Server

generate_cga

Generate CGA rule source code from a natural-language building description or apply text instructions to existing CGA rules for CityEngine; returns editable source for parsing or model generation.

Instructions

自然语言一句话 → NL2CGA → CGA 规则源码(不渲染,同步返回)。

两种模式二选一:

  1. text:自然语言描述,如「三层小楼,坡屋顶,底层商铺」。

  2. base_cga + instruction:在既有 CGA 上按指令修改(如「把立面材质改成红砖」)。

LLM 兜底模式最长约 90s,属正常现象。

Returns: cga_source(可喂给 parse_cga / generate_model 的 cga_edit 回传)、 engine_path(self/kimi_fallback/hybrid)、warnings、usage。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_cga"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
base_cgaNo
instructionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does well: it discloses synchronous execution, that no rendering happens, that the LLM fallback path can take ~90s and that this is normal, and that engine_path reports which path ran (self/kimi_fallback/hybrid). It leaves error/failure behavior and any permission requirements unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded in the first line, the two modes are enumerated compactly, and the latency caveat and return fields each get a single line. Every block adds decision-relevant information and there is no filler.

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?

Given no annotations and no output schema, the description compensates by documenting the return fields (cga_source, engine_path, warnings, usage) and the latency profile. It is nearly complete for an agent to call it correctly; only edge cases (no arguments, contradictory mode combinations, failure behavior) are left open.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must define all three parameters and it does: text is a plain natural-language description, base_cga is an existing CGA to be modified, and instruction is the modification directive applied to it, plus the mutual-exclusivity constraint the schema cannot express. It does not say explicitly that base_cga should be a prior cga_source, nor what happens if base_cga is sent without instruction.

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?

The description states a specific transformation: natural-language input becomes CGA rule source, explicitly non-rendering and synchronous. It also disambiguates from siblings by pointing the returned cga_source at parse_cga / generate_model's cga_edit, so an agent knows this is the up-stream authoring step rather than the render step.

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?

The two modes are spelled out as mutually exclusive (『两种模式二选一』) with a concrete example for each, which tells the agent exactly which parameter combination to pick. It does not state what happens when neither mode is supplied, nor when to skip this tool in favour of calling generate_model directly, so the exclusion side is only partial.

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