Skip to main content
Glama

get-project-structure

Retrieve React Native Expo project structure guidelines to determine correct file placement for screens, components, hooks, and other assets with naming conventions and import aliases.

Instructions

Get project folder structure and file placement guide. Call this when deciding where to place a new file. Covers the full folder tree, where to put screens/components/hooks/services/stores/types/constants, naming conventions, and import aliases. Use topic to get a specific section only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoGet a specific section only. Available: folder-tree, file-placement, naming, import-aliases. Omit for full content.
compactNoIf true, returns rules only without code examples. Much shorter.

Implementation Reference

  • The main handler function for the `get-project-structure` tool.
    export const getProjectStructure = (topic?: string, compact?: boolean): string =>
      resolvePattern(pattern, topic, compact);
  • src/index.ts:192-210 (registration)
    The registration of the `get-project-structure` MCP tool in the server.
    server.tool(
      "get-project-structure",
      "Get project folder structure and file placement guide. Call this when deciding where to place a new file. Covers the full folder tree, where to put screens/components/hooks/services/stores/types/constants, naming conventions, and import aliases. Use `topic` to get a specific section only.",
      {
        topic: z
          .string()
          .optional()
          .describe(
            "Get a specific section only. Available: folder-tree, file-placement, naming, import-aliases. 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: getProjectStructure(topic, compact) }],
      })
    );
  • Zod schema definition for the inputs of the `get-project-structure` tool.
    {
      topic: z
        .string()
        .optional()
        .describe(
          "Get a specific section only. Available: folder-tree, file-placement, naming, import-aliases. 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?

With no annotations, the description carries full burden. It describes what the tool returns (folder tree, placement rules, naming conventions, import aliases) and hints at output format (rules with code examples unless compact=true). However, it doesn't disclose behavioral traits like rate limits, authentication needs, or potential side effects.

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 front-loaded with the core purpose, followed by specific use case and parameter guidance. Every sentence earns its place: first states what it does, second when to use it, third details coverage, fourth explains parameter usage. No wasted words.

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

Completeness4/5

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

Given no annotations and no output schema, the description does well by specifying what information is returned (folder tree, placement rules, etc.) and how parameters affect output. However, it doesn't fully describe the return format (e.g., structured data vs. text), leaving some ambiguity for a tool with rich output.

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 baseline is 3. The description adds value by explaining the 'topic' parameter's purpose ('to get a specific section only') and listing available sections, which clarifies beyond the schema's enum-like description. It also implies the 'compact' parameter affects output length ('Much shorter'), adding useful context.

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 project folder structure and file placement guide.' It specifies the exact resource (project structure) and verb (get), and distinguishes from siblings by focusing on folder organization rather than patterns, optimization, or project setup.

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?

Explicit guidance is provided: 'Call this when deciding where to place a new file.' It also mentions using the 'topic' parameter to get specific sections, offering clear usage instructions. While it doesn't explicitly name alternatives, the context implies it's for structural guidance rather than code generation or 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