Skip to main content
Glama
NazarLysyi

Brickognize MCP Server

by NazarLysyi

Identify LEGO Set

brickognize_identify_set
Read-onlyIdempotent

Identify LEGO sets from photos of boxes, assembled models, or instruction manuals. Upload an image to get set numbers, names, and confidence scores.

Instructions

Identify a LEGO set from a photograph of its box, assembled model, or instructions. Use instead of brickognize_identify when you know the image shows a LEGO set.

Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP). Returns matched sets with set numbers, 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 acts as a factory/handler that processes image inputs, calls the Brickognize API, and formats the output. The tool 'brickognize_identify_set' uses this generic handler configured with the '/predict/sets/' endpoint.
    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 logic for 'brickognize_identify_set' tool. It calls the generic `createPredictTool` factory with the appropriate name and endpoint.
    export function registerIdentifySetTool(server: McpServer): void {
      createPredictTool(
        server,
        "brickognize_identify_set",
        "Identify LEGO Set",
        "Identify a LEGO set from a photograph of its box, assembled model, or instructions. " +
          "Use instead of brickognize_identify when you know the image shows a LEGO set.\n\n" +
          "Provide imagePath — absolute path to a local image file (JPEG, PNG, or WebP).\n" +
          "Returns matched sets with set numbers, names, confidence scores, and links.",
        "/predict/sets/",
      );
    }
Behavior4/5

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

Annotations cover key behavioral traits (read-only, open-world, idempotent, non-destructive), so the bar is lower. The description adds value by specifying acceptable image sources (box, assembled model, instructions) and the return format (matched sets with numbers, names, confidence scores, links), which are not covered by annotations. It does not contradict annotations, as 'identify' aligns with read-only operations.

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 in the first sentence, followed by usage guidance and parameter/return details. Every sentence earns its place by providing essential information without redundancy, making it highly efficient and well-structured.

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 tool's moderate complexity (2 parameters, 100% schema coverage, annotations provided, no output schema), the description is mostly complete. It covers purpose, usage, parameters, and returns, but lacks details on error handling or limitations (e.g., image size constraints). With annotations handling safety and idempotency, it's sufficient but not exhaustive.

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 baseline is 3. The description adds minimal semantics beyond the schema: it mentions 'imagePath' and repeats the file format (JPEG, PNG, or WebP), which is already in the schema, and does not elaborate on 'includeRaw'. Thus, it meets the baseline without significant added value.

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 set from a photograph') and resource ('LEGO set'), distinguishing it from siblings like 'brickognize_identify_fig' or 'brickognize_identify_part' by specifying the target is a set. It explicitly mentions acceptable image types (box, assembled model, or instructions), making the purpose highly specific 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 vs. alternatives: 'Use instead of brickognize_identify when you know the image shows a LEGO set.' This directly addresses sibling tools and clarifies the context for selection, offering clear alternatives and exclusions.

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