Tools
get_element
Point read for a single element by id, with full projection by default.
get_element
Default projection is
"all" — you get every field unless you restrict fields.Summary
Return a single element's full record, including icon_variants (the variant keys valid in composed-icon URLs).
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
version | string | yes | — | Schema version. |
element_id | string | yes | — | Whitelisted to [a-zA-Z0-9_-]. |
locales | string[] | no | — | Locales to retain in localized strings. |
fields | string[] | "all" | no | "all" | Field projection. |
Output
{
"ok": true,
"data": {
"version": "ai@2026-04-16-beta",
"element": {
"id": "purpose.example",
"title": [{"locale":"en","value":"Example purpose"}],
"description": [{"locale":"en","value":"Short description."}],
"category_id": "purpose",
"symbol_id": "example-symbol",
"icon_variants": ["default", "dark", "commercial"],
"variables": []
}
},
"meta": { "content_hash": "sha256-…", "version": "ai@2026-04-16-beta" }
}
Errors
| Code | Meaning | Fix |
|---|---|---|
invalid_arguments | Missing / malformed arguments. | Fix the call. |
unknown_version | Version is not registered. | Call list_schema_versions. |
element_not_found | No element with that id. | Use list_elements to enumerate. |
Example
curl -s https://api.dtpr.io/mcp \
-H 'content-type: application/json' \
--data '{
"jsonrpc":"2.0","id":1,
"method":"tools/call",
"params":{
"name":"get_element",
"arguments":{
"version":"ai@2026-04-16-beta",
"element_id":"purpose.example"
}
}
}'
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_element",
"arguments": {
"version": "ai@2026-04-16-beta",
"element_id": "purpose.example",
"locales": ["en"]
}
}
}
See also
- REST
GET /schemas/:version/elements/:element_id get_elements— bulk read up to 100 ids.get_icon_url— build icon URLs fromicon_variants.