captureExternal
Store a pointer, your summary, and a freshness anchor for an external item fetched from a connector without copying its body; recall then reuses it while fresh and flags re-fetch when stale.
Instructions
Index an external item you fetched from a live connector (Notion, Linear, Granola, Drive, GitHub) WITHOUT copying its body into maz. One call stores a pointer + YOUR summary + a freshness anchor; maz never fetches or holds the content. recall later returns the summary with an inline freshness verdict so you reuse it when fresh and re-fetch live when stale. The capture is UNTRUSTED (lineage connector:): facts land proposed, never superseding your own. Idempotent by contentHash within the connector's TTL. Pass status=deleted|access-revoked to tombstone an item you can no longer reach. Refuses project scope and ephemeral connectors (gmail/gcal/slack; read those live). recall FIRST before capturing, to avoid duplicates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Absolute URI of the external item (must carry a scheme), e.g. a Notion page URL, a Linear issue URL, a Drive doc link. The canonical identity of the external_ref pointer. | |
| label | No | Human-readable display name for the external_ref. Defaults to the externalId or connector, NEVER the raw URI (which would leak into a shared render). | |
| scope | No | Scope to capture into. Defaults to personal. Project is refused: captured external content is sensitive and project renders to shared git. | |
| status | No | active (default) records a live snapshot. deleted (a 404 on re-fetch) or access-revoked (a 403) tombstones the prior capture so recall flags it access-unverified instead of dropping it. | |
| stream | No | Sub-channel within the connector, e.g. a Notion database id or a Linear team key. Optional. | |
| summary | No | Your faithful summary of the fetched content. Put the stable external id and key facts in the prose so recall can find it. Required unless you pass summaries[] or a tombstone status. | |
| dedupKey | No | Idempotency key. Defaults to <connector>:<externalId>:<scope>. Recapturing the same item must reuse the same dedupKey (omit it and pass a stable externalId, or pass it explicitly). | |
| connector | Yes | The connector the item came from: notion, linear, granola, drive, github. Drives the freshness budget and the untrusted-lineage trust tag. Ephemeral connectors (gmail, gcal, slack) are refused: read those live. | |
| fetchTime | No | When you fetched the item (RFC 3339 UTC). Defaults to now. | |
| summaries | No | Chunked summary: one episode per element, all sharing one external_ref. Use for long items; otherwise pass summary. | |
| externalId | No | The source-system stable id (Notion page id, Linear issue key). Used to mint the dedupKey when you omit it; hashed in any plaintext render. | |
| sourceType | Yes | Open-taxonomy kind of the item, e.g. notion_page, linear_issue, meeting_notes, drive_doc. | |
| contentHash | No | SHA-256 hex of the item's canonical content subset (the freshness ETag). Recapturing with the same hash within the connector's TTL is a no-op. OMIT it if you cannot compute a real SHA-256 over the fetched content; do NOT fabricate one (any non-64-hex value is rejected). Defaults to the hash of your summary text when omitted. | |
| externalUrl | No | Dereferenceable location to re-fetch when stale. Defaults to uri. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | captured = first snapshot; skipped = unchanged within TTL (no write); revision = content changed (new episode, prior superseded); expired = unchanged but past TTL (fetch-time refreshed); tombstoned = item reported gone. | |
| freshness | Yes | The resulting freshness verdict for this item, the same value recall will report. | |
| episodeNames | Yes | Resource names of the summary episode(s) this capture is grounded in (one per chunk). | |
| sourceRefNames | Yes | Resource names of the SourceRef provenance rows. | |
| externalRefName | Yes | AIP resource name of the external_ref pointer entity. |