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) }],
      })
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes what the tool returns (architecture patterns, rules, benefits) and mentions the compact parameter for shorter output. However, it doesn't disclose important behavioral aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or error conditions. The description adds some context but leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized (3 sentences) and front-loaded with the core purpose. The first sentence states what the tool does, the second provides usage guidance and scope, and the third mentions parameter usage. Each sentence serves a distinct purpose with minimal redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description provides adequate but incomplete context. It covers purpose and usage well but lacks behavioral transparency details that would be important for an agent to use this tool effectively. The description doesn't explain what format the patterns are returned in or what constitutes 'full content' vs. specific sections.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description mentions 'Use `topic` to get a specific section only' which adds minimal context beyond what's in the schema (which says 'Get a specific section only. Available: core-rule, route-file, screen-ui, rules, benefits. Omit for full content.'). The description doesn't add meaningful semantic information about the compact parameter. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get screen architecture patterns (Logic/UI separation)' - a specific verb+resource combination. It distinguishes from siblings by focusing specifically on screen architecture patterns (vs. get-api-patterns, get-component-patterns, etc.) and mentions the specific scope: 'Covers the Route file + ScreenUI file split, naming conventions, and why it matters for testability and SOLID principles.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Call this when creating a new screen or route.' This gives clear context for usage. While it doesn't explicitly mention when NOT to use it or name specific alternatives, the guidance is sufficiently specific for the agent to understand the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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