Skip to content

A tool result carries artifacts alongside its data, never inside it

A tool can return something structured (a chart, a record, a file reference) that the model is not meant to read as prose. It travels beside the result, not inside it.

The rule

Normative: this is the rule
  1. A tool result MUST have the shape {success, data, error}.
  2. A result whose call attached structured artifacts MUST carry an additional artifacts key.
  3. A result MUST NOT carry the artifacts key unless at least one artifact was attached, so an artifact-free result keeps the plain three-key shape unchanged.
  4. Artifacts MUST be attached additively.
  5. Artifacts MUST NOT be folded into data: the two are disjoint.

What it means

An artifact-free result is indistinguishable from a plain three-key result — artifacts only appears once at least one artifact was attached. A caller that never expects artifacts can keep reading {success, data, error} and never notice the key exists. data and artifacts stay disjoint: an artifact is never folded into data alongside the prose-facing values, and attaching one never changes what data already holds.

Example

A result with nothing attachedplain
{ "success": true, "data": { "ok": true }, "error": null }
The same result, once one artifact is attachedattached
{
  "success": true,
  "data": { "ok": true },
  "error": null,
  "artifacts": [{ "type": "link", "payload": { "url": "https://example.com" } }]
}

Why

Recorded under OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · RT-TOOL-1 · changed in spec 1.0