Skip to main content

NotionMCPToolkit

NotionMCPToolkit provides an interface for interacting with Notion through the Model Context Protocol (MCP). Parameters:
  • timeout (Optional[float]): Connection timeout in seconds. (default: :obj:None)
Note: Currently only supports asynchronous operation mode.

init

Initializes the NotionMCPToolkit. Parameters:
  • timeout (Optional[float]): Connection timeout in seconds. (default: :obj:None)

get_tools

Returns: List[FunctionTool]: List of available tools.

_build_notion_tool_schema

Build tool schema with Notion-specific fixes.

_fix_notion_schema_recursively

Recursively fix Notion MCP schema issues.

_fix_dict_schema

Fix dictionary schema issues.

_fix_missing_type_with_properties

Fix objects with properties but missing type field.

_fix_object_with_properties

Fix objects with type=“object” and properties.

_get_required_properties

Get list of required properties from a properties dict.

_is_property_required

Check if a property should be marked as required.

_process_nested_structures

Process all nested structures in a schema object.