> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# OneNote

**Authentication:** OAuth or access token. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Search my notebooks for pages tagged `meeting-notes` from this week.
* Add a new page to the `Engineering` notebook from this morning's standup transcript.
* List every notebook section that hasn't been edited in 6 months.

## Available Tools

#### list\_notebooks

List the user's OneNote notebooks. Supports pagination with top/skip, sorting with orderby, and OData filtering. Expand 'sections' or 'sectionGroups' to include children.

#### get\_notebook

Get a specific OneNote notebook by ID. Use list\_notebooks to find valid notebook IDs. Expand 'sections' or 'sectionGroups' to include children.

#### create\_notebook

Create a new OneNote notebook with the given display name. The name must be unique across the user's notebooks. Max 128 characters.

#### copy\_notebook

Copy a OneNote notebook. This is an async operation - returns an operation URL to poll for status. Use list\_notebooks to find valid notebook IDs.

#### get\_recent\_notebooks

Get a list of recently accessed OneNote notebooks, including notebooks from other users shared with the current user.

#### get\_default\_notebook

Get the user's default OneNote notebook. Returns the notebook marked as default, or the first notebook if none is marked as default.

#### list\_pages

List OneNote pages in a specific section. Always requires section\_id for performance (global page listing can fail). Use list\_sections to find valid section IDs.

#### get\_page

Get OneNote page metadata by ID (title, dates, links). Does NOT include content - use get\_page\_content for HTML body. Use list\_pages to find valid page IDs.

#### get\_page\_content

Get the HTML content of a OneNote page. Set include\_ids=true to get data-id attributes needed for PATCH updates. Use list\_pages to find valid page IDs.

#### create\_page

Create a new OneNote page in a section. Provide HTML content (e.g. '\<p>Hello\</p>'). The title becomes the page heading. Use list\_sections to find valid section IDs.

#### update\_page

Update a OneNote page using PATCH operations.

#### delete\_page

Delete a OneNote page permanently. This action cannot be undone. Use list\_pages to find valid page IDs.

#### copy\_page

Copy a OneNote page to a different section. Async operation - returns operation URL to poll. Use list\_pages and list\_sections to find valid IDs.

#### list\_section\_groups

List OneNote section groups. Filter by notebook\_id to list groups in a specific notebook, or omit to list all section groups. Use list\_notebooks to find valid IDs.

#### get\_section\_group

Get a specific OneNote section group by ID. Expand 'sections' or 'sectionGroups' to include children. Use list\_section\_groups to find valid IDs.

#### create\_section\_group

Create a new OneNote section group in a notebook. Section groups organize sections into folders. Use list\_notebooks to find valid notebook IDs.

#### list\_sections

List OneNote sections. Filter by notebook\_id or section\_group\_id, or omit both to list all sections. Use list\_notebooks to find valid notebook IDs.

#### get\_section

Get a specific OneNote section by ID. Use list\_sections to find valid section IDs. Expand 'pages' or 'parentNotebook' to include related data.

#### create\_section

Create a new OneNote section in a notebook or section group. Provide either notebook\_id or section\_group\_id. Use list\_notebooks to find valid IDs.

#### copy\_section\_to\_notebook

Copy a OneNote section to a different notebook. Async operation - returns operation URL. Use list\_sections and list\_notebooks to find valid IDs.

#### copy\_section\_to\_section\_group

Copy a OneNote section to a section group. Async operation - returns operation URL. Use list\_sections and list\_section\_groups to find valid IDs.