Skip to main content

get_active_constraints

Returns context-aware constraints based on the current file or component type.

Reference

Parameters

  • Name
    filePath
    Type
    string · optional
    Description

    Current file path being edited

  • Name
    intent
    Type
    string · optional
    Description

    What you are trying to build

  • Name
    layerId
    Type
    string · optional
    Description

    Layer UUID for layer-specific rule resolution (uuid)

Description

Returns context-aware constraints based on the current file or component type.

Parameters:

  • filePath: Current file being edited (e.g., "src/forms/LoginForm.tsx")
  • intent: Natural language description of what's being built

Returns constraints specific to the context:

  • Which components MUST be used
  • Which presets are recommended
  • File-specific rules

Use this BEFORE writing code to understand what's required for the context.

Source

Defined in packages/mcp/src/tools.ts. The request handler lives alongside its registration in packages/mcp/src/tools/.

Was this page helpful?

Last reviewed by @jschuyler