Skip to main content
Glama
NazarLysyi

Brickognize MCP Server

by NazarLysyi

Identify LEGO Minifigure

brickognize_identify_fig
Read-onlyIdempotent

Identify LEGO minifigures from uploaded photos. Upload an image file to get minifigure names, IDs, confidence scores, and reference links.

Instructions

Identify a LEGO minifigure from a photograph. Use instead of brickognize_identify when you know the image shows a minifigure.

Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP). Returns matched minifigures with IDs, names, confidence scores, and links.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imagePathNoAbsolute path to a local image file (JPEG, PNG, or WebP).
includeRawNoWhen true, includes the raw Brickognize API response alongside formatted results. Useful for debugging.

Implementation Reference

  • The createPredictTool function is the handler that executes the logic for brickognize_identify_fig (and other predict tools), including image resolution, API prediction, and result mapping.
    export function createPredictTool(
      server: McpServer,
      name: string,
      title: string,
      description: string,
      endpoint: string,
    ): void {
      server.registerTool(
        name,
        {
          title,
          description,
          inputSchema: imageInputSchema,
          annotations: TOOL_ANNOTATIONS,
        },
        async (input) => {
          try {
            const { blob, filename } = await resolveImage(input);
            const raw = await predict(endpoint, blob, filename);
            const result = mapPredictionResult(raw, input.includeRaw ?? false);
    
            return {
              content: [
                {
                  type: "text" as const,
                  text: result.summary,
                },
                {
                  type: "text" as const,
                  text: JSON.stringify(result, null, 2),
                },
              ],
            };
          } catch (error) {
            return {
              isError: true,
              content: [
                {
                  type: "text" as const,
                  text: formatToolError(error),
                },
              ],
            };
          }
        },
      );
    }
  • The registerIdentifyFigTool function registers the brickognize_identify_fig tool with the MCP server using the createPredictTool handler.
    export function registerIdentifyFigTool(server: McpServer): void {
      createPredictTool(
        server,
        "brickognize_identify_fig",
        "Identify LEGO Minifigure",
        "Identify a LEGO minifigure from a photograph. " +
          "Use instead of brickognize_identify when you know the image shows a minifigure.\n\n" +
          "Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP).\n" +
          "Returns matched minifigures with IDs, names, confidence scores, and links.",
        "/predict/figs/",
      );
    }
Behavior4/5

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

The description adds valuable context beyond the annotations by specifying the return format ('matched minifigures with IDs, names, confidence scores, and links'), which is not covered by the annotations. The annotations already indicate it's a safe, read-only operation (readOnlyHint: true, destructiveHint: false), so the description appropriately focuses on output details rather than repeating safety information.

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 front-loaded with the core purpose, followed by usage guidance and key details about input and output. Every sentence serves a distinct purpose: the first states what the tool does, the second provides usage context, and the third covers input requirements and return values. There is no wasted text.

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

Completeness4/5

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

Given the lack of an output schema, the description compensates by detailing the return format. It covers the tool's purpose, usage context, input requirements, and output structure. However, it doesn't mention potential limitations (e.g., image quality requirements, confidence thresholds) or error cases, which could be helpful for a tool performing image recognition.

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?

With 100% schema description coverage, the input schema fully documents both parameters (imagePath and includeRaw). The description mentions imagePath but doesn't add semantic details beyond what's in the schema. It doesn't explain includeRaw at all, relying entirely on the schema. This meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Identify a LEGO minifigure from a photograph') and distinguishes it from sibling tools by explicitly mentioning when to use it instead of 'brickognize_identify'. It specifies the resource (LEGO minifigure) and the input type (photograph), making the purpose unambiguous and differentiated.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Use instead of brickognize_identify when you know the image shows a minifigure'), clearly differentiating it from a sibling alternative. This direct comparison helps the agent make informed decisions about tool selection based on context.

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/NazarLysyi/brickognize-mcp'

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