Skip to main content
Glama

Create products

create_products

Adds products to the shop's Products collection, like create_items with the product fields and checks. Each product needs a name and a price in the shop's currency (24 or 24.50; a whole number for a currency without cents); optional: summary, compareAtPrice (the "was" price), options as simple text ("Size: Small, Medium, Large (+5); Colour: Sand, Grey", a price change in brackets), stock (empty: no limit), image and gallery (site paths like /images/mug.webp, or, on React template sites only, the themed placeholder /placeholders/square.svg with alt text; on plain HTML sites leave it out and the card shows a plain box; never stock photos), category, description (Markdown), active (false: not for sale), slug, draft (default false: for sale; true keeps it out of the shop), interval (month or year: a membership billed again every month or year, bought on its own and by card only; leave it out for a one-time product; on a plain HTML site it is a subscription only, with no member role or members-only pages). Every product is checked first and nothing is written when one can't be sold as written (each problem is listed). Makes the Products collection from its starter when the site has none, and adds the fields an older Products collection lacks (only adds, never changes a field). Refuses with plan_limit when the products for sale would pass the plan's limit (say the limit and that the owner can upgrade in Billing). For other fields or changes use update_item, list_items and delete_items on the same collection.

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": {
      "products": "<products>",
      "projectId": "<projectId>"
    },
    "name": "create_products"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchNoOptional branch; default the branch the workspace has open
productsYes
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, which already declare a non-read-only, non-destructive write, the description explains atomic validation ('nothing is written when one can't be sold as written'), automatic collection creation, additive schema migration ('only adds, never changes a field'), and plan-limit refusal behavior.

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?

The description is front-loaded with the core action, and nearly every sentence adds a useful constraint. However, it is a dense wall of text rather than a structured list, which makes the many field rules harder to scan than necessary.

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?

For a complex nested-object write tool with no output schema, it covers validation, side effects, schema migration, plan limits, and alternatives. It does not describe the success response or mention the optional branch parameter, leaving minor gaps.

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?

Although schema coverage is 67%, the description adds substantial meaning: price formatting rules for currencies with and without cents, compareAtPrice as the crossed-out 'was' price, options syntax with bracketed price changes, image and gallery placeholder restrictions, stock-empty meaning no limit, draft default, and interval membership restrictions.

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 opens with a specific verb and resource: 'Adds products to the shop's Products collection.' It also distinguishes the tool from the sibling create_items by noting it uses 'the product fields and checks,' and it names update_item, list_items, and delete_items as alternatives for other operations.

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?

It gives explicit routing: 'For other fields or changes use update_item, list_items and delete_items on the same collection.' It also defines when the tool refuses, such as plan_limit, and what happens when the site lacks a Products collection or has an older one.

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