Get Product Attribute
Gets a single global WooCommerce product attribute by ID.
Also known as: attribute details, attribute terms.
| Property | Value |
|---|---|
| Ability slug | mosmcp/get-product-attribute |
| Wire tool name | mosmcp__get-product-attribute |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_products |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer | Yes | — | The global attribute ID (required). |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| message | string | |
| data | object | |
| data.id | integer | |
| data.name | string | |
| data.slug | string | |
| data.type | string | |
| data.order_by | string | |
| data.has_archives | boolean | |
| meta | object | |
| meta.ability | string | |
| meta.timestamp | string | |
| meta.execution_time | string \| null |
Example
Sample prompt
Show me the details of the Size attribute (ID 2).
Example request (json)
{
"jsonrpc": "2.0",
"id": 371,
"method": "tools/call",
"params": {
"name": "mosmcp__get-product-attribute",
"arguments": {
"input": {
"id": 2
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 371,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "Attribute retrieved.",
"data": {
"id": 2,
"name": "Size",
"slug": "pa_size",
"type": "select",
"order_by": "menu_order",
"has_archives": false
},
"meta": {
"ability": "mosmcp/get-product-attribute",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms"
}
}
}
}
Edge cases / errors
- id missing or not positive → wcab_invalid_id.
- No global attribute with that ID → wcab_attribute_not_found.
- Returns attribute settings only; use the attribute's taxonomy (e.g. pa_size) to look up its terms.
| << Previous | Next >> |
|---|---|
| Get Product | List Coupons |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.