Skip to main content
Glama

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
NameRequiredDescriptionDefault
topicNoGet a specific section only. Available: core-rule, route-file, screen-ui, rules, benefits. Omit for full content.
compactNoIf 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) }],
      })
    );

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/ZaharGusyatin/react-native-expo-mcp'

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