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 its next item first, then every warning, then back to 2.finishonce lint is clean, before export: it adds what the plan lacks and deletes nothing. With a shell, the CLI runs the same loop at no context cost:archlang <cmd>, ornpx -y @chanmeng666/archlang <cmd>without a global install. Every tool, command, limit and export format: thearchlang://capabilitiesresource.
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 ( |
| 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. |
| explainA | Look up an E_/W_ diagnostic code in the catalogue: what it means, why it is raised and how to resolve it, with an example that raises it and, for most codes when the installed core has them, |
| 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. |
| capabilities | Every tool both servers serve and the ones only the hosted server adds, every CLI command, the codes `fix` resolves by applicability, the export formats, the limits, what it does not do, and the authoring loop, generated from the tool lists, the CLI manifest and the fix producers. |
TDQS
Scored across 12 tools
Most tools have clearly distinct purposes, and the descriptions explicitly disambiguate adjacent pairs (fix vs repair, finish vs suggest, lint vs validate). The main overlap is among checking tools (compile, validate, lint), but their outputs and gating roles are spelled out. A few corrective tools (fix, repair, finish) could still be confused without reading the descriptions closely.
All twelve names are single-word lowercase verbs (fix, compile, describe, lint, validate, score, repair, finish, suggest, complete, explain, link). There is no mixing of conventions, prefixes, or casing styles.
Twelve tools is well within a sensible range for a language/DSL server, and each tool covers a distinct stage: compile, validate, lint, describe, score, fix, repair, finish, suggest, complete, explain, link. None feels redundant or out of scope.
The surface covers authoring (complete), compilation, validation, linting, source fixes, furniture repair, finishing, suggestions, scoring, diagnostic explanation, and share links. Minor gaps exist, such as a dedicated format/prettify tool or a way to list all diagnostic codes at once, but these are workable omissions.