Usage #
// Import the typed helper
import { getBlock } from "@hotglue/sdk/notion";
const result = await client.execute({
...getBlock({
block_id: string,
}),
userId: "user_123",
});
// result is typed as GetBlockOutput
const result = await client.execute({
integration: "notion",
tool: "get_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 Get Block tool");
Required Permissions #
read_content
Input Schema #
block_id
string
required
The ID of the block to retrieve
Output Schema #
id
string
required
object
string
required
type
string
required
created_time
string
required
last_edited_time
string
required
has_children
bool
archived
bool
This tool calls: #
GET
https://api.notion.com/v1/blocks/{block_id}