Payloads

The same assembly renders two ways: markdown or JSON. Format changes how the context is written, never what is included.

Markdown — the default

Built for reading. An LLM grounds on it directly, and you can eyeball whether the curation is right.

# Account: Global Media
- **Record ID:** 001Rt000026m64hIAA

- **Account Name:** Global Media
- **Account Type:** Prospect
- **Industry:** Media
- **Employees:** 14,668
- **No value:** Phone, Parent Account

**Summary Metrics:**
- **Open Pipeline:** $40,000
- **Open Cases:** 1 — _Open service cases: a signal of active support load._

**Contacts (3):**
| Contact ID | Full Name | Title | Email |
| --- | --- | --- | --- |
| 003Rt00001Bp8WCIAZ | Geoff Minor | President | info@example.com |
| 003Rt00001Bp8WDIAZ | Carole White | VP Sales | carole@example.com |
  • Curated fields come first, flat, in the order you arranged them. Fields with no value collapse into one No value: line, so an agent knows the field is empty rather than unfetched. A field absent entirely is either not curated at this level or not visible to the caller. The list level omits the line.
  • Values carry their field labels, not API names, formatted by type — currency with its symbol, numbers with separators.
  • Instructions render in italics after the value, so the number arrives with its meaning.
  • Related lists are tables of the child entity’s list columns, with the row count in the header.

JSON — for chaining

Built for programmatic consumers: an agent chaining tools, MCP structured content, your own code. Values travel with their labels, types, and instructions.

{
  "schemaVersion": "0.1-beta",
  "entity": "account",
  "object": "Account",
  "recordId": "001Rt000026m64hIAA",
  "level": "detailed",
  "instruction": "Lead with renewal exposure before pipeline.",
  "fields": [
    { "path": "Name", "label": "Account Name", "type": "string", "value": "Global Media" },
    { "path": "Industry", "label": "Industry", "type": "picklist", "value": "Media" }
  ],
  "metrics": [
    { "label": "Open Pipeline", "value": 40000 },
    { "label": "Open Cases", "value": 1,
      "instruction": "Open service cases: a signal of active support load." }
  ],
  "relatedLists": [
    { "label": "Contacts",
      "columns": ["Id", "Name", "Title", "Email"],
      "truncated": false,
      "records": [
        { "Id": "003Rt00001Bp8WCIAZ", "Name": "Geoff Minor", "Title": "President", "Email": "info@example.com" }
      ] }
  ]
}

Key-by-key detail: JSON payload schema.

NOTE

The schema is versioned and currently 0.1-beta. It will be additive-only once stable; until then, read schemaVersion if you parse it in production.

Choose a format

UseFormat
Grounding an agent’s answerMarkdown
Anything a human reads while debuggingMarkdown
Feeding another tool or a code stepJSON
Extracting one specific value reliablyJSON

Default to markdown: it is what agents expect, it costs fewer tokens (JSON repeats every key on every row), and it is easier to check by eye. Use JSON when something downstream parses rather than reads.

Same data, different format

The engine assembles once and renders twice. What JSON adds is structure: every field arrives as a typed object with its path, label and type, so code reads a value without parsing prose.

Both formats declare emptiness rather than implying it with silence. Markdown collapses empty curated fields into a No value: line and renders an empty reference as None linked.; JSON carries value: null on fields and missing: true on references. Either way the consumer learns the value does not exist, rather than that it was not fetched.

Where format can be specified

WhereHow
An agent actionThe Format input on Get Records or Find Records
A custom toolPinned in the generated class, or exposed as a caller input
Apexrequest.format = 'json'
The Studio previewThe Format toggle in the preview modal

Format is also a dimension in usage metrics, so you can see the token spend per format.

What’s next