Delete Surface Element
delete_surface_elementDelete a surface element by ID from an AFFiNE document, with an option to remove connectors that reference the deleted element.
Instructions
Delete a surface element by id. Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document ID | |
| elementId | Yes | Element ID to delete | |
| workspaceId | No | Workspace ID (optional if default set) | |
| pruneConnectors | No | Also delete connectors referencing this element (default false) | |
| expectedRevision | No | Optional read_doc revision of this primary document. Reject stale content before writing. Covers document content, not workspace metadata; requires all writers to share one MCP server. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| error | No | ||
| reason | No | ||
| deleted | No | ||
| details | No | ||
| causeCode | No | ||
| elementId | No | ||
| retryable | No | ||
| prunedConnectors | No | ||
| recoveryGuidance | No |