Skip to main content
Glama

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
NameRequiredDescriptionDefault
domainNoDomain to get examples for, or "all" for overview

Implementation Reference

  • 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,
          }],
        };
      }
    );
  • 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'),
        },
      },

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