get_development_rules
Retrieve universal development rules and best practices for implementing Modus Web Components in your projects.
Instructions
Get universal development rules and best practices for Modus Web Components.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:733-757 (handler)The core handler function that implements the logic for the 'get_development_rules' tool. It retrieves the 'universal' setup guide from loaded documents and returns it as markdown text content.private async getDevelopmentRules(): Promise<any> { const universalGuide = this.setup.find( (s) => s.setupType === "universal" || s.filename.includes("universal") ); if (!universalGuide) { return { content: [ { type: "text", text: "Universal development rules not found. Please run: node download-docs.js", }, ], }; } return { content: [ { type: "text", text: universalGuide.content, }, ], }; }
- src/index.ts:285-293 (registration)Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and input schema.{ name: "get_development_rules", description: "Get universal development rules and best practices for Modus Web Components.", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:289-292 (schema)Input schema definition for the 'get_development_rules' tool, specifying an empty object (no required parameters).inputSchema: { type: "object", properties: {}, },
- src/index.ts:335-336 (handler)Dispatch case in the main CallToolRequestSchema handler that routes calls to the getDevelopmentRules method.case "get_development_rules": return await this.getDevelopmentRules();
- src/index.ts:135-160 (helper)Helper function that loads setup guide files, including the 'universal_rules.md' file mapped to 'universal' setupType, which is used by getDevelopmentRules.private loadSetup(): void { if (!existsSync(this.setupPath)) { console.error(`Setup directory not found at: ${this.setupPath}`); console.error("Please run: node download-docs.js"); return; } const files = readdirSync(this.setupPath).filter((f) => f.endsWith(".md")); for (const file of files) { const content = readFileSync(join(this.setupPath, file), "utf-8"); let setupType = file.replace(".md", "").replace("setup_", ""); // Map filenames to more user-friendly types if (setupType === "universal_rules") setupType = "universal"; if (setupType === "theme_usage") setupType = "theme"; this.setup.push({ filename: file, setupType, content, }); } console.error(`Loaded ${this.setup.length} setup guide files`); }