Import a markdown folder
import_markdownImport a folder of Markdown files into AgentDocs, using folder structure as page hierarchy. Re-imports reuse existing pages to avoid duplicates.
Instructions
Import a folder of Markdown files and let the folder structure become the page hierarchy. Each file is { path, content } where path is a relative file path like "guides/setup.md". Folders become parent pages; an index.md or README.md inside a folder supplies that folder page's content; titles come from the first # H1, falling back to the file name. Ideal for an Obsidian vault, a Notion markdown export, or a repo's docs/ folder. Up to 500 files per call. IDEMPOTENT: pages are matched by source path, so re-running an import — or chunking a large vault across several calls — reuses existing pages instead of creating duplicates (response reports created/reused/updated counts). By default existing pages keep their content; set overwrite_existing to re-sync content from the files. Use parent_page to nest the whole import under an existing page. Use bulk_create_pages instead when you want to specify the page tree explicitly. With a space-scoped token, omit "space" to use the token's space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | The markdown files to import | |
| space | No | Space UUID or "workspaceSlug/spaceSlug" path. Optional for space-scoped tokens. | |
| parent_page | No | Optional existing page to nest the import under (UUID or "workspaceSlug/spaceSlug/pageSlug" path). Defaults to the space root. | |
| overwrite_existing | No | When true, re-importing updates the content of pages that already exist (re-sync). Default false: existing pages are left untouched. |