Skip to main content

Tools

The MCP server provides a set of tools that AI calls automatically when performing tasks.

Code Generation​

generate_schema​

Get template and rules for creating FormSchema.

Parameters:

ParameterTypeDescription
formTypestringForm type: "registration", "checkout", "settings", etc.

Returns:

  • Type to component mapping (string β†’ Input, boolean β†’ Checkbox, etc.)
  • Document masks for Russian documents (phone, INN, SNILS, passport)
  • Schema structure rules
  • Real project examples

generate_types​

Get template and rules for TypeScript form types.

Parameters:

ParameterTypeDescription
formTypestringForm type for context

Returns:

  • Interface naming rules
  • Typing rules (undefined instead of null, no index signatures)
  • Type examples

generate_validation​

Get template and rules for ValidationSchema.

Parameters:

ParameterTypeDescription
formTypestringForm type for context

Returns:

  • List of all built-in validators
  • Usage syntax
  • Import rules (@reformer/core/validators)
  • Validation examples

generate_behavior​

Get template and rules for BehaviorSchema.

Parameters:

ParameterTypeDescription
formTypestringForm type for context

Returns:

  • List of all behaviors (computeFrom, enableWhen, etc.)
  • Usage syntax
  • Import rules (@reformer/core/behaviors)
  • Behavior examples

Quality Checking​

check_code​

Analyze form code for errors and quality issues.

Parameters:

ParameterTypeRequiredDescription
codestringYesTypeScript code to analyze

Returns:

  • Quality score (0-100 points)
  • List of errors with explanations
  • Warnings
  • Fix recommendations

Checked rules:

  • Correct validator and behavior imports
  • Presence of value in every field
  • Use of useMemo for createForm
  • Call to markAsTouched on blur
  • Type checking before submission

Development Assistance​

explain_error​

Explain a ReFormer error with fix examples.

Parameters:

ParameterTypeRequiredDescription
errorstringYesError text or problem description

Recognized issues:

  • Field not updating on input
  • Validation not triggering
  • TypeScript type errors
  • Form recreated on every render
  • Cannot read property / undefined
  • Array index out of bounds

get_pattern​

Get usage pattern example.

Parameters:

ParameterTypeRequiredDescription
patternstringYesPattern name

Available patterns:

  • conditional-fields β€” conditional field display
  • computed-fields β€” computed fields
  • cross-field-validation β€” cross-field validation
  • async-validation β€” async validation
  • array-fields β€” working with arrays
  • multi-step-form β€” multi-step forms
  • form-submission β€” form submission

Get recommended project file structure.

Parameters:

ParameterTypeDescription
complexitystringComplexity: "simple", "medium", "complex"

Returns:

  • Folder structure
  • File separation (types, schema, validation, behavior)
  • Naming conventions

Feedback Collection​

report_issue​

Report an error and its solution for feedback collection.

Parameters:

ParameterTypeRequiredDescription
errorstringYesError message or problem description
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:minorIssue severity

Returns:

Confirmation of successful report submission.

How it works:

  1. AI encounters an error while working with ReFormer
  2. AI solves the problem
  3. AI calls report_issue with error description and solution
  4. Data is saved locally to ~/.reformer/issues.jsonl

Example usage:

AI found error: "Cycle detected in computeFrom"
AI identified cause: effect depends on 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 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 (JSONL):

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

Each line is a separate JSON object. This allows easy appending and data analysis.

Why collect feedback?​

Issue reports help:

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

All data is stored locally on your computer.