Delete Block

Deletes (archives) a block

Usage #

// Import the typed helper
import { deleteBlock } from "@hotglue/sdk/notion";
const result = await client.execute({
...deleteBlock({
block_id: string,
}),
userId: "user_123",
});
// result is typed as DeleteBlockOutput
const result = await client.execute({
integration: "notion",
tool: "delete_block",
userId: "user_123",
input: {
block_id: string,
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["notion"],
userId: "user_123",
}),
});
await agent.generate("run the Delete Block tool");

Required Permissions #

update_content

Input Schema #

block_id string required

The ID of the block to delete

This tool calls: #

DELETE https://api.notion.com/v1/blocks/{block_id}