Usage #
// Import the typed helper
import { queryDataSource } from "@hotglue/sdk/notion";
const result = await client.execute({
...queryDataSource({
data_source_id: string,
filter: object,
sorts: array,
// ...
}),
userId: "user_123",
});
// result is typed as QueryDataSourceOutput
const result = await client.execute({
integration: "notion",
tool: "query_data_source",
userId: "user_123",
input: {
data_source_id: string,
filter: object,
sorts: array,
// ...
},
});
// 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 Query Data Source tool");
Required Permissions #
read_content
Input Schema #
data_source_id
string
required
The ID of the data source to query
filter
object
Filter conditions. Can use "and"/"or" compound filters or property filters.
sorts
object[]
Sort order. Earlier sorts take precedence.
start_cursor
string
Pagination cursor from previous response
page_size
int
Number of results per page (max 100)
default:
100
This tool calls: #
POST
https://api.notion.com/v1/data_sources/{data_source_id}/query