Skip to main content
Glama
markacianfrani

Rules MCP Server

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 } ] }; } );
  • 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 } ] }; }
  • 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```";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/markacianfrani/mcp-pattern-language'

If you have feedback or need assistance with the MCP directory API, please join our Discord server