get_domain_examples
Retrieve Laravel code examples for specific domains like ecommerce, HR, tourism, or satiket to implement features using proven patterns.
Instructions
Get domain-specific implementation examples
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Domain to get examples for, or "all" for overview |
Implementation Reference
- index.js:288-326 (handler)Complete registration and handler implementation for get_domain_examples tool. The handler reads domain-specific documentation files from the docs/domains directory based on the domain parameter.
server.registerTool( 'get_domain_examples', { description: 'Get domain-specific implementation examples', inputSchema: { domain: z.enum(['all', 'ecommerce', 'hr', 'tourism', 'satiket']).optional().describe('Domain to get examples for, or "all" for overview'), }, }, async ({ domain = 'all' }) => { const domainsPath = path.join(DOCS_PATH, 'domains'); if (domain !== 'all') { const domainPath = path.join(domainsPath, domain, 'readme.md'); if (!fs.existsSync(domainPath)) { throw new Error(`Domain '${domain}' examples not found`); } const content = fs.readFileSync(domainPath, 'utf-8'); return { content: [{ type: 'text', text: content, }], }; } // Return all domains overview const indexContent = fs.readFileSync(path.join(domainsPath, 'readme.md'), 'utf-8'); return { content: [{ type: 'text', text: indexContent, }], }; } ); - index.js:292-294 (schema)Input schema definition for the get_domain_examples tool using Zod validation. Defines optional 'domain' parameter with allowed enum values.
inputSchema: { domain: z.enum(['all', 'ecommerce', 'hr', 'tourism', 'satiket']).optional().describe('Domain to get examples for, or "all" for overview'), }, - index.js:288-295 (registration)Tool registration call that registers 'get_domain_examples' with the MCP server, including its name, description, and input schema.
server.registerTool( 'get_domain_examples', { description: 'Get domain-specific implementation examples', inputSchema: { domain: z.enum(['all', 'ecommerce', 'hr', 'tourism', 'satiket']).optional().describe('Domain to get examples for, or "all" for overview'), }, },