{
  "server": {
    "name": "sedra",
    "url": "https://mcp.sedra.one/mcp",
    "transport": "streamable-http",
    "auth": "OAuth 2.1 (PKCE, dynamic client registration) or Bearer sdr_ai_ credential"
  },
  "generated_from": "/openapi/agent.json",
  "tools": [
    {
      "name": "approvals_list",
      "capability": "approvals.list",
      "title": "List approval requests",
      "description": "Lists sensitive operations awaiting or after human approval for a business. Agents cannot approve; a human must decide in the Sedra app.",
      "group": "approvals",
      "action": "read",
      "scope": "operations:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "status": {
                "enum": [
                  "pending",
                  "approved",
                  "rejected",
                  "executed",
                  "failed",
                  "expired"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/approvals.list"
    },
    {
      "name": "catalog_categories_create",
      "capability": "catalog.categories.create",
      "title": "Create a category",
      "description": "Creates a product category in the selected business (optionally under a parent category of the same business).",
      "group": "catalog",
      "action": "write",
      "scope": "catalog:write",
      "min_role": "operator",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "handle": {
                "maxLength": 120,
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "type": "string"
              },
              "name": {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              "name_ar": {
                "maxLength": 120,
                "type": "string"
              },
              "parent_category_id": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.categories.create"
    },
    {
      "name": "catalog_categories_list",
      "capability": "catalog.categories.list",
      "title": "List categories",
      "description": "Lists the selected business's product categories.",
      "group": "catalog",
      "action": "read",
      "scope": "catalog:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.categories.list"
    },
    {
      "name": "catalog_prices_bulk_update",
      "capability": "catalog.prices.bulk_update",
      "title": "Bulk-change variant prices (approval required)",
      "description": "Changes prices of many variants in the business currency. Sensitive: returns a before/after preview and requires human approval before applying.",
      "group": "catalog",
      "action": "sensitive",
      "scope": "catalog:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": true,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "changes": {
                "items": {
                  "properties": {
                    "amount": {
                      "description": "Amount in major units, e.g. 12.5 = 12.500 BHD",
                      "maximum": 1000000,
                      "minimum": 0,
                      "type": "number"
                    },
                    "variant_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "variant_id",
                    "amount"
                  ],
                  "type": "object"
                },
                "maxItems": 500,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "changes"
            ],
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.prices.bulk_update"
    },
    {
      "name": "catalog_products_create",
      "capability": "catalog.products.create",
      "title": "Create a product",
      "description": "Creates a product in the selected business with one or more variants priced in the business currency, attaches it to the business's sales channel and seeds stock at the business's stock locations. Supports dry_run. Defaults to draft.",
      "group": "catalog",
      "action": "write",
      "scope": "catalog:write",
      "min_role": "operator",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "category_ids": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "description": {
                "maxLength": 5000,
                "type": "string"
              },
              "description_ar": {
                "maxLength": 5000,
                "type": "string"
              },
              "handle": {
                "maxLength": 120,
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "type": "string"
              },
              "status": {
                "default": "draft",
                "enum": [
                  "draft",
                  "published"
                ],
                "type": "string"
              },
              "thumbnail": {
                "format": "uri",
                "type": "string"
              },
              "title": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "title_ar": {
                "description": "Arabic title (stored in product metadata)",
                "maxLength": 200,
                "type": "string"
              },
              "variants": {
                "items": {
                  "properties": {
                    "initial_stock": {
                      "default": 0,
                      "maximum": 1000000,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "price": {
                      "description": "Amount in major units, e.g. 12.5 = 12.500 BHD",
                      "maximum": 1000000,
                      "minimum": 0,
                      "type": "number"
                    },
                    "sku": {
                      "maxLength": 64,
                      "type": "string"
                    },
                    "title": {
                      "default": "Default",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "price"
                  ],
                  "type": "object"
                },
                "maxItems": 50,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "title",
              "variants"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.products.create"
    },
    {
      "name": "catalog_products_delete",
      "capability": "catalog.products.delete",
      "title": "Delete products (approval required)",
      "description": "Deletes products from the selected business. Sensitive: creates an approval request that a human manager must approve before anything is deleted.",
      "group": "catalog",
      "action": "sensitive",
      "scope": "catalog:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": true,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "ids": {
                "items": {
                  "type": "string"
                },
                "maxItems": 50,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "ids"
            ],
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.products.delete"
    },
    {
      "name": "catalog_products_get",
      "capability": "catalog.products.get",
      "title": "Get a product",
      "description": "Returns one product of the selected business by id or handle.",
      "group": "catalog",
      "action": "read",
      "scope": "catalog:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "handle": {
                "maxLength": 120,
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.products.get"
    },
    {
      "name": "catalog_products_search",
      "capability": "catalog.products.search",
      "title": "Search products",
      "description": "Searches the selected business's products by text (title/handle/description) and status. Returns variants, SKUs and prices. Only this business's products are visible.",
      "group": "catalog",
      "action": "read",
      "scope": "catalog:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "q": {
                "maxLength": 200,
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "proposed",
                  "published",
                  "rejected"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.products.search"
    },
    {
      "name": "catalog_products_update",
      "capability": "catalog.products.update",
      "title": "Update a product",
      "description": "Updates title, description, Arabic texts, status (draft/published), thumbnail or categories of a product in the selected business. Prices are changed with catalog.prices.bulk_update.",
      "group": "catalog",
      "action": "write",
      "scope": "catalog:write",
      "min_role": "operator",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "category_ids": {
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "description": {
                "maxLength": 5000,
                "type": "string"
              },
              "description_ar": {
                "maxLength": 5000,
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "published"
                ],
                "type": "string"
              },
              "thumbnail": {
                "format": "uri",
                "type": "string"
              },
              "title": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "title_ar": {
                "maxLength": 200,
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/catalog.products.update"
    },
    {
      "name": "customers_list",
      "capability": "customers.list",
      "title": "Review customers",
      "description": "Lists customers of the selected business. Emails and phone numbers are masked; addresses and payment data are never returned.",
      "group": "customers",
      "action": "read",
      "scope": "customers:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "q": {
                "maxLength": 100,
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/customers.list"
    },
    {
      "name": "devices_config_update",
      "capability": "devices.config.update",
      "title": "Update device business configuration",
      "description": "Updates non-safety business configuration of a device (display message, maintenance mode). Hardware control, dispensing and safety interlocks are NOT accessible. Supports dry_run.",
      "group": "devices",
      "action": "write",
      "scope": "inventory:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "device_id": {
                "type": "string"
              },
              "display_message": {
                "additionalProperties": false,
                "properties": {
                  "ar": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "en": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "maintenance_mode": {
                "type": "boolean"
              }
            },
            "required": [
              "device_id"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/devices.config.update"
    },
    {
      "name": "devices_list",
      "capability": "devices.list",
      "title": "List physical devices",
      "description": "Lists the selected business's vending machines / kiosks with status, last-seen time and latest telemetry. Agents can read device state but can never actuate hardware.",
      "group": "devices",
      "action": "read",
      "scope": "operations:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/devices.list"
    },
    {
      "name": "devices_vends_list",
      "capability": "devices.vends.list",
      "title": "List vending transactions",
      "description": "Lists recent vending transactions (paid, dispensed, failed, refund requested) for the business's devices.",
      "group": "devices",
      "action": "read",
      "scope": "orders:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "status": {
                "enum": [
                  "created",
                  "paid",
                  "dispensed",
                  "dispense_failed",
                  "refund_requested",
                  "refunded",
                  "cancelled"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/devices.vends.list"
    },
    {
      "name": "inventory_levels_list",
      "capability": "inventory.levels.list",
      "title": "Query inventory levels",
      "description": "Lists stocked, reserved and available quantities per variant and stock location for the selected business. Optionally filter by product or a low-stock threshold.",
      "group": "inventory",
      "action": "read",
      "scope": "inventory:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "low_stock_threshold": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "product_id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/inventory.levels.list"
    },
    {
      "name": "inventory_levels_set",
      "capability": "inventory.levels.set",
      "title": "Set stock quantity",
      "description": "Sets the stocked quantity of a variant at one of the business's stock locations (absolute value, or a relative adjustment with `adjust_by`). Supports dry_run.",
      "group": "inventory",
      "action": "write",
      "scope": "inventory:write",
      "min_role": "operator",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "adjust_by": {
                "maximum": 1000000,
                "minimum": -1000000,
                "type": "integer"
              },
              "location_id": {
                "type": "string"
              },
              "note": {
                "maxLength": 500,
                "type": "string"
              },
              "stocked_quantity": {
                "maximum": 1000000,
                "minimum": 0,
                "type": "integer"
              },
              "variant_id": {
                "type": "string"
              }
            },
            "required": [
              "variant_id",
              "location_id"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/inventory.levels.set"
    },
    {
      "name": "inventory_stock_locations_list",
      "capability": "inventory.stock_locations.list",
      "title": "List stock locations",
      "description": "Lists the selected business's stock locations (warehouses, shops, vending machines).",
      "group": "inventory",
      "action": "read",
      "scope": "inventory:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/inventory.stock_locations.list"
    },
    {
      "name": "jobs_status",
      "capability": "jobs.status",
      "title": "Monitor background jobs",
      "description": "Shows the heartbeat of Sedra background jobs (last run, status, run count). Platform-wide, read-only.",
      "group": "jobs",
      "action": "read",
      "scope": "operations:read",
      "min_role": "viewer",
      "tenant_scoped": false,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/jobs.status"
    },
    {
      "name": "marketplace_payouts_summary",
      "capability": "marketplace.payouts.summary",
      "title": "Vendor payout summary",
      "description": "Totals per vendor for a period: sales, marketplace commission and amount owed to the vendor (fulfilled orders only count as payable). Vendors see only their own line.",
      "group": "marketplace",
      "action": "read",
      "scope": "reports:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "from": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              },
              "to": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/marketplace.payouts.summary"
    },
    {
      "name": "marketplace_vendor_orders_list",
      "capability": "marketplace.vendor_orders.list",
      "title": "List vendor order shares",
      "description": "Per-vendor shares of marketplace orders (items, subtotal, commission, payout, status). Vendors see only their own; operators can filter by vendor.",
      "group": "marketplace",
      "action": "read",
      "scope": "orders:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 25,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "status": {
                "enum": [
                  "open",
                  "fulfilled",
                  "canceled"
                ],
                "type": "string"
              },
              "vendor_id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/marketplace.vendor_orders.list"
    },
    {
      "name": "marketplace_vendors_list",
      "capability": "marketplace.vendors.list",
      "title": "List marketplace vendors",
      "description": "Lists the vendors selling in this marketplace with status, commission rate, product count and sales in the last 30 days.",
      "group": "marketplace",
      "action": "read",
      "scope": "catalog:read",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "status": {
                "enum": [
                  "active",
                  "suspended"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/marketplace.vendors.list"
    },
    {
      "name": "marketplace_vendors_set_commission",
      "capability": "marketplace.vendors.set_commission",
      "title": "Change a vendor's commission (approval required)",
      "description": "Changes the commission percentage the marketplace keeps from a vendor's sales. Applies to new orders. Sensitive: requires human approval.",
      "group": "marketplace",
      "action": "sensitive",
      "scope": "payments:sensitive",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": true,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "commission_rate": {
                "maximum": 50,
                "minimum": 0,
                "type": "number"
              },
              "vendor_id": {
                "type": "string"
              }
            },
            "required": [
              "vendor_id",
              "commission_rate"
            ],
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/marketplace.vendors.set_commission"
    },
    {
      "name": "marketplace_vendors_set_status",
      "capability": "marketplace.vendors.set_status",
      "title": "Suspend or reactivate a vendor",
      "description": "Suspends a vendor (its products stay listed only if you also unpublish them) or reactivates it. Suspended vendors cannot make changes.",
      "group": "marketplace",
      "action": "write",
      "scope": "catalog:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "reason": {
                "maxLength": 300,
                "type": "string"
              },
              "status": {
                "enum": [
                  "active",
                  "suspended"
                ],
                "type": "string"
              },
              "vendor_id": {
                "type": "string"
              }
            },
            "required": [
              "vendor_id",
              "status"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/marketplace.vendors.set_status"
    },
    {
      "name": "operations_audit_log",
      "capability": "operations.audit_log",
      "title": "Read the AI/integration audit log",
      "description": "Returns recent audited operations for a business, newest first.",
      "group": "operations",
      "action": "read",
      "scope": "operations:read",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "actor_id": {
                "type": "string"
              },
              "limit": {
                "default": 50,
                "maximum": 200,
                "minimum": 1,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/operations.audit_log"
    },
    {
      "name": "operations_failed",
      "capability": "operations.failed",
      "title": "Review failed or denied operations",
      "description": "Returns recent failed or denied capability calls for a business (from the audit log) to help diagnose integration or permission problems.",
      "group": "operations",
      "action": "read",
      "scope": "operations:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 25,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/operations.failed"
    },
    {
      "name": "orders_fulfillment_create",
      "capability": "orders.fulfillment.create",
      "title": "Fulfill order items",
      "description": "Creates a fulfillment for all (or the listed) unfulfilled items of an order in the selected business, from one of its stock locations. Supports dry_run.",
      "group": "orders",
      "action": "write",
      "scope": "orders:write",
      "min_role": "operator",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": true,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "items": {
                "items": {
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "quantity": {
                      "maximum": 9007199254740991,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "quantity"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "location_id": {
                "type": "string"
              },
              "order_id": {
                "type": "string"
              }
            },
            "required": [
              "order_id"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/orders.fulfillment.create"
    },
    {
      "name": "orders_get",
      "capability": "orders.get",
      "title": "Get an order",
      "description": "Returns one order of the selected business including items, totals, payments and fulfillments.",
      "group": "orders",
      "action": "read",
      "scope": "orders:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/orders.get"
    },
    {
      "name": "orders_list",
      "capability": "orders.list",
      "title": "Review orders",
      "description": "Lists the selected business's orders, newest first, with payment and fulfillment status. Customer emails are masked.",
      "group": "orders",
      "action": "read",
      "scope": "orders:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "limit": {
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "since": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              },
              "status": {
                "enum": [
                  "pending",
                  "completed",
                  "draft",
                  "archived",
                  "canceled",
                  "requires_action"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/orders.list"
    },
    {
      "name": "orders_refund",
      "capability": "orders.refund",
      "title": "Refund an order payment (approval required)",
      "description": "Refunds all or part of an order's captured payment. Sensitive: creates an approval request; nothing is refunded until a human manager approves.",
      "group": "orders",
      "action": "sensitive",
      "scope": "payments:sensitive",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": true,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "amount": {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              "note": {
                "maxLength": 500,
                "type": "string"
              },
              "order_id": {
                "type": "string"
              }
            },
            "required": [
              "order_id"
            ],
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/orders.refund"
    },
    {
      "name": "platform_capabilities",
      "capability": "platform.capabilities",
      "title": "List platform capabilities",
      "description": "Lists every Sedra capability with its input schema, required scope and whether it needs approval. Only capabilities you hold the scope for are marked usable.",
      "group": "platform",
      "action": "read",
      "scope": "platform:read",
      "min_role": "viewer",
      "tenant_scoped": false,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/platform.capabilities"
    },
    {
      "name": "platform_whoami",
      "capability": "platform.whoami",
      "title": "Describe the current identity",
      "description": "Returns the authenticated identity, its granted scopes and the businesses it can access with which role.",
      "group": "platform",
      "action": "read",
      "scope": "platform:read",
      "min_role": "viewer",
      "tenant_scoped": false,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/platform.whoami"
    },
    {
      "name": "promotions_create",
      "capability": "promotions.create",
      "title": "Create a promotion code",
      "description": "Creates an order-level discount code for the selected business (percentage or fixed amount in the business currency). Created as draft unless activate=true. Supports dry_run.",
      "group": "promotions",
      "action": "write",
      "scope": "promotions:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "activate": {
                "default": false,
                "type": "boolean"
              },
              "code": {
                "description": "Upper-case code, 3-32 chars",
                "pattern": "^[A-Z0-9_-]{3,32}$",
                "type": "string"
              },
              "type": {
                "enum": [
                  "percentage",
                  "fixed"
                ],
                "type": "string"
              },
              "value": {
                "exclusiveMinimum": 0,
                "maximum": 100000,
                "type": "number"
              }
            },
            "required": [
              "code",
              "type",
              "value"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/promotions.create"
    },
    {
      "name": "promotions_list",
      "capability": "promotions.list",
      "title": "List promotions",
      "description": "Lists the selected business's promotions (codes, type, value, status).",
      "group": "promotions",
      "action": "read",
      "scope": "promotions:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/promotions.list"
    },
    {
      "name": "promotions_set_status",
      "capability": "promotions.set_status",
      "title": "Activate or deactivate a promotion",
      "description": "Changes a promotion's status (active / inactive / draft) in the selected business.",
      "group": "promotions",
      "action": "write",
      "scope": "promotions:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "draft"
                ],
                "type": "string"
              }
            },
            "required": [
              "id",
              "status"
            ],
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/promotions.set_status"
    },
    {
      "name": "reports_compare_businesses",
      "capability": "reports.compare_businesses",
      "title": "Compare business performance",
      "description": "Compares sales across every business this identity can report on (it silently skips businesses it is not authorized for). Default period: last 30 days.",
      "group": "reports",
      "action": "read",
      "scope": "reports:read",
      "min_role": "viewer",
      "tenant_scoped": false,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "from": {
                "description": "Defaults to 30 days ago",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              },
              "to": {
                "description": "Defaults to now",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/reports.compare_businesses"
    },
    {
      "name": "reports_daily_briefing",
      "capability": "reports.daily_briefing",
      "title": "Daily business briefing",
      "description": "One-call morning summary: today and yesterday vs the same days last week, orders waiting to be fulfilled, low-stock items and pending approvals. Times use Asia/Bahrain.",
      "group": "reports",
      "action": "read",
      "scope": "reports:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "low_stock_threshold": {
                "default": 5,
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/reports.daily_briefing"
    },
    {
      "name": "reports_inventory",
      "capability": "reports.inventory",
      "title": "Inventory report",
      "description": "Stock totals per variant for the selected business plus a list of low-stock items at or below the threshold (default 5).",
      "group": "reports",
      "action": "read",
      "scope": "reports:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "low_stock_threshold": {
                "default": 5,
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/reports.inventory"
    },
    {
      "name": "reports_sales_summary",
      "capability": "reports.sales_summary",
      "title": "Sales summary",
      "description": "Revenue, order count, average order value, daily breakdown and top products for the selected business over a period (default last 30 days). Amounts are in the business currency (BHD has 3 decimals).",
      "group": "reports",
      "action": "read",
      "scope": "reports:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "from": {
                "description": "Defaults to 30 days ago",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              },
              "to": {
                "description": "Defaults to now",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/reports.sales_summary"
    },
    {
      "name": "storefront_content_get",
      "capability": "storefront.content.get",
      "title": "Get storefront content",
      "description": "Returns the selected business's editable storefront content (announcement bar, hero texts, SEO description) and theme tokens.",
      "group": "storefront",
      "action": "read",
      "scope": "storefront:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/storefront.content.get"
    },
    {
      "name": "storefront_content_update",
      "capability": "storefront.content.update",
      "title": "Update storefront content",
      "description": "Updates bilingual storefront content (announcement, hero title/subtitle, SEO description) for the selected business. Theme colors are changed with theme_tokens (hex colors only). Supports dry_run.",
      "group": "storefront",
      "action": "write",
      "scope": "storefront:write",
      "min_role": "manager",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": true,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "announcement": {
                "additionalProperties": false,
                "properties": {
                  "ar": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "en": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "hero_subtitle": {
                "additionalProperties": false,
                "properties": {
                  "ar": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "en": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "hero_title": {
                "additionalProperties": false,
                "properties": {
                  "ar": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "en": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "seo_description": {
                "additionalProperties": false,
                "properties": {
                  "ar": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "en": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "theme_tokens": {
                "additionalProperties": {
                  "pattern": "^#[0-9a-fA-F]{6}$",
                  "type": "string"
                },
                "propertyNames": {
                  "enum": [
                    "primary",
                    "accent",
                    "background",
                    "surface",
                    "text",
                    "muted"
                  ],
                  "type": "string"
                },
                "required": [
                  "primary",
                  "accent",
                  "background",
                  "surface",
                  "text",
                  "muted"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant",
          "idempotency_key"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/storefront.content.update"
    },
    {
      "name": "tenant_config_get",
      "capability": "tenant.config.get",
      "title": "Inspect business configuration",
      "description": "Returns one business's configuration: currency, locales, timezone, domains, theme tokens, storefront content and the Medusa resources it owns (sales channels, stock locations). Contains no secrets.",
      "group": "tenant",
      "action": "read",
      "scope": "platform:read",
      "min_role": "viewer",
      "tenant_scoped": true,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": true,
      "untrusted_content": true,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          },
          "tenant": {
            "description": "Business id (ten_...) or handle",
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/tenant.config.get"
    },
    {
      "name": "tenants_list",
      "capability": "tenants.list",
      "title": "List authorized businesses",
      "description": "Lists the businesses (tenants) this identity may operate, with currency, locales and its role. Use a business handle or id as the `tenant` argument of other tools.",
      "group": "tenants",
      "action": "read",
      "scope": "platform:read",
      "min_role": "viewer",
      "tenant_scoped": false,
      "requires_approval": false,
      "supports_dry_run": false,
      "vendor_aware": false,
      "untrusted_content": false,
      "inputSchema": {
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "rest": "POST /foulad/agent/invoke/tenants.list"
    },
    {
      "name": "select_business",
      "title": "Select business",
      "description": "Gateway-only session helper: sets the default business (tenant handle) for later tool calls in this MCP session. Calls no backend capability.",
      "group": "platform",
      "action": "read",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "tenant"
        ]
      }
    }
  ]
}