ArchLang
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
ArchLang compiles .arch text to SVG floor plans. Before writing any .arch, read the archlang://spec resource: the whole language (from a shell: npx -y @chanmeng666/archlang spec).
The loop:
Write the plan as
.archsource.compileit. Errors are diagnostics, usually with a byte span, often a fix;fixapplies the machine-applicable ones, edit the rest by hand.describeit; check rooms, areas and doors against the brief.validatewith strict:true (parse, resolve,lint); fix every warning, then back to 2.finishonce lint is clean, before export: it furnishes empty rectangular rooms on every storey and adds the missing sheet statements (paper, scale, dimensions, title, room schedule, legend). With a shell, the CLI runs the same loop at no context cost:archlang <cmd>, ornpx -y @chanmeng666/archlang <cmd>without a global install.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| compileA | Compile ArchLang |
| describeA | Report a plan's facts without rendering, so you can check it against the brief without looking at an image. Returns rooms (area, bbox, adjacency, use, and the exact shape: |
| lintA | List advisory architectural-soundness warnings ( |
| validateA | Check a plan in one pass without returning a drawing (parse, resolve and lint): the gate a plan passes before it ships. |
| scoreA | Measure how much of a brief's intent JSON a plan satisfies, without gating. Returns { ok, satisfied, total, score, subscores, violations }, where |
| repairA | Correct furniture placement and return the corrected |
| fixA | Apply the machine-applicable fixes attached to a plan's compile diagnostics and return the edited source. It corrects source-level faults (an opening off its wall becomes the attachment form, an out-of-range position is clamped, …); furniture geometry is |
| finishA | Complete a plan for export by adding what it lacks; run it once |
| suggestA | Suggest the doors and windows a plan's room graph needs, as data; nothing is applied. For a room with no path back, a building with no entrance, a bath reachable only through a bedroom, or a windowless bedroom, it returns ready-to-paste |
| completeA | List the completion items in scope at a source byte offset: keywords, element names, ids and enum values, the same items an editor's language server offers. For structured or assisted authoring. |
| linkA | Make two URLs that show a plan in the browser with nothing to install, for handing to a person. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| spec | The whole ArchLang language on one page. Read it before writing any `.arch`. |
| context | The spec, the authoring workflow, the CLI reference and the error catalog in one document, for a system prompt. |
| schema | JSON Schema (2020-12) for the Plan-JSON object `compile` accepts as `plan_json`. |
| grammar | GBNF grammar that constrains generation to ArchLang's statement shapes; it is looser than the parser, which remains the authority. |
| intent-schema | JSON Schema (2020-12) for a brief's Intent — the shape `validate`'s `intent` and `score`'s `brief` take. |
TDQS
Scored across 11 tools
Most tools have clearly distinct purposes, but a few pairs require careful reading: fix vs repair both edit source, lint vs validate both report diagnostics, and score vs validate both check intent. The descriptions explicitly delineate these boundaries, so misselection is unlikely but not impossible.
All tool names are single lowercase imperative verbs with no mixed conventions or underscores. The pattern is predictable throughout the set.
Eleven tools is well within the appropriate range for a language tooling server covering authoring, validation, repair, finishing, and sharing. Each tool appears to earn its place without obvious redundancy.
The surface covers the full lifecycle: completion, compile, validate, lint, fix, repair, suggest, finish, describe, score, and link. Minor gaps like a dedicated format/explain tool are not critical, as compile and diagnostics cover those needs.