preset_context_push
Push runtime UI context to Preset for context-aware guidance.
Reference
Parameters
- Name
componentName- Type
- string · required
- Description
Component being worked on (min 1)
- Name
currentProps- Type
- record · optional
- Description
Current props on the component
- Name
fileContext- Type
- string · optional
- Description
File path of the component
- Name
userIntent- Type
- string · optional
- Description
What you are trying to build or change
- Name
componentType- Type
- string · optional
- Description
Component category
- Name
parentComponent- Type
- string · optional
- Description
Parent component name
Returns
{
stored true when context was accepted
componentName The component context was stored for
scopedTools Which tools will now use this context
activeContexts Number of active context entries
}
Description
Push runtime UI context to Preset for context-aware guidance.
IMPORTANT: This is a WRITE tool. Call this BEFORE generating or validating code to tell Preset what you're working on. Subsequent tool calls (get_active_constraints, validate_code, etc.) will automatically scope their results to your context.
Parameters:
- componentName (required): Component being worked on (e.g., "LoginForm", "UserCard")
- currentProps (optional): Current props on the component (key-value pairs)
- fileContext (optional): File path (e.g., "src/components/auth/LoginForm.tsx")
- userIntent (optional): What you're trying to build or change
- componentType (optional): Component category (e.g., "form", "card", "modal")
- parentComponent (optional): Parent component name if nested
Context is in-memory only (not persisted) and expires after 30 minutes. Push again to refresh. Push different componentNames for multi-component work.
Source
Defined in packages/mcp/src/tools.ts.
The request handler lives alongside its registration in packages/mcp/src/tools/.