Authentication and enablement
This native tool is off by default. Add it as a configured tool on an agent and select:- a workspace Data Store record type
agentscope for records shared across that logical agent’s task runs and versions, orworkspacescope for records shared with other explicitly configured agents- whether the write result may return fields marked sensitive
Inputs
record: top-level fields to create or patch for a contract-backed record type; the configured tool exposes the contract’s typed fields. Contract fields declared as an openobjectare presented to function-calling models as JSON-encoded strings and decoded before validation; object fields with declared nested properties remain structured objects.record_json: a non-empty JSON object encoded as a string; required instead ofrecordfor a contract-free record type so function-calling models can reliably provide arbitrary fieldskey: required only for a contract-free record type; contract-backed record types derive the key from their configured identity fieldsexpected_version(optional): apply the write only while the stored record is still at this version, taken from an earlier read or write result. Use for read-modify-write updates that must not overwrite a concurrent change.0means the record must not exist yet (create-only). A conditional write with a version ≥ 1 never creates a new record: with no stored record to match, it is refused.
Output
Returns the key, merged JSON value, monotonic version, changed field names,ready, and
missing_required_fields. Sensitive values are replaced with [REDACTED] unless sensitive-read
access is enabled. Preserve the returned key for later exact get or readiness calls,
particularly when a contract uses multiple identity fields or a non-string identity.
A refused expected_version write is reported as an outcome, not an error: write_applied: false,
precondition_failed: true, and current_record holding the record that stands. The refusal is
final — the condition not holding means keeping the stored record is the correct result — and the
agent is instructed to continue without asking the user, retrying only when its own instructions
explicitly require overwriting the newer value.
Limits and side effects
- maximum patch size: 256 KiB
- maximum accumulated record size: 256 KiB
- maximum top-level fields per patch: 100
- omitted fields remain unchanged with the default
mergewrite mode — the agent is instructed to send only the fields it is changing, never an empty value for a field it does not intend to overwrite; a record type configured with thereplacewrite mode stores the supplied document as the whole record, removing omitted fields — omission is how a field is deleted. The agent is instructed to send exactly the fields the record should contain afterwards, and to read-and-copy kept fields only when the request changes some fields but clearly intends to keep the rest (never from conversation memory, which may be stale) - explicit
nullis stored as JSON null by default; a record type configured withclear_nullsremoves the field instead (identity and readiness-required fields are refused) - object and array fields replace their complete previous value; patches do not deep-merge nested data
- disjoint concurrent patches merge atomically
- concurrent writes to the same field are last-write-wins unless the write passes
expected_version, which refuses the write when the stored version no longer matches - records persist until their record type or workspace is deleted, or an operator deletes the record from the Data Store record browser; there is no agent-facing deletion or retention timer
Expected errors
- record type not found
- base tool enabled without first creating a configured instance
- missing or invalid identity field
- undeclared field or configured type mismatch
- merged record exceeds the accumulated size limit
- explicit key missing for a contract-free record type
- configured scope is invalid or agent execution identity is unavailable
- database operation failed