Tools
list_categories
List the categories defined in a schema version, with locale filtering.
list_categories
Small, cheap call. Use it to populate a category picker or learn the category order the schema ships with.
Summary
Returns every category defined in the schema version, in the order the schema declares. Categories are small — there is no pagination.
Input
| Field | Type | Required | Description |
|---|---|---|---|
version | string | yes | Schema version, e.g. "ai@2026-04-16-beta". |
locales | string[] | no | Locales to retain in localized strings. Omit for every locale. |
Output
{
"ok": true,
"data": {
"version": "ai@2026-04-16-beta",
"categories": [
{
"id": "purpose",
"name": [ { "locale": "en", "value": "Purpose" } ],
"description": [ { "locale": "en", "value": "Why the technology is deployed." } ],
"context": { "values": [ { "id": "commercial", "color": "#…", "label": [...] } ] }
}
]
},
"meta": { "content_hash": "sha256-…", "version": "ai@2026-04-16-beta" }
}
Errors
| Code | Meaning | Fix |
|---|---|---|
invalid_arguments | Missing or malformed version / non-string entries in locales. | Validate the arguments. |
unknown_version | Version is not registered. | Call list_schema_versions. |
Example
curl -s https://api.dtpr.io/mcp \
-H 'content-type: application/json' \
--data '{
"jsonrpc":"2.0","id":1,
"method":"tools/call",
"params":{
"name":"list_categories",
"arguments":{
"version":"ai@2026-04-16-beta",
"locales":["en"]
}
}
}'
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_categories",
"arguments": { "version": "ai@2026-04-16-beta", "locales": ["en"] }
}
}
See also
- REST
GET /schemas/:version/categories list_elements— filter bycategory_id.- Elements & categories