# reference_lookup

> Tusella MCP tool. Server `https://mcp.tusella.com/mcp`. Part of the [Tusella docs for AI agents](https://tusella.com/docs/); every tool in one list: [tools.md](https://tusella.com/docs/mcp/tools.md), [tools.json](https://tusella.com/docs/mcp/tools.json).

Find the valid value before writing a constrained field: category search, category attributes and values, shop sections, shipping profiles, return policies, production partners (created/edited in Etsy), readiness (processing) definitions — the source of readiness_state_id — or the shop's labels (archived ones excluded unless include_archived is true).

- Title: Reference lookup
- Group: Find, read and edit listings
- Granted by scope: `listings:read` or `pinterest:read`
- Team permission: `workspace.read` (any member of the team)
- Effect: Reads only; changes nothing.
- Hints: read-only · idempotent
- HTML: https://tusella.com/docs/mcp/tools/reference_lookup/
- Markdown: https://tusella.com/docs/mcp/tools/reference_lookup.md

## Description

Find the valid value before writing a constrained field: category search, category attributes and values, shop sections, shipping profiles, return policies, production partners (created/edited in Etsy), readiness (processing) definitions — the source of readiness_state_id — or the shop's labels (archived ones excluded unless include_archived is true). An empty result for a shop kind with zero rows is not an error. Shop reference rows also return reference_id, the local UUID for cross-shop Copy mappings; keep using the named provider IDs for listing edits. For attributes first use kind=category_attributes with include_values=false; required_only=true finds required attributes. If include_values is omitted, fitting catalogs remain complete and an oversized catalog returns compact descriptors instead. values_included=false means search/page category_attribute_values by taxonomy_id, property_id and the returned freshness.revision_id. Profile kinds accept entity_id with explicit shop_id for exact qualified parent fields/fingerprint; profile_section=usage, destinations or upgrades pages exact evidence. receipt_ref reads bounded before/after/provider/request evidence via receipt_section. Original processing units remain unknown without receipt input. Shop-profile reads never refresh; use shop_profiles_refresh explicitly. Keep revision_id and query unchanged across pages; restart discovery if a revision is unavailable. Read-only; org-scoped.

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `entity_id` | `string` | no | Exact Etsy profile identity; requires explicit shop_id and a profile kind. |
| `include_archived` | `boolean` | no | label: include archived labels too (default false). |
| `include_values` | `boolean` | no | category_attributes: false returns compact descriptors; true requests complete value catalogs and refuses an oversized row. When omitted, fitting catalogs remain complete; an oversized catalog returns compact descriptors with values_included=false. Search category_attribute_values for those values. |
| `kind` | `"category" \| "category_attribute_values" \| "category_attributes" \| "label" \| "production_partner" \| "readiness_definition" \| "return_policy" \| "shipping_profile" \| …` | yes | Which reference-data set to look up. |
| `leaf_only` | `boolean` | no | Category: restrict to leaf nodes only. |
| `limit` | `integer` | no | Max rows per page (1-50). |
| `offset` | `integer` | no | Page offset, default 0. |
| `profile_section` | `"entity" \| "usage" \| "destinations" \| "upgrades"` | no | Exact profile read section; shipping children and Workspace usage are paged. |
| `property_id` | `integer` | no | category_attribute_values: required Etsy property_id from a descriptor. |
| `query` | `string` | no | Category search (at least 2 characters); category_attribute_values: optional case-insensitive value substring, at most 512 characters. |
| `receipt_ref` | `string` | no | Exact shop-profile mutation receipt; requires explicit shop_id and matching profile kind. |
| `receipt_section` | `"all" \| "before" \| "after" \| "provider" \| "request" \| "before_destinations" \| "after_destinations" \| "before_upgrades" \| …` | no | Exact receipt evidence section; split oversized receipts and page children. |
| `required_only` | `boolean` | no | category_attributes: return only required attributes before pagination. |
| `revision_id` | `integer` | no | Required for category_attribute_values; optional for category_attributes continuation. Copy freshness.revision_id to keep pages on one immutable revision. |
| `shop_id` | `string` | no | UUID of a connected shop from team_overview. External agents may omit it only when the team has one selectable shop; an in-app turn may use its selected shop. |
| `taxonomy_id` | `integer` | no | category_attributes / category_attribute_values: the category id. |

## Example arguments

```json
{
  "kind": "category",
  "query": "mug"
}
```

## Example result

```json
{
  "result": {
    "scope": {
      "organization_id": "00000000-0000-0000-0000-000000000001"
    },
    "freshness": {
      "schema_snapshot_version": 1
    },
    "provenance": "workspace",
    "data": [
      {
        "taxonomy_id": 190,
        "label": "Mugs",
        "path": [
          "Home",
          "Mugs"
        ],
        "is_leaf": true
      }
    ]
  }
}
```

## Input schema

```json
{
  "allOf": [
    {
      "if": {
        "properties": {
          "kind": {
            "const": "category"
          }
        }
      },
      "then": {
        "properties": {
          "query": {
            "minLength": 2
          }
        },
        "required": [
          "query"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "kind": {
            "const": "category_attribute_values"
          }
        }
      },
      "then": {
        "required": [
          "taxonomy_id",
          "property_id",
          "revision_id"
        ]
      }
    }
  ],
  "properties": {
    "entity_id": {
      "description": "Exact Etsy profile identity; requires explicit shop_id and a profile kind.",
      "maxLength": 20,
      "pattern": "^[1-9][0-9]*$",
      "type": "string"
    },
    "include_archived": {
      "description": "label: include archived labels too (default false).",
      "type": "boolean"
    },
    "include_values": {
      "description": "category_attributes: false returns compact descriptors; true requests complete value catalogs and refuses an oversized row. When omitted, fitting catalogs remain complete; an oversized catalog returns compact descriptors with values_included=false. Search category_attribute_values for those values.",
      "type": "boolean"
    },
    "kind": {
      "description": "Which reference-data set to look up.",
      "enum": [
        "category",
        "category_attribute_values",
        "category_attributes",
        "label",
        "production_partner",
        "readiness_definition",
        "return_policy",
        "shipping_profile",
        "shop_section"
      ],
      "type": "string"
    },
    "leaf_only": {
      "description": "Category: restrict to leaf nodes only.",
      "type": "boolean"
    },
    "limit": {
      "description": "Max rows per page (1-50).",
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "description": "Page offset, default 0.",
      "type": "integer"
    },
    "profile_section": {
      "description": "Exact profile read section; shipping children and Workspace usage are paged.",
      "enum": [
        "entity",
        "usage",
        "destinations",
        "upgrades"
      ]
    },
    "property_id": {
      "description": "category_attribute_values: required Etsy property_id from a descriptor.",
      "minimum": 1,
      "type": "integer"
    },
    "query": {
      "description": "Category search (at least 2 characters); category_attribute_values: optional case-insensitive value substring, at most 512 characters.",
      "type": "string"
    },
    "receipt_ref": {
      "description": "Exact shop-profile mutation receipt; requires explicit shop_id and matching profile kind.",
      "format": "uuid",
      "type": "string"
    },
    "receipt_section": {
      "description": "Exact receipt evidence section; split oversized receipts and page children.",
      "enum": [
        "all",
        "before",
        "after",
        "provider",
        "request",
        "before_destinations",
        "after_destinations",
        "before_upgrades",
        "after_upgrades"
      ]
    },
    "required_only": {
      "default": false,
      "description": "category_attributes: return only required attributes before pagination.",
      "type": "boolean"
    },
    "revision_id": {
      "description": "Required for category_attribute_values; optional for category_attributes continuation. Copy freshness.revision_id to keep pages on one immutable revision.",
      "minimum": 1,
      "type": "integer"
    },
    "shop_id": {
      "description": "UUID of a connected shop from team_overview. External agents may omit it only when the team has one selectable shop; an in-app turn may use its selected shop.",
      "type": "string"
    },
    "taxonomy_id": {
      "description": "category_attributes / category_attribute_values: the category id.",
      "type": "integer"
    }
  },
  "required": [
    "kind"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "data": {
      "anyOf": [
        {
          "description": "Exact qualified profile or bounded receipt evidence; preserves identities, qualification, omissions and continuation.",
          "type": "object"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "is_leaf": {
                "type": "boolean"
              },
              "label": {
                "type": "string"
              },
              "path": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "taxonomy_id": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "archived": {
                "type": "boolean"
              },
              "color": {
                "type": "string"
              },
              "label_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "is_multivalued": {
                "type": "boolean"
              },
              "is_required": {
                "type": "boolean"
              },
              "max_values_allowed": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "possible_values": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "property_id": {
                "type": "integer"
              },
              "scale_options": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "supports_attributes": {
                "type": "boolean"
              },
              "supports_variations": {
                "type": "boolean"
              },
              "value_count": {
                "type": "integer"
              },
              "value_options": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "value_type": {
                "type": "string"
              },
              "values_included": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "property_value_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scale_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "property_value_id",
              "scale_id"
            ],
            "type": "object"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "detail": {
              "type": "string"
            },
            "shop_ids": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "status": {
              "const": "cannot_resolve",
              "type": "string"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "retry": {
              "const": true,
              "type": "boolean"
            },
            "status": {
              "const": "resolving",
              "type": "string"
            }
          },
          "required": [
            "status",
            "retry"
          ],
          "type": "object"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "reference_id": {
                "format": "uuid",
                "type": "string"
              },
              "shop_section_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "origin_country_iso": {
                "type": "string"
              },
              "processing_max": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "processing_min": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "profile_type": {
                "type": "string"
              },
              "reference_id": {
                "format": "uuid",
                "type": "string"
              },
              "shipping_profile_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "accepts_exchanges": {
                "type": "boolean"
              },
              "accepts_returns": {
                "type": "boolean"
              },
              "reference_id": {
                "format": "uuid",
                "type": "string"
              },
              "return_deadline": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "return_policy_id": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "location": {
                "type": "string"
              },
              "partner_name": {
                "type": "string"
              },
              "production_partner_id": {
                "type": "string"
              },
              "reference_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "production_partner_id",
              "partner_name",
              "location"
            ],
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {
            "additionalProperties": false,
            "properties": {
              "label": {
                "type": "string"
              },
              "processing_display": {
                "type": "string"
              },
              "processing_max": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "processing_min": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "readiness_state_id": {
                "type": "integer"
              },
              "reference_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        }
      ],
      "description": "Shape depends on kind: category → array of taxonomy candidates; category_attribute_values → array of exact value/ID/scale rows; category_attributes → array of attribute rows, or an object reporting the metadata is not yet resolvable (status cannot_resolve or resolving); label → array of the shop's labels, or an object reporting the shop cannot be resolved (status cannot_resolve); shop_section / shipping_profile / return_policy / readiness_definition / production_partner → array of that shop-reference kind's rows."
    },
    "freshness": {
      "type": "object"
    },
    "next_offset": {
      "type": "integer"
    },
    "provenance": {
      "type": "string"
    },
    "scope": {
      "additionalProperties": false,
      "properties": {
        "organization_id": {
          "type": "string"
        },
        "property_id": {
          "type": "integer"
        },
        "shop_id": {
          "type": "string"
        },
        "taxonomy_id": {
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "scope",
    "freshness",
    "provenance",
    "data"
  ],
  "type": "object",
  "x-result-size-budget": {
    "description": "At most 50 rows per page; list results are cut to the longest complete-response prefix and continue through next_offset; one row that cannot fit is refused rather than truncated",
    "max_bytes": 65536,
    "strategy": "row-pagination"
  }
}
```

Generated from the application’s public MCP contract at commit `25de6b1bdce5` (2026-11-24).
