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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:328-351 (handler)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'); - index.js:22-50 (helper)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; }