Skip to main content
Glama

get-styling-patterns

Retrieve styling patterns for React Native Expo projects using NativeWind and Tailwind CSS. Covers className approaches, arbitrary values, CSS interop, configuration, and conditional styling techniques.

Instructions

Get styling patterns (NativeWind / Tailwind CSS). Call this when styling components. Covers NativeWind v4 className approach, arbitrary values, cssInterop for third-party components, Tailwind config, JS constants, conditional styles, and setup checklist. Use topic to get a specific section only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoGet a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. Omit for full content.
compactNoIf true, returns rules only without code examples. Much shorter.

Implementation Reference

  • The handler function `getStylingPatterns` retrieves styling pattern documentation, supporting topic filtering and a compact mode.
    export const getStylingPatterns = (topic?: string, compact?: boolean): string =>
      resolvePattern(pattern, topic, compact);
  • src/index.ts:146-164 (registration)
    Registration of the `get-styling-patterns` tool in `src/index.ts`.
    server.tool(
      "get-styling-patterns",
      "Get styling patterns (NativeWind / Tailwind CSS). Call this when styling components. Covers NativeWind v4 className approach, arbitrary values, cssInterop for third-party components, Tailwind config, JS constants, conditional styles, and setup checklist. Use `topic` to get a specific section only.",
      {
        topic: z
          .string()
          .optional()
          .describe(
            "Get a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. 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: getStylingPatterns(topic, compact) }],
      })
    );
  • Input schema definition for the `get-styling-patterns` tool.
    {
      topic: z
        .string()
        .optional()
        .describe(
          "Get a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. Omit for full content."
        ),
      compact: z
        .boolean()
        .optional()
        .describe("If true, returns rules only without code examples. Much shorter."),
    },
Behavior3/5

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

No annotations are provided, so the description carries full burden. It describes what content is covered (NativeWind v4, arbitrary values, etc.) and mentions the 'compact' parameter behavior (returns rules only without code examples). However, it doesn't disclose important behavioral traits like response format, whether it's read-only, potential rate limits, or authentication requirements. The description adds some context but leaves significant 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 concise with two sentences. The first sentence states the purpose and scope, while the second provides usage guidance for the topic parameter. There's no wasted text, and information is front-loaded. However, it could be slightly more structured by separating behavioral information from parameter guidance.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose and basic usage but lacks information about response format, error conditions, or what constitutes 'patterns' in the output. Without annotations or output schema, the description should do more to explain what the tool returns and how to interpret it.

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 documents both parameters thoroughly. The description adds minimal value beyond the schema: it mentions using 'topic' to get specific sections and implies 'compact' makes output 'much shorter.' This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't add significant semantic context beyond what's already in parameter descriptions.

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 the tool's purpose: 'Get styling patterns (NativeWind / Tailwind CSS)' with specific technologies mentioned. It distinguishes from some siblings like 'get-api-patterns' or 'get-performance-patterns' by focusing on styling, though it doesn't explicitly differentiate from 'get-component-patterns' which might overlap. The description includes the verb 'Get' and resource 'styling patterns' but could be more specific about what 'patterns' means.

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 styling components' which gives practical guidance. It also mentions using the 'topic' parameter to get specific sections, implying an alternative to getting full content. However, it doesn't explicitly state when NOT to use this tool or compare it to potential alternatives like 'get-component-patterns' for component-specific styling advice.

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