get_component_design
Access React Native component design standards and coding guidelines to streamline development and ensure consistency across projects.
Instructions
Get component design standards for React Native development
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:189-204 (handler)Registration and inline handler implementation for the get_component_design tool. It calls getStandardContent to load 'component_design.md' from resources/standards and returns it as a text content block in MCP format."get_component_design", "Get component design standards for React Native development", {}, async () => { const result = getStandardContent("standards", "component_design"); return { content: [ { type: "text", text: result.content ?? result.error ?? "Error: No content or error message available", }, ], }; }, );
- src/index.ts:28-42 (helper)Supporting helper function getStandardContent used by the tool handler to read the markdown file resources/standards/component_design.md and return its content or an error.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}` }; } }
- build/index.js:152-162 (registration)Tool registration and inline handler in the built JavaScript version (transpiled from src/index.ts). Identical logic to the source.server.tool("get_component_design", "Get component design standards for React Native development", {}, async () => { const result = getStandardContent("standards", "component_design"); return { content: [ { type: "text", text: result.content ?? result.error ?? "Error: No content or error message available", }, ], }; });