Update tools_def.py
Browse files- tools_def.py +137 -26
tools_def.py
CHANGED
|
@@ -1242,12 +1242,14 @@ TOOLS = [
|
|
| 1242 |
"type": "function",
|
| 1243 |
"function": {
|
| 1244 |
"name": "notion_search",
|
| 1245 |
-
"description": "Search Notion pages, databases, or
|
| 1246 |
"parameters": {
|
| 1247 |
"type": "object",
|
| 1248 |
"properties": {
|
| 1249 |
-
"query": {"type": "string", "description": "Search keyword or
|
| 1250 |
-
"
|
|
|
|
|
|
|
| 1251 |
}
|
| 1252 |
}
|
| 1253 |
}
|
|
@@ -1255,30 +1257,33 @@ TOOLS = [
|
|
| 1255 |
{
|
| 1256 |
"type": "function",
|
| 1257 |
"function": {
|
| 1258 |
-
"name": "
|
| 1259 |
-
"description": "
|
| 1260 |
"parameters": {
|
| 1261 |
"type": "object",
|
| 1262 |
"properties": {
|
| 1263 |
-
"
|
|
|
|
| 1264 |
},
|
| 1265 |
-
"required": ["
|
| 1266 |
}
|
| 1267 |
}
|
| 1268 |
},
|
| 1269 |
{
|
| 1270 |
"type": "function",
|
| 1271 |
"function": {
|
| 1272 |
-
"name": "
|
| 1273 |
-
"description": "Create a new page
|
| 1274 |
"parameters": {
|
| 1275 |
"type": "object",
|
| 1276 |
"properties": {
|
| 1277 |
-
"parent_id": {"type": "string", "description": "
|
|
|
|
| 1278 |
"title": {"type": "string", "description": "Title of the new Notion page"},
|
| 1279 |
-
"content": {"type": "string", "description": "Initial text content for the page"}
|
|
|
|
| 1280 |
},
|
| 1281 |
-
"required": ["title"]
|
| 1282 |
}
|
| 1283 |
}
|
| 1284 |
},
|
|
@@ -1286,14 +1291,15 @@ TOOLS = [
|
|
| 1286 |
"type": "function",
|
| 1287 |
"function": {
|
| 1288 |
"name": "notion_update_page",
|
| 1289 |
-
"description": "Update
|
| 1290 |
"parameters": {
|
| 1291 |
"type": "object",
|
| 1292 |
"properties": {
|
| 1293 |
-
"page_id": {"type": "string", "description": "The ID of the
|
| 1294 |
-
"title": {"type": "string", "description": "
|
| 1295 |
-
"content": {"type": "string", "description": "New content to
|
| 1296 |
-
"
|
|
|
|
| 1297 |
},
|
| 1298 |
"required": ["page_id"]
|
| 1299 |
}
|
|
@@ -1302,12 +1308,30 @@ TOOLS = [
|
|
| 1302 |
{
|
| 1303 |
"type": "function",
|
| 1304 |
"function": {
|
| 1305 |
-
"name": "
|
| 1306 |
-
"description": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1307 |
"parameters": {
|
| 1308 |
"type": "object",
|
| 1309 |
"properties": {
|
| 1310 |
-
"page_id": {"type": "string", "description": "The ID of the
|
|
|
|
|
|
|
| 1311 |
},
|
| 1312 |
"required": ["page_id"]
|
| 1313 |
}
|
|
@@ -1316,15 +1340,102 @@ TOOLS = [
|
|
| 1316 |
{
|
| 1317 |
"type": "function",
|
| 1318 |
"function": {
|
| 1319 |
-
"name": "
|
| 1320 |
-
"description": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1321 |
"parameters": {
|
| 1322 |
"type": "object",
|
| 1323 |
"properties": {
|
| 1324 |
-
"
|
| 1325 |
-
"content": {"type": "string", "description": "Text content to append to the page"}
|
| 1326 |
},
|
| 1327 |
-
"required": ["
|
| 1328 |
}
|
| 1329 |
}
|
| 1330 |
},
|
|
@@ -2444,4 +2555,4 @@ TOOLS = [
|
|
| 2444 |
}
|
| 2445 |
}
|
| 2446 |
}
|
| 2447 |
-
]
|
|
|
|
| 1242 |
"type": "function",
|
| 1243 |
"function": {
|
| 1244 |
"name": "notion_search",
|
| 1245 |
+
"description": "Search Notion pages, databases, or content across the workspace by query",
|
| 1246 |
"parameters": {
|
| 1247 |
"type": "object",
|
| 1248 |
"properties": {
|
| 1249 |
+
"query": {"type": "string", "description": "Search keyword or text query"},
|
| 1250 |
+
"filter_type": {"type": "string", "enum": ["page", "database"], "description": "Filter results by object type: 'page' or 'database'"},
|
| 1251 |
+
"sort_direction": {"type": "string", "enum": ["ascending", "descending"], "description": "Sort direction based on last edited time. Default: 'descending'"},
|
| 1252 |
+
"page_size": {"type": "integer", "description": "Number of results to return, default 10"}
|
| 1253 |
}
|
| 1254 |
}
|
| 1255 |
}
|
|
|
|
| 1257 |
{
|
| 1258 |
"type": "function",
|
| 1259 |
"function": {
|
| 1260 |
+
"name": "notion_fetch",
|
| 1261 |
+
"description": "Fetch details, properties, or children blocks of a Notion page, database, or block by ID",
|
| 1262 |
"parameters": {
|
| 1263 |
"type": "object",
|
| 1264 |
"properties": {
|
| 1265 |
+
"id": {"type": "string", "description": "The ID of the Notion page, database, or block to fetch"},
|
| 1266 |
+
"fetch_children": {"type": "boolean", "description": "Whether to fetch nested child blocks or page content. Default: true"}
|
| 1267 |
},
|
| 1268 |
+
"required": ["id"]
|
| 1269 |
}
|
| 1270 |
}
|
| 1271 |
},
|
| 1272 |
{
|
| 1273 |
"type": "function",
|
| 1274 |
"function": {
|
| 1275 |
+
"name": "notion_create_pages",
|
| 1276 |
+
"description": "Create a new page or multiple blocks inside a parent page or database in Notion",
|
| 1277 |
"parameters": {
|
| 1278 |
"type": "object",
|
| 1279 |
"properties": {
|
| 1280 |
+
"parent_id": {"type": "string", "description": "The ID of the parent page or database"},
|
| 1281 |
+
"parent_type": {"type": "string", "enum": ["page_id", "database_id"], "description": "Parent type: 'page_id' or 'database_id'. Default: 'page_id'"},
|
| 1282 |
"title": {"type": "string", "description": "Title of the new Notion page"},
|
| 1283 |
+
"content": {"type": "string", "description": "Initial text content or markdown body for the page"},
|
| 1284 |
+
"properties_json": {"type": "string", "description": "Optional JSON string for database item properties"}
|
| 1285 |
},
|
| 1286 |
+
"required": ["parent_id", "title"]
|
| 1287 |
}
|
| 1288 |
}
|
| 1289 |
},
|
|
|
|
| 1291 |
"type": "function",
|
| 1292 |
"function": {
|
| 1293 |
"name": "notion_update_page",
|
| 1294 |
+
"description": "Update properties, title, content, or archive/delete status of an existing Notion page",
|
| 1295 |
"parameters": {
|
| 1296 |
"type": "object",
|
| 1297 |
"properties": {
|
| 1298 |
+
"page_id": {"type": "string", "description": "The ID of the Notion page to update"},
|
| 1299 |
+
"title": {"type": "string", "description": "New title for the page"},
|
| 1300 |
+
"content": {"type": "string", "description": "New text content to append or replace"},
|
| 1301 |
+
"properties_json": {"type": "string", "description": "Optional JSON string of updated properties"},
|
| 1302 |
+
"archived": {"type": "boolean", "description": "Set true to archive/trash the page, false to restore"}
|
| 1303 |
},
|
| 1304 |
"required": ["page_id"]
|
| 1305 |
}
|
|
|
|
| 1308 |
{
|
| 1309 |
"type": "function",
|
| 1310 |
"function": {
|
| 1311 |
+
"name": "notion_move_pages",
|
| 1312 |
+
"description": "Move a Notion page into a new parent page or database",
|
| 1313 |
+
"parameters": {
|
| 1314 |
+
"type": "object",
|
| 1315 |
+
"properties": {
|
| 1316 |
+
"page_id": {"type": "string", "description": "The ID of the page to move"},
|
| 1317 |
+
"new_parent_id": {"type": "string", "description": "The ID of the new destination parent page or database"},
|
| 1318 |
+
"parent_type": {"type": "string", "enum": ["page_id", "database_id"], "description": "New parent type: 'page_id' or 'database_id'. Default: 'page_id'"}
|
| 1319 |
+
},
|
| 1320 |
+
"required": ["page_id", "new_parent_id"]
|
| 1321 |
+
}
|
| 1322 |
+
}
|
| 1323 |
+
},
|
| 1324 |
+
{
|
| 1325 |
+
"type": "function",
|
| 1326 |
+
"function": {
|
| 1327 |
+
"name": "notion_duplicate_page",
|
| 1328 |
+
"description": "Duplicate/clone an existing Notion page and its content to a target parent",
|
| 1329 |
"parameters": {
|
| 1330 |
"type": "object",
|
| 1331 |
"properties": {
|
| 1332 |
+
"page_id": {"type": "string", "description": "The ID of the page to duplicate"},
|
| 1333 |
+
"target_parent_id": {"type": "string", "description": "Optional target parent ID. If omitted, duplicates under the same parent"},
|
| 1334 |
+
"new_title": {"type": "string", "description": "Optional new title for the duplicated page"}
|
| 1335 |
},
|
| 1336 |
"required": ["page_id"]
|
| 1337 |
}
|
|
|
|
| 1340 |
{
|
| 1341 |
"type": "function",
|
| 1342 |
"function": {
|
| 1343 |
+
"name": "notion_create_database",
|
| 1344 |
+
"description": "Create a new database in Notion under a parent page with custom schema",
|
| 1345 |
+
"parameters": {
|
| 1346 |
+
"type": "object",
|
| 1347 |
+
"properties": {
|
| 1348 |
+
"parent_page_id": {"type": "string", "description": "The ID of the parent page"},
|
| 1349 |
+
"title": {"type": "string", "description": "Title of the database"},
|
| 1350 |
+
"properties_json": {"type": "string", "description": "Optional JSON string defining database property schemas (e.g. text, number, select, date)"}
|
| 1351 |
+
},
|
| 1352 |
+
"required": ["parent_page_id", "title"]
|
| 1353 |
+
}
|
| 1354 |
+
}
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"type": "function",
|
| 1358 |
+
"function": {
|
| 1359 |
+
"name": "notion_update_database",
|
| 1360 |
+
"description": "Update database title, description, or property schemas in Notion",
|
| 1361 |
+
"parameters": {
|
| 1362 |
+
"type": "object",
|
| 1363 |
+
"properties": {
|
| 1364 |
+
"database_id": {"type": "string", "description": "The ID of the Notion database"},
|
| 1365 |
+
"title": {"type": "string", "description": "Optional new title for the database"},
|
| 1366 |
+
"description": {"type": "string", "description": "Optional new description"},
|
| 1367 |
+
"properties_json": {"type": "string", "description": "Optional JSON string with property schema changes"}
|
| 1368 |
+
},
|
| 1369 |
+
"required": ["database_id"]
|
| 1370 |
+
}
|
| 1371 |
+
}
|
| 1372 |
+
},
|
| 1373 |
+
{
|
| 1374 |
+
"type": "function",
|
| 1375 |
+
"function": {
|
| 1376 |
+
"name": "notion_create_comment",
|
| 1377 |
+
"description": "Create a discussion comment on a Notion page, block, or existing discussion thread",
|
| 1378 |
+
"parameters": {
|
| 1379 |
+
"type": "object",
|
| 1380 |
+
"properties": {
|
| 1381 |
+
"page_id": {"type": "string", "description": "The ID of the page or block to comment on"},
|
| 1382 |
+
"text": {"type": "string", "description": "The comment text content"},
|
| 1383 |
+
"discussion_id": {"type": "string", "description": "Optional discussion thread ID to reply to"}
|
| 1384 |
+
},
|
| 1385 |
+
"required": ["text"]
|
| 1386 |
+
}
|
| 1387 |
+
}
|
| 1388 |
+
},
|
| 1389 |
+
{
|
| 1390 |
+
"type": "function",
|
| 1391 |
+
"function": {
|
| 1392 |
+
"name": "notion_get_comments",
|
| 1393 |
+
"description": "Retrieve all comments attached to a specific Notion page, block, or discussion",
|
| 1394 |
+
"parameters": {
|
| 1395 |
+
"type": "object",
|
| 1396 |
+
"properties": {
|
| 1397 |
+
"block_id": {"type": "string", "description": "The ID of the page or block containing comments"},
|
| 1398 |
+
"page_size": {"type": "integer", "description": "Maximum number of comments to return, default 50"}
|
| 1399 |
+
},
|
| 1400 |
+
"required": ["block_id"]
|
| 1401 |
+
}
|
| 1402 |
+
}
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "function",
|
| 1406 |
+
"function": {
|
| 1407 |
+
"name": "notion_get_users",
|
| 1408 |
+
"description": "List all members, guests, and bot users in the Notion workspace",
|
| 1409 |
+
"parameters": {
|
| 1410 |
+
"type": "object",
|
| 1411 |
+
"properties": {
|
| 1412 |
+
"page_size": {"type": "integer", "description": "Number of users to return, default 50"}
|
| 1413 |
+
}
|
| 1414 |
+
}
|
| 1415 |
+
}
|
| 1416 |
+
},
|
| 1417 |
+
{
|
| 1418 |
+
"type": "function",
|
| 1419 |
+
"function": {
|
| 1420 |
+
"name": "notion_get_self",
|
| 1421 |
+
"description": "Get current bot and integration user identity information from Notion",
|
| 1422 |
+
"parameters": {
|
| 1423 |
+
"type": "object",
|
| 1424 |
+
"properties": {}
|
| 1425 |
+
}
|
| 1426 |
+
}
|
| 1427 |
+
},
|
| 1428 |
+
{
|
| 1429 |
+
"type": "function",
|
| 1430 |
+
"function": {
|
| 1431 |
+
"name": "notion_get_user",
|
| 1432 |
+
"description": "Get detailed profile information of a specific Notion user by user_id",
|
| 1433 |
"parameters": {
|
| 1434 |
"type": "object",
|
| 1435 |
"properties": {
|
| 1436 |
+
"user_id": {"type": "string", "description": "The ID of the Notion user"}
|
|
|
|
| 1437 |
},
|
| 1438 |
+
"required": ["user_id"]
|
| 1439 |
}
|
| 1440 |
}
|
| 1441 |
},
|
|
|
|
| 2555 |
}
|
| 2556 |
}
|
| 2557 |
}
|
| 2558 |
+
]
|