Usage #
// Import the typed helper
import { getBlockChildren } from "@hotglue/sdk/notion";
const result = await client.execute({
...getBlockChildren({
block_id: string,
start_cursor: string,
page_size: int,
}),
userId: "user_123",
});
// result is typed as GetBlockChildrenOutput
const result = await client.execute({
integration: "notion",
tool: "get_block_children",
userId: "user_123",
input: {
block_id: string,
start_cursor: string,
page_size: int,
},
});
// 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 Get Block Children tool");
Required Permissions #
read_content
Input Schema #
block_id
string
required
The ID of the block or page to get children from
start_cursor
string
Pagination cursor from previous response
page_size
int
Number of results per page (max 100)
default:
100
This tool calls: #
GET
https://api.notion.com/v1/blocks/{block_id}/children