# Delete Document Block Tool

`library_block_delete` removes one block of a Library document, addressed by its id. A blockquote goes with everything in it.

## When to Use

The agent uses it to remove a block it read with `library_get`.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The item's id (ULID) or slug, as `library_list`, `library_search` and `library_get` return them |
| `block_id` | string | Yes | The block's `id` (10 letters and digits); blockquote children are addressable too |

## Returns

| Field | Type | Description |
|-------|------|-------------|
| `item` | object | The item: `id`, `slug`, `name`, `kind` (`document`, `folder` or `file`), `path` (folder slugs; `null` when unfiled), `path_names`, `icon`, `color`, `ai_access_policy`, `revision`, `created_at`, `updated_at`, `url`; a file adds `object_id`, `media_kind`, `content_type`, `filename`, `size_bytes` |

`url` is the item's link. The agent gives it to the user when it reports the change, labelled with the item's name rather than its folder path.

## Example Scenario

```json
{ "identifier": "q1-research-notes-ab12cd", "block_id": "AbCdE12345" }
```

## Notes

- Each call is one read-modify-write of the document's current content, so it never overwrites an edit made since the agent read it. The result is stored as the document's new version and bumps its `revision`; within 5 minutes of the current version, the write replaces that version instead of adding another.
- An unknown `block_id` is refused with `Block not found: <id>`
- A folder or file is refused: it has no blocks
- An unknown or trashed identifier is refused with `Library item not found: <identifier>`
- Refused when the item's AI access policy denies reads or writes: `AI access denied: this resource is not writable by AI tools.` (or `not readable`)
- Risk: write
