get_setup_guide
Get step-by-step setup instructions for HTML, React, or testing projects that use Modus Web Components. Quickly access configuration guides to start building with the design system.
Instructions
Get setup instructions for HTML or React projects using Modus Web Components.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The setup type ("html", "react", "testing") |
Implementation Reference
- src/index.ts:677-705 (handler)The getSetupGuide handler function that looks up setup guides by type from the loaded setup data and returns the content as text.
private async getSetupGuide(type: string): Promise<any> { const normalizedType = type.toLowerCase(); const guide = this.setup.find( (s) => s.setupType.toLowerCase() === normalizedType || s.filename.toLowerCase().includes(normalizedType) ); if (!guide) { const availableTypes = this.setup.map((s) => s.setupType).join(", "); return { content: [ { type: "text", text: `Setup guide type "${type}" not found.\n\nAvailable types: ${availableTypes}`, }, ], }; } return { content: [ { type: "text", text: guide.content, }, ], }; } - src/index.ts:261-275 (schema)Schema definition for the get_setup_guide tool, requiring a 'type' string parameter ('html', 'react', 'testing')
{ name: "get_setup_guide", description: "Get setup instructions for HTML or React projects using Modus Web Components.", inputSchema: { type: "object", properties: { type: { type: "string", description: 'The setup type ("html", "react", "testing")', }, }, required: ["type"], }, }, - src/index.ts:329-340 (registration)Registration of the 'get_setup_guide' tool in the CallToolRequestSchema switch statement, routing to getSetupGuide()
case "get_setup_guide": return await this.getSetupGuide((args?.type as string) || ""); case "get_theme_usage": return await this.getThemeUsage(); case "get_development_rules": return await this.getDevelopmentRules(); default: throw new Error(`Unknown tool: ${name}`); } - src/index.ts:260-297 (registration)Tool listing registration where get_setup_guide is declared as an available tool with its name, description, and input schema
}, { name: "get_setup_guide", description: "Get setup instructions for HTML or React projects using Modus Web Components.", inputSchema: { type: "object", properties: { type: { type: "string", description: 'The setup type ("html", "react", "testing")', }, }, required: ["type"], }, }, { name: "get_theme_usage", description: "Get theme implementation guidelines and usage instructions.", inputSchema: { type: "object", properties: {}, }, }, { name: "get_development_rules", description: "Get universal development rules and best practices for Modus Web Components.", inputSchema: { type: "object", properties: {}, }, }, ]; return { tools }; }); - src/index.ts:135-160 (helper)The loadSetup() helper that reads setup guide markdown files from the setup directory and populates the setup array used by getSetupGuide()
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`); }