get_api_communication
Access standardized API communication guidelines for React Native projects, ensuring consistency and best practices in your app development process.
Instructions
Get API communication standards for React Native development
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:169-185 (registration)Registration of the 'get_api_communication' tool, including its inline handler function that retrieves and returns the API communication standards from a markdown file using the getStandardContent helper.server.tool( "get_api_communication", "Get API communication standards for React Native development", {}, async () => { const result = getStandardContent("standards", "api_communication"); 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 the get_api_communication tool (and others) to read standard markdown files from the resources/standards 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}` }; } }