Skip to main content
Glama

get-navigation-patterns

Retrieve Expo Router navigation patterns for implementing routes, navigation, deep links, and auth guards in React Native projects.

Instructions

Get Expo Router navigation patterns. Call this when working with routes, navigation, deep links, or auth guards. Covers file structure, layouts, AuthGuard, typed params, navigation API, deep linking, and layout groups. Use topic to get a specific section only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoGet a specific section only. Available: file-routing, layouts, auth-guard, typed-params, navigation-api, deep-linking, groups. Omit for full content.
compactNoIf true, returns rules only without code examples. Much shorter.

Implementation Reference

  • The handler function that retrieves the navigation pattern content based on a topic and compact flag.
    export const getNavigationPatterns = (topic?: string, compact?: boolean): string =>
      resolvePattern(pattern, topic, compact);
  • The definition of the content sections used by the tool.
    const pattern: PatternSections = {
      title: 'Navigation Patterns (Expo Router)',
      sections,
      compactSections,
    };
  • src/index.ts:77-95 (registration)
    Tool registration for "get-navigation-patterns" in the main server file.
    server.tool(
      "get-navigation-patterns",
      "Get Expo Router navigation patterns. Call this when working with routes, navigation, deep links, or auth guards. Covers file structure, layouts, AuthGuard, typed params, navigation API, deep linking, and layout groups. Use `topic` to get a specific section only.",
      {
        topic: z
          .string()
          .optional()
          .describe(
            "Get a specific section only. Available: file-routing, layouts, auth-guard, typed-params, navigation-api, deep-linking, groups. 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: getNavigationPatterns(topic, compact) }],
      })
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions what content is covered (file structure, layouts, AuthGuard, typed params, etc.) and that the 'compact' parameter affects output length. However, it doesn't disclose important behavioral aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what format the output takes (though no output schema exists). The description adds some context but leaves gaps for a tool with no annotations.

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

Conciseness5/5

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

The description is efficiently structured in three sentences: purpose statement, usage context, and parameter guidance. Every sentence adds value with zero waste. It's appropriately sized for a tool with 2 parameters and no annotations, front-loading the most important information about what the tool does and when to use it.

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 2 parameters with 100% schema coverage but no annotations and no output schema, the description provides adequate but incomplete context. It covers purpose, usage guidelines, and parameter semantics reasonably well. However, for a tool with no output schema, it should ideally describe the return format or content structure. The mention of 'rules' and 'code examples' hints at output content but doesn't fully compensate for the lack of structured output documentation.

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

Parameters4/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 documents both parameters thoroughly. The description adds value by listing the available topics ('file-routing, layouts, auth-guard, typed-params, navigation-api, deep-linking, groups') which provides semantic context beyond the schema's generic 'Available: file-routing...' description. It also explains the purpose of the 'compact' parameter ('returns rules only without code examples. Much shorter.') which complements the schema's description.

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

Purpose4/5

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

The description clearly states 'Get Expo Router navigation patterns' which specifies the verb ('Get') and resource ('Expo Router navigation patterns'). It distinguishes from siblings by focusing specifically on navigation patterns rather than other aspects like components, styling, or performance. However, it doesn't explicitly contrast with similar-sounding sibling 'get-api-patterns' or 'get-component-patterns' beyond the navigation focus.

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

Usage Guidelines4/5

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

The description provides clear usage context: 'Call this when working with routes, navigation, deep links, or auth guards.' This gives explicit guidance on when to use the tool. It also mentions using the 'topic' parameter for specific sections. However, it doesn't explicitly state when NOT to use this tool or provide alternatives among the sibling tools (like when to use get-api-patterns vs get-navigation-patterns).

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