add stub create_notion_page tool

This commit is contained in:
CREDO23 2026-02-10 15:23:29 +02:00
parent 0caba8de50
commit 9fa923051c

View file

@ -0,0 +1,29 @@
from typing import Any
from langchain_core.tools import tool
def create_create_notion_page_tool():
@tool
async def create_notion_page(
title: str,
content: str,
) -> dict[str, Any]:
"""Create a new page in Notion with the given title and content.
Use this tool when the user asks you to create, save, or publish
something to Notion. The page will be created in the user's
configured Notion workspace.
Args:
title: The title of the Notion page.
content: The markdown content for the page body.
"""
return {
"status": "success",
"page_id": "stub-page-id-12345",
"title": title,
"url": "https://www.notion.so/stub-page-12345",
}
return create_notion_page