{
  "tools": [
    {
      "name": "search_catalog",
      "description": "Search products across the global multi-store catalog.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "What the buyer is looking for."
          },
          "store_domain": {
            "type": "string",
            "description": "Optional store to restrict the search to."
          }
        },
        "required": [
          "query"
        ]
      }
    },
    {
      "name": "get_product",
      "description": "Retrieve details for a specific product: specs, variants, availability.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Product or variant identifier."
          }
        },
        "required": [
          "id"
        ]
      }
    },
    {
      "name": "lookup_catalog",
      "description": "Resolve multiple product or variant identifiers in one call.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ids"
        ]
      }
    },
    {
      "name": "search_faq",
      "description": "Search FAQ content for a specific store.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "store_domain": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "context": {
            "type": "string"
          }
        },
        "required": [
          "store_domain",
          "query"
        ]
      }
    },
    {
      "name": "get_policy",
      "description": "Retrieve a formal policy document for a specific store.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "store_domain": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "context": {
            "type": "string"
          }
        },
        "required": [
          "store_domain",
          "query"
        ]
      }
    },
    {
      "name": "list_policies",
      "description": "List the policies available for a specific store.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "store_domain": {
            "type": "string"
          }
        },
        "required": [
          "store_domain"
        ]
      }
    },
    {
      "name": "get_ui_state",
      "description": "Current Commerce Layer state: what the buyer sees on screen right now.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "create_cart",
      "description": "Create a new cart with line items; returns cart ID, totals, continue_url.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "merchant_mcp_url": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "quantity": {
                  "type": "integer"
                },
                "item": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              },
              "required": [
                "quantity",
                "item"
              ]
            }
          }
        },
        "required": [
          "merchant_mcp_url",
          "line_items"
        ]
      }
    },
    {
      "name": "get_cart",
      "description": "Retrieve the current full state of an existing cart.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "merchant_mcp_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "merchant_mcp_url",
          "id"
        ]
      }
    },
    {
      "name": "update_cart",
      "description": "Replace the full state of an existing cart (PUT semantics).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "merchant_mcp_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "quantity": {
                  "type": "integer"
                },
                "item": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              },
              "required": [
                "quantity",
                "item"
              ]
            }
          }
        },
        "required": [
          "merchant_mcp_url",
          "id",
          "line_items"
        ]
      }
    },
    {
      "name": "cancel_cart",
      "description": "Permanently cancel an existing cart. Destructive.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "merchant_mcp_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "merchant_mcp_url",
          "id"
        ]
      }
    },
    {
      "name": "generate_image",
      "description": "Generate an original image from a text prompt; returns a public image URL.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "What the image should show."
          }
        },
        "required": [
          "prompt"
        ]
      }
    }
  ]
}