Ledger relation add
Record a relation between retained entities.
op_sys_command_ledger_relation_addOn this page
Use this capability
op-sys --output json tools call op_sys_command_ledger_relation_add \ --arguments '{"from_entity":"<from_entity>","to_entity":"<to_entity>","type":"<type>"}'Request template: replace placeholder identities and supply complete contract-specific objects before use. Required arguments are shown; optional arguments are listed below. MCP requests assume an initialized connection.
Named CLI command: op-sys ledger relation add. Use --help for command-specific flag syntax; the CLI/SDK/MCP examples share arguments; HTTP uses the documented route and body.
Parameters
Arguments are a JSON object. The published schema does not permit unknown top-level fields. Some retained CLI JSON flags are strings containing JSON; follow the declared type.
actorstringOptionalActor recorded on writes and audit entries.
Schema default:
"operator"approvalstringOptionalcontractstringOptionalContract body when publishing/creating; immutable contract reference when selecting an admitted contract for a write.
datastringOptionalOperation-specific structured data; follow this operation’s input schema. File wire operations use bytes_base64 for bounded byte chunks.
from_entitystringRequiredstrict_contractbooleanOptionalSchema default:
falseto_entitystringRequiredtypestringRequiredworkflowstringOptional
Complete input JSON Schema
{ "additionalProperties": false, "properties": { "actor": { "default": "operator", "description": "Actor recorded on writes and audit entries.", "type": "string" }, "approval": { "type": "string" }, "contract": { "type": "string" }, "data": { "type": "string" }, "from_entity": { "type": "string" }, "strict_contract": { "default": false, "type": "boolean" }, "to_entity": { "type": "string" }, "type": { "type": "string" }, "workflow": { "type": "string" } }, "required": [ "from_entity", "to_entity", "type" ], "type": "object"}Behavior & authority
Existing local policies, approvals and cooperative actor controls apply. These operations are retained capabilities, not the definition of a Veylar Record ledger.
Rules shared by optional coordination operations
- Entities, claims, comments and artifacts use the retained event model. They do not create a universal task schema in generic ledgers.
- Mutation operations can record local execution events and audits. The former automatic source-upload path is removed; these events do not synchronize as ledger records.
- Where idempotency keys are accepted, preserve them across uncertain retries. Where no retry identity is available, inspect the result before repeating a mutation.
Response
Returns the relation payload. See the retained event-model and output documentation for the resource fields.
CLI tools/call result: payload.tool.result. Response envelopes across CLI, SDK and MCP ↗
The runtime does not publish a standalone response JSON Schema for this operation. Use the response description and linked output manual; the downloadable input schema is not a response contract.
Errors & retries
This operation uses the shared runtime error contract; no exhaustive operation-specific reason list is published.
For an uncertain write, preserve the original request and retry identity. On conflict, inspect current state before deciding what to change.