get_project_structure
Retrieve standardized React Native project structure guidelines to organize codebases efficiently and maintain consistent development practices.
Instructions
Get project structure standards for React Native development
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_project_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:150-166 (registration)Registration of the 'get_project_structure' tool, including the inline handler function that fetches and returns the project structure standards from a markdown file using the getStandardContent helper.
server.tool( "get_project_structure", "Get project structure standards for React Native development", {}, async () => { const result = getStandardContent("standards", "project_structure"); return { content: [ { type: "text", text: result.content ?? result.error ?? "Error: No content or error message available", }, ], }; }, ); - src/index.ts:150-166 (handler)The handler logic for the 'get_project_structure' tool is inline in the registration. It calls getStandardContent to read 'resources/standards/project_structure.md' and returns it as MCP content.
server.tool( "get_project_structure", "Get project structure standards for React Native development", {}, async () => { const result = getStandardContent("standards", "project_structure"); return { content: [ { type: "text", text: result.content ?? result.error ?? "Error: No content or error message available", }, ], }; }, ); - src/index.ts:28-42 (helper)Helper function getStandardContent used by get_project_structure (and other tools) to read markdown standards files from resources directory.
function getStandardContent(category: string, standardId: string): { content?: string; error?: string } { const standardPath = path.join(RESOURCES_DIR, category, `${standardId}.md`); if (!fs.existsSync(standardPath)) { return { error: `Standard ${standardId} not found` }; } try { const content = fs.readFileSync(standardPath, 'utf8'); return { content }; } catch (err) { console.error(`Error reading standard ${standardId}:`, err); return { error: `Error reading standard ${standardId}` }; } }