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
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Get a specific section only. Available: folder-tree, file-placement, naming, import-aliases. Omit for full content. | |
| compact | No | If 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) }], }) ); - src/index.ts:195-206 (schema)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."), },