mcp-server
v7.6.0Model Context Protocol server for HyperFixi hyperscript development
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_patterns
Search the pattern database by keyword, optionally within one category (events, dom-manipulation, class-manipulation, visibility, forms, async, etc.). Unlike get_examples which takes task descriptions, this searches pattern names and content.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (e.g., "modal", "form validation", "infinite scroll") |
category | string | Filter by category (e.g., "class-manipulation", "visibility", "async") |
limit | number | Maximum number of patterns to return |
translate_to_english
Normalize non-English hyperscript to English. Returns English code plus explicit bracket syntax. Set getAllLanguages=true to get all 24 translations at once. Use when you receive code in Japanese, Korean, Arabic, etc. Code the parse cannot carry whole is refused (refused: true, with `lost` and the `partial` English), never returned as `english`.
| Parameter | Type | Description |
|---|---|---|
code * | string | Hyperscript code in source language |
sourceLanguage * | string | Source language code (ja, ko, es, ar, etc.) |
getAllLanguages | boolean | If true, return translations for all supported languages |
get_code_fixes
Get available auto-fixes for a specific error code or diagnostic — the repair half of the agent loop. When validate_and_compile reports a coded error, this returns LSP-compatible CodeFix suggestions to apply before re-validating.
| Parameter | Type | Description |
|---|---|---|
diagnosticCode | string | Diagnostic code from get_diagnostics (e.g., "parse-error", "missing-role") |
errorCode | string | A diagnostic code from validate_and_compile, translate_code or score_fidelity (e.g., "ENGINE_PARSE_ERROR", "UNCONSUMED_INPUT") |
listAll | boolean | If true, list all available error codes that have fixes |
get_diagnostics
Analyze hyperscript code and return LSP-compatible diagnostics with line/column ranges (errors, warnings, hints). English is checked by the engine that runs the code: a parse error is reported at the token where it stopped. Other languages (24 in all) are checked by the semantic parser.
| Parameter | Type | Description |
|---|---|---|
code * | string | The hyperscript code to analyze |
language | string | Language code (en, ko, ja, es, zh, ar, tr, pt, fr, de, id, qu, sw, etc.). Default: en |
uri | string | Optional document URI for caching (default: "inline") |
get_command_docs
Get documentation for a specific hyperscript command. Returns syntax, description, and usage details.
| Parameter | Type | Description |
|---|---|---|
command * | string | The command name (e.g., "toggle", "add", "fetch") |
get_expression_docs
Get documentation for hyperscript expression types. Returns description, category, operators, and examples.
| Parameter | Type | Description |
|---|---|---|
expression * | string | The expression name (e.g., "attribute-ref", "query-reference", "it") |
list_supported_languages
List all supported languages with their metadata (name, native name, direction, word order)
| Parameter | Type | Description |
|---|---|---|
includeDetails | boolean | Include full metadata for each language (default: true) |
get_keyword_translations
Get translations of a specific keyword/command across languages
| Parameter | Type | Description |
|---|---|---|
keyword * | string | The English keyword to look up (e.g., "toggle", "add", "remove", "put") |
languages | array | Optional: specific languages to include. If omitted, returns all languages. |
validate_and_compile
START HERE when generating hyperscript: parse into semantic IR with diagnostics. Returns action, roles, and trigger structure so you can check the parse matches your intent. Accepts natural language (code + language), explicit bracket syntax (explicit, e.g. "[toggle patient:.active destination:#btn]"), or LLM JSON (semantic: { action, roles, trigger }). Natural-language input must also parse on @hyperfixi/engine, the engine that runs it (ENGINE_PARSE_ERROR when it does not); for English the engine decides ok, and doubts from the semantic parser (LOW_CONFIDENCE, an unread role) are warnings tha…
| Parameter | Type | Description |
|---|---|---|
code | string | Natural language hyperscript |
confidence | number | Minimum confidence |
explicit | string | Explicit syntax |
language | string | Language code |
semantic | object | LLM JSON |
translate_code
Translate hyperscript between any of 24 languages via full semantic parsing — deterministic grammar transformation (SVO/SOV/VSO word order), not LLM translation. Every result carries a `verification` report (the output scored against the source via score_fidelity): verification.faithful === true is the claim "this rendering is structurally exact", so present it alongside the translation when showing code to a user for review. A variable the target language reads as a pronoun or another value word (tl `ako` is `me`) comes back as a NAME_COLLISION warning with a rename: rename it in the source…
| Parameter | Type | Description |
|---|---|---|
code * | string | Hyperscript code to translate |
from * | string | Source language code |
to * | string | Target language code |
score_fidelity
Score a candidate hyperscript snippet against a reference for structural fidelity — the multilingual CI ratchet's deterministic scorers applied to one pair. Returns actionRecall/multisetRecall/precision/roleFidelity/valueRecall (each 0–1), plus the exact missing/spurious actions and lost invariant values (e.g. a silently rewritten target: toggle.destination=#panel). Sides accept any input format and may be in DIFFERENT languages, so it also verifies a translation preserved meaning. Use after editing or translating code to prove the result faithful; diff_behaviors answers identical-or-not,…
| Parameter | Type | Description |
|---|---|---|
candidate * | object | The side being checked (same shape as reference) |
reference * | object | The trusted side (code/explicit/semantic + language) |
confidence | number | Minimum confidence threshold |
diff_behaviors
Compare two hyperscript inputs at the behavior level. Returns whether they are semantically identical, trigger diffs, and per-operation diffs. Works across languages and input formats.
| Parameter | Type | Description |
|---|---|---|
a * | object | First input (code, explicit, or semantic) |
b * | object | Second input (code, explicit, or semantic) |
confidence | number | Minimum confidence threshold |
detect_domain
Auto-detect which registered domain handles the input. Tries all domains (sql, todo, behaviorspec, llm, flow, voice) and returns the best match by confidence score.
| Parameter | Type | Description |
|---|---|---|
input * | string | The natural-language input to classify |
language | string | Language code (en, es, ja, ar, ko, zh, tr, fr). Default: en |
compile_auto
Auto-detect domain and compile in one shot. Returns compiled output along with the detected domain name.
| Parameter | Type | Description |
|---|---|---|
input * | string | The natural-language input to compile |
language | string | Language code (en, es, ja, ar, ko, zh, tr, fr). Default: en |