PerspectPerspectDocs
Go to Admin
View as Markdown

Products

This reference is auto-generated from the registered MCP tool providers in perspectapiworkers. It reflects the tools exposed by the per-site Perspect MCP server.

Connection

Use the per-site MCP endpoint:

https://perspect.com/mcp/{siteName}

Authenticate with OAuth or an MCP API key using Authorization: Bearer sk_mcp_....

Tools

product_bulk_update

Title: Bulk Update Products

Update multiple products at once. Supports changing published status, category, or price across many products. Use product_list to get product IDs first.

Required permission: products.update

Parameters

Parameter Type Required Default Description
productIds array<number> Yes — Array of product IDs to update
updates object Yes — —

Example call

{
  "tool": "product_bulk_update",
  "arguments": {
    "productIds": [
      1
    ],
    "updates": {}
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "object",
      "properties": {
        "succeeded": {
          "type": "number"
        },
        "failed": {
          "type": "number"
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "productId": {
                "type": "number"
              },
              "status": {
                "type": "string"
              },
              "error": {
                "type": "string"
              }
            },
            "required": [
              "productId",
              "status"
            ]
          }
        }
      },
      "required": [
        "succeeded",
        "failed",
        "results"
      ]
    }
  },
  "required": [
    "success",
    "message",
    "details"
  ]
}

product_create

Title: Create Product

Create a new product. Requires product name, excerpt, price (display), and unit_amount (Stripe amount in cents). Set product_category_id to assign a category (use category_list to find IDs). Products are unpublished by default — set published=true to make visible.

Required permission: products.create

Parameters

Parameter Type Required Default Description
product string Yes — Product name
description string No — Product description
excerpt string Yes — Short product description
price number Yes — Product price
unit_amount number Yes — Price in cents
currency string No "usd" Currency code (e.g., 'usd')
sku string No — Stock keeping unit
slug string No — URL slug
published boolean No false Publish status
quantity_available number No — Available quantity
stock_quantity number No — Stock quantity (null = unlimited)
attachment_ids array<number> No — Attachment IDs for existing site media to associate with the product
product_category_id number No — Category ID
custom object No — Custom fields

Example call

{
  "tool": "product_create",
  "arguments": {
    "product": "string",
    "excerpt": "string",
    "price": 1,
    "unit_amount": 1,
    "currency": "usd",
    "published": false
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "additionalProperties": true
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "success",
    "data"
  ]
}

product_delete

Title: Delete Product

Delete a product

Required permission: products.delete

Parameters

Parameter Type Required Default Description
productId number Yes — Product ID

Example call

{
  "tool": "product_delete",
  "arguments": {
    "productId": 1
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "success",
    "message"
  ]
}

product_get

Title: Get Product

Get a specific product by ID

Required permission: products.read

Parameters

Parameter Type Required Default Description
productId number Yes — Product ID

Example call

{
  "tool": "product_get",
  "arguments": {
    "productId": 1
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "success",
    "data"
  ]
}

product_list

Title: List Products

List products for a site with optional filters. Filter by published status, category_id, or search term. Returns paginated results. Use category_list to get valid category IDs for filtering.

Required permission: products.read

Parameters

Parameter Type Required Default Description
limit number No 20 Maximum number of results (1-100)
offset number No 0 Number of results to skip
published boolean No — Filter by published status
category_id number No — Filter by category ID
search string No — Search term for product name or description

Example call

{
  "tool": "product_list",
  "arguments": {
    "limit": 20,
    "offset": 0
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "number"
        },
        "offset": {
          "type": "number"
        },
        "total": {
          "type": "number"
        }
      },
      "required": [
        "limit",
        "offset",
        "total"
      ]
    }
  },
  "required": [
    "success",
    "data",
    "metadata"
  ]
}

product_update

Title: Update Product

Update an existing product

Required permission: products.update

Parameters

Parameter Type Required Default Description
productId number Yes — Product ID
product string No — Product name
description string No — Product description
excerpt string No — Short product description
price number No — Product price
unit_amount number No — Price in cents
currency string No — Currency code
sku string No — Stock keeping unit
slug string No — URL slug
published boolean No — Publish status
quantity_available number No — Available quantity
stock_quantity number No — Stock quantity (null = unlimited)
attachment_ids array<number> No — Attachment IDs for existing site media to associate with the product
product_category_id number No — Category ID
custom object No — Custom fields

Example call

{
  "tool": "product_update",
  "arguments": {
    "productId": 1
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "additionalProperties": true
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "success",
    "data"
  ]
}

This page is generated from the registered MCP tool providers. Do not edit it by hand.