get_rules_for_composing_ui
Retrieve guidelines for creating UI components, including patterns and preferences, to ensure consistent design and implementation from the start of development.
Instructions
Use when: creating new frontend components, designing component APIs, structuring component hierarchies, implementing component interactions, or making styling decisions.
What it provides: Comprehensive guidelines for creating new UI components.
How to use: Invoke this tool at the START of any UI component work to retrieve user-specific UI patterns and preferences, then follow these guidelines throughout the component lifecycle.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.ts:94-115 (registration)Registration of the 'get_rules_for_composing_ui' tool, including description, empty schema, and inline handler that returns UI_INSTRUCTIONS as text content.server.tool( "get_rules_for_composing_ui", ` Use when: creating new frontend components, designing component APIs, structuring component hierarchies, implementing component interactions, or making styling decisions. What it provides: Comprehensive guidelines for creating new UI components. How to use: Invoke this tool at the START of any UI component work to retrieve user-specific UI patterns and preferences, then follow these guidelines throughout the component lifecycle. `, {}, async (): Promise<CallToolResult> => { return { content: [ { type: "text", text: UI_INSTRUCTIONS } ] }; } );
- src/mcp-server.ts:105-114 (handler)Inline handler function for the tool that simply returns the UI_INSTRUCTIONS constant as text response.async (): Promise<CallToolResult> => { return { content: [ { type: "text", text: UI_INSTRUCTIONS } ] }; }
- src/generated/instructions.ts:11-11 (helper)The UI_INSTRUCTIONS constant containing the rules for composing UI, returned by the tool handler.export const UI_INSTRUCTIONS = "# UI Composition Instructions\n\nFavor declarative composition and avoid soul crushing props. \n\n### Do \n```\n<a-list>\n\t<a-list-item>1</a-list-item>\n\t<a-list-item>2</a-list-item>\n\t<a-list-item>3</a-list-item>\n</a-list>\n```\n\n### Don't\n```\n<a-list items=[{},{}[{}]]></a-list-item>\n```";