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'),
        },
      },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it 'gets' examples, implying a read operation, but doesn't disclose behavioral traits such as whether it returns structured data, text, or code; if there are rate limits; authentication needs; or what happens with invalid domains. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the examples include (e.g., code snippets, best practices), the format of the return value, or error handling. For a tool that fetches domain-specific content, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting the 'domain' parameter with an enum. The description adds no additional meaning beyond the schema, as it doesn't explain what 'examples' entail or how the 'all' option differs from specific domains. With high schema coverage, the baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get domain-specific implementation examples' states a clear verb ('Get') and resource ('domain-specific implementation examples'), but it's vague about what these examples actually are or contain. It doesn't distinguish this tool from siblings like 'get_templates' or 'get_design_system', which might also provide examples or resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and with siblings like 'get_templates' and 'get_design_system', there's no indication of how this tool differs or when it's preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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