Skip to main content
Glama

Get product details

get_product
Read-onlyIdempotent

Get one product by its code: available sizes, fabrics, the price of each size+fabric variant, and the design's 'about' text. Call it before add_to_cart when the human hasn't picked a size yet or may want another fabric — a search card doesn't list them. code is the code field of a search_products card (the end of its /p/ url); add_to_cart then takes the numeric good_id, which this result also returns. A matching set returns parts (its top and bottom, each with its own card); its variants are the set's own (the parts' prices added up). Add it with its own good_id and one size — it becomes two cart lines, one per part. Read-only; an unknown code returns error 'product not found'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "get_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesProduct code from search_products results.

Output Schema

NameRequiredDescriptionDefault
urlNo
codeNo
aboutNoDesign description text (may be null).
errorNoPresent when the product was not found.
imageNo
partsNoOnly for a matching set: the garments it is made of, top first.
priceNo
sizesNo
themeNo
titleNo
fabricsNo
good_idNo
productNo
currencyNo
variantsNoPrice per size+fabric combination.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / parts
      Added value: +{
      +  "description": "Only for a matching set: the garments it is made of, top first.",
      +  "items": {
      +    "properties": {
      +      "code": {
      +        "type": "string"
      +      },
      +      "good_id": {
      +        "type": "integer"
      +      },
      +      "product": {
      +        "type": "string"
      +      },
      +      "role": {
      +        "description": "top or bottom.",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "The part's own product page.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"Product code from search_products results."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "about": {
      +      "description": "Design description text (may be null).",
      +      "type": "string"
      +    },
      +    "code": {
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Present when the product was not found.",
      +      "type": "string"
      +    },
      +    "fabrics": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "good_id": {
      +      "type": "integer"
      +    },
      +    "image": {
      +      "type": "string"
      +    },
      +    "price": {
      +      "type": "number"
      +    },
      +    "product": {
      +      "type": "string"
      +    },
      +    "sizes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "theme": {
      +      "type": "string"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "variants": {
      +      "description": "Price per size+fabric combination.",
      +      "items": {
      +        "properties": {
      +          "fabric": {
      +            "type": "string"
      +          },
      +          "price": {
      +            "type": "number"
      +          },
      +          "size": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description still adds real value beyond them: the 'product not found' error for unknown codes, and the non-obvious behavior that a matching set returns `parts` and becomes two cart lines. It does not discuss rate limits or response shape, but the output schema covers the latter.

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

Conciseness4/5

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

Front-loaded with the verb and the return contents, then usage, then set-specific edge cases. Dense but almost every clause carries information; the set/parts/cart-lines passage is long and slightly tangled, which keeps it from a 5.

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?

Covers the core call, the upstream/downstream data flow, the error case, and the tricky set-with-parts scenario, which is more than most single-parameter tools need. Small gaps remain around what happens for a set with a single size selection across parts, but the output schema carries the return-value burden.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description goes further: it says `code` is the end of the card's /p/<code> url and that this result supplies the numeric good_id that add_to_cart requires. That mapping between two identifiers is meaning neither the schema nor the annotations provide.

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?

States a specific verb and resource ('Get one product by its code') and enumerates what comes back: sizes, fabrics, per-variant prices, and 'about' text. It explicitly contrasts with search_products, whose cards don't list sizes or fabrics, so the agent can distinguish it from the sibling without opening a schema.

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?

Gives an explicit trigger: 'Call it before add_to_cart when the human hasn't picked a size yet or may want another fabric.' It also names the upstream source (search_products cards) and downstream consumer (add_to_cart), covering when to use it and what it feeds.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources