Skip to main content

Tools

The MCP server provides tools the AI can call to perform tasks. It is convenient to group them by the steps of working on a form.

StepTools
Figure out which APIchoose_api (requirement in your own words β†’ operator), get_context (context for a build step)
Find reference materialget_symbol_docs, list_symbols, find_recipe, search_docs
Build the formplan_form (spec β†’ FormIntent), generate_form (FormIntent β†’ form files)
Checkvalidate_form: kind = code, json-schema, behaviors, bundle, layout
Report a problemreport_issue

The role of each tool is described in the Overview. Below are the details of validate_form and report_issue.

validate_form​

Checks a form before it runs. Returns RF0xx diagnostics with the line, a "what to do" hint and the next call to make.

kindWhat it checks
codeThe form's TypeScript: unknown or wrongly imported @reformer symbols, operators outside their schema, removed API
json-schemaa renderer-json schema document
behaviorscompute cycles β€” from a list of { target, reads[] }
bundlethe FormIntent and the schema as a whole, cross-checked against each other
layoutthe form module's file names against the canonical set (form.schema.ts, form.behavior.ts, form.validation.ts, …)

report_issue​

Submits a report about an error and its solution for feedback collection.

Parameters:

ParameterTypeRequiredDescription
errorstringYesDescription of the error or problem
solutionstringYesSolution or fix
tagsstring[]NoTags for categorization and analytics
contextobjectNoAdditional context (see below)

Structure of context:

FieldTypeDescription
examplesarrayCode examples with descriptions
examples[].descriptionstringExample description
examples[].codestringExample code
relatedFilesstring[]Paths to related files
notesstringAdditional notes

Recommended tags:

FormatExampleDescription
category:<type>category:behavior, category:validationCategory: schema, validation, behavior, react, types, other
agent:<name>agent:claude, agent:cursorAI agent name
severity:<level>severity:critical, severity:minorProblem severity

Returns:

Confirmation that the report was written successfully.

How it works:

  1. The AI encounters an error while working with ReFormer
  2. The AI solves the problem
  3. The AI calls report_issue with a description of the error and the solution
  4. The report is saved locally as a separate file β€” <project root>/.reformer/issue_reports/<timestamp>-<slug>.json

The directory can be overridden with the REFORMER_ISSUE_REPORTS_DIR environment variable (a relative path is resolved against the server's working directory). The project root is the nearest package.json with dependencies found upward from cwd; if there is none, reports are placed directly in cwd. The server returns the exact path in its response.

Example of AI usage:

AI found an error: "Cycle detected in computeFrom"
AI identified the cause: effect depends on the target field
AI calls report_issue:
- error: "Infinite loop in computeFrom when effect depends on target"
- solution: "Use peek() instead of .value to read target without dependency"
- tags: ["category:behavior", "agent:claude", "severity:critical"]
- context:
examples:
- description: "Wrong - creates a dependency"
code: "const current = targetNode.value.value;"
- description: "Correct - no dependency"
code: "const current = targetNode.value.peek();"
relatedFiles: ["packages/reformer/src/core/behavior/behaviors/compute-from.ts"]

Storage format (JSON):

One report per file, pretty-printed with indentation:

{
"timestamp": "2026-01-15T10:30:00.000Z",
"error": "...",
"solution": "...",
"tags": ["category:behavior"],
"context": { "examples": [], "notes": "..." }
}

The file name is made of the timestamp and a short slug of the error. If two reports land in the same millisecond, a -2, -3, … suffix is added to the name β€” an existing file is never overwritten.

Why collect feedback?​

Error reports help to:

  • Identify common user problems
  • Improve the documentation
  • Find bugs in the library
  • Understand which patterns cause difficulties

All data is stored locally on your computer.