Skip to main content
Glama

explain_fabric_concept

Explains Fabric and Minecraft modding concepts like mixins, registries, and events to help developers understand terminology and architectural patterns.

Instructions

Get detailed explanation of a Fabric or Minecraft modding concept. Use this to understand fundamental concepts, terminology, or architectural patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conceptYesConcept to explain (e.g., 'mixins', 'registries', 'sided logic', 'fabric.mod.json', 'events')

Implementation Reference

  • Core handler function for 'explain_fabric_concept' tool: validates input, retrieves explanation using ConceptService, formats output, handles errors and suggestions.
    export async function handleExplainConcept(params: ExplainConceptParams): Promise<CallToolResult> {
      const { concept } = params;
    
      // Validate input
      if (!concept || typeof concept !== 'string' || concept.trim().length === 0) {
        return {
          content: [
            {
              type: 'text',
              text: 'Error: Concept parameter is required and cannot be empty.',
            },
          ],
          isError: true,
        };
      }
    
      const trimmedConcept = concept.trim();
    
      // Check for very long input
      if (trimmedConcept.length > 100) {
        return {
          content: [
            {
              type: 'text',
              text: 'Error: Concept should be a concise term or phrase (max 100 characters). Examples: "mixins", "registry", "sided logic".',
            },
          ],
          isError: true,
        };
      }
    
      try {
        const service = getConceptService();
    
        // Get comprehensive explanation
        const explanation = await service.explainConcept(trimmedConcept);
    
        // Format for AI
        const formattedOutput = service.formatForAI(explanation);
    
        // Add suggestions if few results
        let suggestions = '';
        if (explanation.metadata.sourcesUsed < 2) {
          suggestions = '\n\n**Note:** Limited information found for this concept. ';
          suggestions += 'Try:\n';
          suggestions += '- Using a more common term (e.g., "mixin" instead of "bytecode injection")\n';
          suggestions += '- Checking spelling\n';
          suggestions += '- Using `search_fabric_docs` for broader search\n';
        }
    
        return {
          content: [
            {
              type: 'text',
              text: formattedOutput + suggestions,
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        console.error(`[explainConcept] Error: ${errorMessage}`);
    
        return {
          content: [
            {
              type: 'text',
              text: `Error explaining concept: ${errorMessage}\n\nPlease ensure the documentation database has been indexed. Run 'npm run index-docs' to build the database.`,
            },
          ],
          isError: true,
        };
      }
    }
  • Tool schema definition including name, description, and input schema for 'explain_fabric_concept' in the BASE_TOOLS array.
    {
      name: 'explain_fabric_concept',
      description:
        'Get detailed explanation of a Fabric or Minecraft modding concept. Use this to understand fundamental concepts, terminology, or architectural patterns.',
      inputSchema: {
        type: 'object',
        properties: {
          concept: {
            type: 'string',
            description:
              "Concept to explain (e.g., 'mixins', 'registries', 'sided logic', 'fabric.mod.json', 'events')",
          },
        },
        required: ['concept'],
      },
    },
  • src/index.ts:221-225 (registration)
    Switch case in CallToolRequestHandler that registers and dispatches 'explain_fabric_concept' calls to the handler function.
    case 'explain_fabric_concept': {
      return await handleExplainConcept({
        concept: (args?.concept as string) || '',
      });
    }
  • src/index.ts:13-13 (registration)
    Import statement that brings in the handler function for registration.
    import { handleExplainConcept } from './tools/explainConcept.js';
  • TypeScript interface defining the input parameters for the handler.
    export interface ExplainConceptParams {
      concept: string;
    }
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 of behavioral disclosure. It mentions the tool provides 'detailed explanation,' which implies a read-only, informational operation, but doesn't specify aspects like response format, potential errors, rate limits, or authentication needs. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

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 appropriately sized and front-loaded, consisting of two concise sentences that directly state the tool's purpose and usage without any wasted words. Every sentence earns its place by providing essential information efficiently.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no nested objects) and high schema coverage, the description is adequate but has clear gaps. It lacks output schema, so it doesn't explain return values, and with no annotations, it misses behavioral details. For a simple informational tool, it's minimally viable but could be more complete.

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, with the 'concept' parameter well-documented in the schema. The description adds minimal value beyond the schema by implying the types of concepts (e.g., 'fundamental concepts, terminology, or architectural patterns'), but doesn't provide additional syntax or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get detailed explanation') and resource ('Fabric or Minecraft modding concept'). It distinguishes itself from potential siblings by focusing on concept explanations rather than examples, versions, or documentation searches. However, it doesn't explicitly contrast with the sibling tools listed, which keeps it from a perfect score.

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

Usage Guidelines3/5

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

The description provides implied usage guidance by stating 'Use this to understand fundamental concepts, terminology, or architectural patterns,' which suggests when to use it. However, it doesn't explicitly mention when not to use it or name alternatives among the sibling tools (e.g., use search_fabric_docs for broader searches). This lack of explicit exclusions or named alternatives limits the score.

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/OGMatrix/mcmodding-mcp'

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