Tools

list_elements

Paginated element list with category filter, BM25 search, projection, and locale filtering.

list_elements

The workhorse read. Default projection is ["id","title","category_id"]; pass fields: "all" for the full element shape.

Summary

Returns elements in a schema version. Supports filtering by category_id, BM25 search via query, locale filtering, field projection, and opaque-cursor pagination.

Input

FieldTypeRequiredDefaultDescription
versionstringyesSchema version.
category_idstringnoRestrict to one category.
localestringno"en"Locale used for the query search.
localesstring[]noLocales retained in localized strings.
querystringnoBM25 search across title (boost 3) + description.
fieldsstring[] | "all"no["id","title","category_id"]Field projection.
limitintegerno50Page size (1–200).
cursorstringnoOpaque cursor from a previous call.

Output

{
  "ok": true,
  "data": {
    "version": "ai@2026-04-16-beta",
    "elements": [
      { "id": "purpose.example", "title": [{"locale":"en","value":"Example purpose"}], "category_id": "purpose" }
    ],
    "total": 127,
    "returned": 50
  },
  "meta": {
    "content_hash": "sha256-…",
    "version": "ai@2026-04-16-beta",
    "next_cursor": "eyJvZmZzZXQiOjUwfQ=="
  }
}

When meta.next_cursor is null, you reached the end.

Errors

CodeMeaningFix
invalid_argumentsBad argument types (e.g. limit out of [1,200], non-string cursor).Fix the call.
bad_requestMalformed cursor value.Discard the cursor and re-issue without it.
unknown_versionVersion is not registered.Call list_schema_versions.

Example: paginate through every element

# first page
curl -s https://api.dtpr.io/mcp \
  -H 'content-type: application/json' \
  --data '{
    "jsonrpc":"2.0","id":1,
    "method":"tools/call",
    "params":{
      "name":"list_elements",
      "arguments":{
        "version":"ai@2026-04-16-beta",
        "fields":"all",
        "limit":50
      }
    }
  }'

# follow-up page (pass meta.next_cursor from the first response)
curl -s https://api.dtpr.io/mcp \
  -H 'content-type: application/json' \
  --data '{
    "jsonrpc":"2.0","id":2,
    "method":"tools/call",
    "params":{
      "name":"list_elements",
      "arguments":{
        "version":"ai@2026-04-16-beta",
        "fields":"all",
        "limit":50,
        "cursor":"eyJvZmZzZXQiOjUwfQ=="
      }
    }
  }'

See also

Copyright © 2026