Skip to main content
Glama
NazarLysyi

Brickognize MCP Server

by NazarLysyi

Identify LEGO Part

brickognize_identify_part
Read-onlyIdempotent

Identify a specific LEGO part from a photograph by providing the image path. Returns matched parts with IDs, names, confidence scores, and links for accurate LEGO piece recognition.

Instructions

Identify a specific LEGO part/brick/element from a photograph. Use instead of brickognize_identify when you know the image shows a single LEGO piece for more accurate results.

Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP). Returns matched parts 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 dynamically creates and registers the MCP tool. It uses the provided endpoint to call the Brickognize API and formats the result.
    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),
                },
              ],
            };
          }
        },
      );
    }
  • Registration of the 'brickognize_identify_part' tool using the createPredictTool helper.
    export function registerIdentifyPartTool(server: McpServer): void {
      createPredictTool(
        server,
        "brickognize_identify_part",
        "Identify LEGO Part",
        "Identify a specific LEGO part/brick/element from a photograph. " +
          "Use instead of brickognize_identify when you know the image shows a single LEGO piece for more accurate results.\n\n" +
          "Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP).\n" +
          "Returns matched parts with IDs, names, confidence scores, and links.",
        "/predict/parts/",
      );
    }
Behavior4/5

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

Annotations already cover read-only, open-world, idempotent, and non-destructive behavior, so the description doesn't need to repeat these. However, it adds valuable context about the return format ('Returns matched parts with IDs, names, confidence scores, and links') and the tool's specialization for single-piece identification, which enhances understanding beyond annotations.

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 parameter/return details in two concise sentences. Every sentence adds value without redundancy, making it efficient and well-structured.

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

Completeness5/5

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

Given the annotations cover safety and behavioral traits, the schema fully describes parameters, and the description clarifies usage context and return format, this is complete for an identification tool. No output schema exists, but the description adequately outlines what to expect in results.

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?

Schema description coverage is 100%, so the schema fully documents both parameters. The description mentions 'Provide imagePath' and briefly notes the return format, but doesn't add significant semantic details beyond what the schema provides. 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 specific LEGO part/brick/element from a photograph') and distinguishes it from a sibling tool ('Use instead of brickognize_identify when you know the image shows a single LEGO piece for more accurate results'). It specifies both the verb (identify) and resource (LEGO part/brick/element) with precise scope.

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 versus alternatives: 'Use instead of brickognize_identify when you know the image shows a single LEGO piece for more accurate results.' This directly addresses sibling tool differentiation with clear context for selection.

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