Skip to main content
Glama

get_design_system

Retrieve Laravel design system documentation to access coding rules, implementation templates, and styling guidelines for consistent development.

Instructions

Get design system documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Complete implementation of the get_design_system tool handler - registers the tool with no input parameters, reads the design-system.md file from DOCS_PATH, and returns its content as text
    // Register tool: Get design system
    server.registerTool(
      'get_design_system',
      {
        description: 'Get design system documentation',
        inputSchema: {},
      },
      async () => {
        const designPath = path.join(DOCS_PATH, 'design-system.md');
    
        if (!fs.existsSync(designPath)) {
          throw new Error('Design system documentation not found');
        }
    
        const content = fs.readFileSync(designPath, 'utf-8');
    
        return {
          content: [{
            type: 'text',
            text: content,
          }],
        };
      }
    );
  • index.js:368-368 (registration)
    Console output showing get_design_system in the list of available tools displayed when server starts
    console.error('  - get_design_system: Get design system docs\n');
  • Helper function getDocFiles used by tools to recursively find markdown files in the documentation directory (could be used for design system file discovery)
    function getDocFiles(dir, basePath = dir) {
      const files = [];
    
      if (!fs.existsSync(dir)) {
        return files;
      }
    
      const entries = fs.readdirSync(dir, { withFileTypes: true });
    
      for (const entry of entries) {
        const fullPath = path.join(dir, entry.name);
        const relativePath = path.relative(basePath, fullPath);
    
        if (entry.isDirectory()) {
          // Skip node_modules and hidden directories
          if (!entry.name.startsWith('.') && entry.name !== 'node_modules') {
            files.push(...getDocFiles(fullPath, basePath));
          }
        } else if (entry.name.endsWith('.md')) {
          files.push({
            path: relativePath,
            full_path: fullPath,
            name: entry.name,
          });
        }
      }
    
      return 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/pujandan/mcp-laravel'

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