get_theme_usage
Access theme implementation guidelines and usage instructions for Modus Web Components. Apply consistent theming using design system patterns directly in your IDE.
Instructions
Get theme implementation guidelines and usage instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:707-731 (handler)The getThemeUsage() method that handles the 'get_theme_usage' tool. It looks up a setup guide where setupType is 'theme' or filename includes 'theme', and returns its content. Returns an error message if not found.
private async getThemeUsage(): Promise<any> { const themeGuide = this.setup.find( (s) => s.setupType === "theme" || s.filename.includes("theme") ); if (!themeGuide) { return { content: [ { type: "text", text: "Theme usage guide not found. Please run: node download-docs.js", }, ], }; } return { content: [ { type: "text", text: themeGuide.content, }, ], }; } - src/index.ts:276-284 (schema)The tool definition and input schema for 'get_theme_usage'. It has no required input parameters (empty properties object).
{ name: "get_theme_usage", description: "Get theme implementation guidelines and usage instructions.", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:332-333 (registration)The router case that maps the tool name 'get_theme_usage' to the handler method getThemeUsage().
case "get_theme_usage": return await this.getThemeUsage(); - src/index.ts:149-150 (helper)The loadSetup() method maps the filename 'setup_theme_usage.md' to setupType 'theme', which is used by getThemeUsage() to find the correct setup guide.
if (setupType === "universal_rules") setupType = "universal"; if (setupType === "theme_usage") setupType = "theme";