Taxonomy
Tools

get_elements

Bulk point-read for up to 100 elements in one call, with per-id soft-failure.
Use this instead of N parallel get_element calls when you have a known id list. Cap is 100 unique ids after server-side dedupe.

Summary

Fetch multiple elements by id. Returns a map { element_id → element | null } — missing ids appear as null values and surface per-id errors alongside.

Input

FieldTypeRequiredDefaultDescription
versionstringyes—Schema version.
element_idsstring[]yes—1–100 unique ids (each ≤128 chars). Server-side dedupes.
localesstring[]no—Locales to retain.
fieldsstring[] | "all"no"all"Field projection.

Output — all hits

{
  "ok": true,
  "data": {
    "version": "dtpr@2026-09-01-beta",
    "elements": {
      "employment": { "id": "employment", "...": "..." },
      "camera":     { "id": "camera",     "...": "..." }
    }
  },
  "meta": { "content_hash": "sha256-…", "version": "dtpr@2026-09-01-beta" }
}

Output — partial miss (soft-failure)

{
  "ok": false,
  "errors": [
    {
      "code": "element_not_found",
      "message": "Element 'not_an_element' not found.",
      "path": "not_an_element",
      "fix_hint": "Use list_elements to enumerate available elements."
    }
  ],
  "meta": { "content_hash": "sha256-…", "version": "dtpr@2026-09-01-beta" },
  "data": {
    "version": "dtpr@2026-09-01-beta",
    "elements": {
      "employment": { "id": "employment", "...": "..." },
      "not_an_element":      null
    }
  }
}

The MCP tool result sets isError: false for this case — hits are preserved, misses surface as errors. See envelope.

Errors

CodeMeaningFix
invalid_argumentselement_ids empty / non-string / id too long.Fix the call.
element_ids_too_many>100 unique ids after dedupe.Split into batches of ≤100 or use list_elements.
unknown_versionVersion is not registered.Call list_schema_versions.
element_not_foundPer-id miss (soft-failure).Inspect data.elements[id] === null.

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_elements",
      "arguments":{
        "version":"dtpr@2026-09-01-beta",
        "element_ids":["employment","camera","not_an_element"],
        "locales":["en"]
      }
    }
  }'

See also