upsertToolRecord
Saves a tenant-scoped JSON record into the Tools store.
Each record belongs to a collection (e.g. freight_booking).
If recordId is omitted, a fresh UUID is generated and a new
record is created. If recordId references an existing record
in the same collection, its payload, metadata, and
schemaVersion are replaced.
On create, the collection's configured notification (if any)
is dispatched. Notification config (channel + target + title)
lives on the tool_collections row.
Business Rules
collectionmust be a registered, non-archived row intool_collectionspayloadis required; the combined serialized size ofpayload+metadatamust be ≤ the per-collection cap (default 64 KiB)- A record cannot move between collections
- An existing
recordIdmust belong to the caller's company
Error Scenarios
- **
BAD_REQUEST**: whencollectionis unregistered, orpayloadis empty or too large - **
NOT_FOUND**: whenrecordIdresolves to a record owned by another company - **
FORBIDDEN**: when caller lackstools:save_record
Permissions Required
tools:save_record
upsertToolRecord(
input: UpsertToolRecordInput!
): ToolRecord!
Arguments
upsertToolRecord.input ● UpsertToolRecordInput! non-null input common
Parameters for UpsertToolRecord
Type
ToolRecord object common
A single tenant-scoped JSON record persisted via the Tools API.
Each record belongs to a collection (a stable namespace) and
carries a payload plus optional metadata.