get_lineage
Read a file's lineage
Reads how a file was made, whatever its kind (image, video, 3D model, canvas, whiteboard or document), as awen's Lineage panel shows it: the files it came from, the step that used each one, each file's "Authorized for usage" declaration and audit severity, and the latest lineage audit. The declaration is false until a member confirms a file's rights in awen, which does not mean it is forbidden. unaudited counts the earlier files no audit has read, not this file, and the audit is null until one runs. Pass a file:… id or a media_id. Files come nearest first, up to 50 a page, with the edges from each file to the files made from it; pass next_cursor back as cursor to continue. fetch opens a file whose id is not null and gives its prompt and model. complete is false when the history is too long to read here: audit counts are then left out, and awen shows it whole.
- Permission:
awen:read - Also an API operation:
POST /api/v1/get_lineage
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | A file:… id or a media_id. |
cursor | string | No |
Call
A host sends a tools/call request to the MCP endpoint, with the arguments it needs.
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "get_lineage", "arguments": { "id": "<string>" } }}Arguments schema
{ "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 144, "description": "A file:… id or a media_id." }, "cursor": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "id" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "id": { "type": "string" }, "media_id": { "type": "string" }, "complete": { "type": "boolean" }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": [ "string", "null" ] }, "media_id": { "type": "string" }, "revision_id": { "type": "string" }, "kind": { "type": "string", "enum": [ "image", "video", "three_d", "canvas", "whiteboard", "file" ] }, "name": { "type": "string" }, "created_at": { "type": "string" }, "distance": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "readable": { "type": "boolean" }, "authorized_for_usage": { "type": "boolean" }, "audit_severity": { "anyOf": [ { "type": "string", "enum": [ "LOW", "MODERATE", "HIGH", "CRITICAL" ] }, { "type": "null" } ] }, "inherited_audit_severity": { "anyOf": [ { "type": "string", "enum": [ "LOW", "MODERATE", "HIGH", "CRITICAL" ] }, { "type": "null" } ] } }, "required": [ "id", "media_id", "revision_id", "kind", "name", "created_at", "distance", "readable", "authorized_for_usage", "audit_severity", "inherited_audit_severity" ], "additionalProperties": false } }, "edges": { "type": "array", "items": { "type": "object", "properties": { "parent_media_id": { "type": "string" }, "child_media_id": { "type": "string" }, "role": { "type": "string", "enum": [ "SOURCE", "REFERENCE", "STYLE_REFERENCE", "ELEMENT", "START_FRAME", "KEYFRAME", "END_FRAME", "COMPONENT" ] }, "position": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "operation": { "type": "string", "enum": [ "GENERATE", "EDIT", "UPSCALE", "REMOVE_BACKGROUND", "CLEAN_UP", "RESIZE", "VECTORIZE", "LAYERIZE", "REFRAME", "COMPOSE", "OPEN_IN_EDITOR", "PUBLISH", "COPY", "CAPTURE" ] }, "step": { "type": "string" } }, "required": [ "parent_media_id", "child_media_id", "role", "position", "operation", "step" ], "additionalProperties": false } }, "audit_summary": { "anyOf": [ { "type": "object", "properties": { "upstream_audits": { "anyOf": [ { "type": "object", "properties": { "CRITICAL": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "HIGH": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "MODERATE": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "LOW": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unaudited": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "CRITICAL", "HIGH", "MODERATE", "LOW", "unaudited" ], "additionalProperties": false }, { "type": "null" } ] }, "latest_audit": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": [ "PENDING", "RUNNING", "SUCCESS", "FAILED" ] }, "summary": { "type": [ "string", "null" ] }, "created_at": { "type": "string" }, "completed_at": { "type": [ "string", "null" ] } }, "required": [ "status", "summary", "created_at", "completed_at" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "upstream_audits", "latest_audit" ], "additionalProperties": false }, { "type": "null" } ] }, "next_cursor": { "type": [ "string", "null" ] } }, "required": [ "id", "media_id", "complete", "nodes", "edges", "audit_summary", "next_cursor" ], "additionalProperties": false}