recordSourceRef
Records where a subject record came from by appending an external-source provenance reference with a source type and idempotency key. Returns the new SourceRef name; does not fetch or verify sources.
Instructions
Record where a memory came from: append an external-source provenance reference (SourceRef, W3C PROV wasDerivedFrom) for a subject record. Give the subject's uid, a sourceType (open taxonomy), and a dedupKey for idempotency; optionally a connector, stream, externalId, externalUrl, and contentHash. Returns the new SourceRef's resource name. Provenance is self-asserted and UNVERIFIED. Does not fetch the source.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subjectUid": "<subjectUid>",
"sourceType": "<sourceType>",
"dedupKey": "<dedupKey>"
},
"name": "recordSourceRef"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Scope to record into. Defaults to personal. | |
| stream | No | Sub-channel within the connector, e.g. a mailbox label or channel id. Optional. | |
| dedupKey | Yes | Idempotency key. Recording the same external item twice (same dedupKey) collapses to one SourceRef. Required. | |
| connector | No | Connector that produced the reference, e.g. gmail, slack. Optional. | |
| fetchTime | No | When the source content was fetched (RFC 3339 UTC). Defaults to now. | |
| externalId | No | Source-system opaque identifier for the item, e.g. a message id. Optional. | |
| sourceType | Yes | Kind of external source, drawn from an open taxonomy: email, slack_message, notion_page, web_page, etc. Required. | |
| subjectUid | Yes | ULID of the record this source was derived from (PROV wasDerivedFrom): an entity, episode, or fact uid. Required. | |
| contentHash | No | SHA-256 hex of the fetched content. Optional; supplied by the caller (fetch is out of scope). | |
| externalUrl | No | Dereferenceable location of the source item. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | AIP resource name of the recorded SourceRef; pass to getSourceRef. | |
| status | Yes | Always "recorded" on success. |