Skip to main content
Glama

list_design_categories

Retrieve available design rule categories to access documentation for component usage, guidelines, and project setup in your IDE.

Instructions

List all available design rule categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function `listDesignCategories` that generates a formatted markdown list of all loaded design rule categories with brief descriptions extracted from their content.
    private async listDesignCategories(): Promise<any> { let resultText = `# Modus Design Rules (${this.rules.length} categories)\n\n`; for (const rule of this.rules.sort((a, b) => a.category.localeCompare(b.category) )) { // Extract brief description from content const lines = rule.content.split("\n"); let description = "Design guidelines and specifications"; for (const line of lines) { if ( line.trim() && !line.startsWith("#") && !line.startsWith("---") && line.length > 10 ) { description = line.trim().substring(0, 100) + (line.length > 100 ? "..." : ""); break; } } resultText += `## ${rule.category}\n${description}\n\n`; } return { content: [ { type: "text", text: resultText, }, ], }; }
  • src/index.ts:253-260 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and empty input schema (no parameters required).
    { name: "list_design_categories", description: "List all available design rule categories.", inputSchema: { type: "object", properties: {}, }, },
  • src/index.ts:326-327 (registration)
    Dispatch case in the CallToolRequestSchema switch statement that invokes the listDesignCategories handler method.
    case "list_design_categories": return await this.listDesignCategories();
  • Input schema definition for the tool: an empty object (no input parameters required).
    inputSchema: { type: "object", properties: {}, },
  • Helper method `loadRules` that loads design rule markdown files from the rules directory into the `this.rules` array used by the handler.
    private loadRules(): void { if (!existsSync(this.rulesPath)) { console.error(`Rules directory not found at: ${this.rulesPath}`); console.error("Please run: node download-docs.js"); return; } const files = readdirSync(this.rulesPath).filter((f) => f.endsWith(".md")); for (const file of files) { const content = readFileSync(join(this.rulesPath, file), "utf-8"); const category = file.replace(".md", "").replace("modus_", ""); this.rules.push({ filename: file, category, content, }); } console.error(`Loaded ${this.rules.length} design rules files`); }

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