get-screen-architecture
Learn screen architecture patterns for React Native Expo projects to separate logic from UI, improving testability and following SOLID principles. Use when creating new screens or routes.
Instructions
Get screen architecture patterns (Logic/UI separation). Call this when creating a new screen or route. Covers the Route file + ScreenUI file split, naming conventions, and why it matters for testability and SOLID principles. Use topic to get a specific section only.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Get a specific section only. Available: core-rule, route-file, screen-ui, rules, benefits. Omit for full content. | |
| compact | No | If true, returns rules only without code examples. Much shorter. |
Implementation Reference
- The handler function `getScreenArchitecture` that processes the pattern retrieval, using `resolvePattern` helper.
export const getScreenArchitecture = (topic?: string, compact?: boolean): string => resolvePattern(pattern, topic, compact); - src/index.ts:54-72 (registration)The registration of the `get-screen-architecture` MCP tool in the server instance.
server.tool( "get-screen-architecture", "Get screen architecture patterns (Logic/UI separation). Call this when creating a new screen or route. Covers the Route file + ScreenUI file split, naming conventions, and why it matters for testability and SOLID principles. Use `topic` to get a specific section only.", { topic: z .string() .optional() .describe( "Get a specific section only. Available: core-rule, route-file, screen-ui, rules, benefits. Omit for full content." ), compact: z .boolean() .optional() .describe("If true, returns rules only without code examples. Much shorter."), }, async ({ topic, compact }) => ({ content: [{ type: "text", text: getScreenArchitecture(topic, compact) }], }) );