PerspectPerspectDocs
Go to Admin
View as Markdown

Categories

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

category_create

Title: Create Category

Create a new category. Set parent_id to create a subcategory. The returned ID can be used with product_create/product_update to assign products.

Required permission: products.create

Parameters

Parameter Type Required Default Description
category string Yes — Category name
description string No — Category description
slug string No — URL slug
parent_id number No — Parent category ID for nested categories
order number No — Display order
custom object No — Custom fields

Example call

{
  "tool": "category_create",
  "arguments": {
    "category": "string"
  }
}

Output schema

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

category_delete

Title: Delete Category

Delete a category. Use reassignTo to move its products to another category before deletion.

Required permission: products.delete

Parameters

Parameter Type Required Default Description
categoryId number Yes — Category ID
reassignTo number No — Category ID to reassign products to

Example call

{
  "tool": "category_delete",
  "arguments": {
    "categoryId": 1
  }
}

Output schema

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

category_get

Title: Get Category

Get a specific category by ID or slug

Required permission: products.read

Parameters

Parameter Type Required Default Description
categoryId number No — Category ID (use either this or slug)
slug string No — Category slug (use either this or categoryId)

Example call

{
  "tool": "category_get",
  "arguments": {}
}

Output schema

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

category_list

Title: List Categories

List categories for a site. Set hierarchical=true to get a nested tree structure. Use category IDs with product_create, product_update, or category_products.

Required permission: products.read

Parameters

Parameter Type Required Default Description
parent_id number No — Filter by parent category ID
hierarchical boolean No false Return categories in hierarchical structure

Example call

{
  "tool": "category_list",
  "arguments": {
    "hierarchical": false
  }
}

Output schema

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

category_products

Title: List Products by Category

List products assigned to a specific category. Use category_list to find category IDs. Returns paginated results with optional published filter.

Required permission: products.read

Parameters

Parameter Type Required Default Description
categoryId number Yes — Category ID
limit number No 20 Maximum number of results
offset number No 0 Number of results to skip
published boolean No — Filter by published status

Example call

{
  "tool": "category_products",
  "arguments": {
    "categoryId": 1,
    "limit": 20,
    "offset": 0
  }
}

Output schema

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

category_update

Title: Update Category

Update an existing category

Required permission: products.update

Parameters

Parameter Type Required Default Description
categoryId number Yes — Category ID
category string No — Category name
description string No — Category description
slug string No — URL slug
parent_id number No — Parent category ID
order number No — Display order
custom object No — Custom fields

Example call

{
  "tool": "category_update",
  "arguments": {
    "categoryId": 1
  }
}

Output schema

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

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