Skip to main content
Glama

get_setup_guide

Generate setup instructions for HTML or React projects using Modus Web Components to configure your development environment.

Instructions

Get setup instructions for HTML or React projects using Modus Web Components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe setup type ("html", "react", "testing")

Implementation Reference

  • The main handler function implementing the get_setup_guide tool. It normalizes the input type, searches the loaded setup documents for a match by setupType or filename, and returns the guide content or lists available types if not found.
    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 (registration)
    Registers the get_setup_guide tool in the ListTools response, defining 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"], }, },
  • Defines the input schema for the get_setup_guide tool, specifying an object with a required 'type' string parameter.
    inputSchema: { type: "object", properties: { type: { type: "string", description: 'The setup type ("html", "react", "testing")', }, }, required: ["type"], },
  • Helper method that loads all markdown setup guide files from the setup directory into the 'this.setup' array, processing filenames to extract setupType, which is essential for the getSetupGuide handler.
    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`); }
  • Dispatch case in the CallToolRequest handler that routes calls to the get_setup_guide tool to the getSetupGuide method.
    case "get_setup_guide": return await this.getSetupGuide((args?.type as string) || "");

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/julianoczkowski/mcp-modus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server