Integrations

MCP tool reference

MCP tool reference

Every tool outl mcp serve registers, with its arguments, what it returns, and what it can break. There are 49, and tools/list is the authority: this page is checked against it.

New here? Start at MCP to wire a host, then come back when you need an argument name. Building a skill or slash command? MCP recipes has worked examples that use the tools below.

How to read this page

  • Mutates means the call appends ops to the log (and reprojects the page .md). Everything else is a read. Read-only tools never need approval from a careful host, and the mutating ones are where you point an allowlist.
  • Confirm means the tool refuses unless you pass confirm: true. Without it you get CONFIRM_REQUIRED and the workspace is untouched.
  • Ids are ULIDs (01M897XCT6KWK2D1D0Q8P9VZVW) unless a column says slug. A slug is the page’s kebab-case name (ideas, 2026-11-25), never its title.
  • Replies are compact JSON in content[0].text. Errors set isError: true and carry { ok: false, error: { code, message, data } } in structuredContent. The error codes are listed at the bottom.
  • A tool maps to the CLI command of the same shape, and the CLI page (cli.md) has the long-form semantics. This page links there instead of repeating it.

Pages

ToolArgumentsReturnsNotes
outl_page_getslug{ icon, meta, outline }outline is the block tree with ids. meta is { id, kind, slug, title }.
outl_page_listfilter?{ pages: [meta, …] }filter is tag:foo or kind:journal / kind:page.
outl_page_createslug, title?, icon?, content?{ meta, … }Mutates. Idempotent on slug: an existing page is reused, not replaced. content is a forest of { text, children? }, so a new page lands with its full outline in one call. On an existing page the forest is appended again, so do not retry a create blindly.
outl_page_updateslug, title?, icon?{ meta }Mutates. A blank title is INVALID_ARG and nothing is applied.
outl_page_renameold_slug, new_slug, merge?rename reportMutates. Rewrites [[old]] and #old in every block and lists the edited blocks in rewritten_refs. If new_slug is another page it fails with SLUG_CONFLICT, unless merge: true, which folds into that page (see merge).
outl_page_mergesource, target, confirmmerge reportMutates. Confirm. Moves the source’s blocks, merges properties, rewrites [[source]] and #source, keeps the source’s names as aliases, trashes the source. Safe to run twice (nothing_changed: true). No dry run. RFC 0557.
outl_page_deleteslug, confirm{ id, slug }Mutates. Confirm. Moves the page root to the trash.
outl_page_renderslugraw markdownThe clean .md projection, no ids. Returned as plain text, not JSON.

Merge conflicts: when both pages hold a property with different values, the target’s value wins and the pair is listed in property_conflicts.

Blocks

ToolArgumentsReturnsNotes
outl_block_getid{ id, parent, text, raw_text, todo, child_count }text has the TODO / DONE marker split off into todo.
outl_block_treeidthe block plus all descendantsSame node shape as outl_page_get’s outline.
outl_block_appendtext, page? or parent?{ id, parent, text }Mutates. Last child of the page or block. Give one of page / parent.
outl_block_append_treetree, page? or parent?{ parent, tree }, the created blocks with idsMutates. tree is { text, children?: [tree, …] }. children holds objects, not strings. Prefer it to chained appends.
outl_block_insertafter, text{ id, after, text }Mutates. New sibling right after block after.
outl_block_updateid, text{ id, text }Mutates. Replaces the whole text. Write TODO / DONE literally to set task state.
outl_block_moveid, parent?, after?{ id, parent }Mutates. A move that would put a block under its own descendant is refused with CYCLE_REJECTED. after must share the target parent, or it is INVALID_ARG.
outl_block_toggle_todoid{ id, text, todo }Mutates. One step of the cycle: none, TODO, DOING, DONE, none.
outl_block_deleteid, confirm{ id }Mutates. Confirm. Moves the block (and its children) to the trash. Undo it with outl_trash_restore.
outl_block_embedid_or_handle{ id, handle, page, text, children }Resolves !((blk-xxxxxx)) recursively: the source block and its children.
outl_block_refsidblocks that cite itWho writes ((blk-xxxxxx)) for this block.

Journals

ToolArgumentsReturnsNotes
outl_daily_todaynone{ date, meta, outline, md }Creates today’s journal on first call. Block ids are in outline, so use this (not a render) before editing a block.
outl_daily_getdate{ date, meta, outline, md }Creates that day’s journal if it does not exist. date is ISO, today / yesterday / tomorrow, or April 22nd, 2026.
outl_daily_appendtext, date?{ block_id, date, text }Mutates. One block at the end of the day (today by default). The fastest way to capture a thought.
outl_daily_rangefrom, to{ journals: [entry, …] }Inclusive. An entry is { date, exists: true, meta, outline }, or { date, exists: false } for a day with no journal. It does not create the missing days. from after to is INVALID_ARG.

The first two are listed as mutating because the first call of a day writes the journal page. Every call after that only reads.

ToolArgumentsReturnsNotes
outl_searchquery, in? (blocks / pages / all), limit?{ blocks: [{ id, handle, page, path, text }], pages: […] }Full text. in defaults to all, limit to 50.
outl_queryfilters below{ count, results: [meta, …] }Filters pages. See below.
outl_backlinksslug{ backlinks: […] }Each carries the citing block, its ancestors and its page.
outl_tag_listnone{ tags: [{ tag, count, pages }] }Every tag with usage counts.
outl_tag_pagestag{ tag, pages }Pages that mention #tag anywhere in their subtree.

outl_query filters, all optional and ANDed:

FilterMeaning
tagThe page’s subtree mentions #tag. Exact and case-sensitive: ops/deploy is not ops.
priorityThe page’s priority:: equals this.
propskey=value, or bare key for “has it at all”. String or array. Reads the page’s own property.
sinceDated pages on or after the cutoff, plus every undated page. The cutoff is Nd (7d, days back from today) or an ISO date (2026-11-01). Anything else is INVALID_ARG.
kindpage or journal.
not_tags, not_priority, not_props, not_since, not_kindThe exact complement of the positive filter. tag: x with not_tags: x returns nothing.

A wrong type (an array where a string is expected, a number in a list) is INVALID_ARG rather than a dropped filter, because a dropped filter returns the whole workspace. raw is reserved for a future query DSL and is rejected today. The block-level query language is a different thing: see Queries.

outl_search and outl_backlinks answer from the op log, not from the .md files. A line that exists only in a file edited outside outl is not found until outl reconcile turns it into ops. Details in cli.md.

Properties

Page properties are the key:: value lines at the top of a page. Block properties are the same line indented under a block.

ToolArgumentsReturns
outl_page_prop_setpage, key, value{ page, key, value }
outl_page_prop_getpage, key{ page, key, value }, or PROP_NOT_FOUND
outl_page_prop_listpage{ page, properties }
outl_page_prop_deletepage, key{ page, key }
outl_block_prop_setid, key, value{ id, key, value }
outl_block_prop_getid, key{ id, key, value }, or PROP_NOT_FOUND
outl_block_prop_listid{ id, properties: [{ key, value }] }
outl_block_prop_deleteid, key{ id, key }

set and delete mutate. set with an empty value removes the key, so the .md never keeps a bare key:: line. A block property value with a newline, a carriage return or a null byte is INVALID_ARG and the page is untouched. None of these need confirm: the previous value stays in the op log.

Trash

Deleting is a move to the trash, never a physical removal, so it can be undone.

ToolArgumentsReturnsNotes
outl_trash_listnone{ entries: [{ id, parent, preview, blocks, deleted_at_ms, restorable, refusal }] }restorable: false comes with a refusal sentence that says why.
outl_trash_restoreid{ id, parent, preview, blocks }Mutates. Puts the block back under the parent it was deleted from. No confirm: the worst case is a block reappearing.

Restoring refuses a deleted page (TRASH_PAGE_UNSUPPORTED) and a block whose parent is also in the trash (TRASH_PARENT_TRASHED). Nothing is lost in either case: the content is still in the log, and the refusal tells you which tool prints it. The full code table is in cli.md → Trash.

Files in and out

These three reach past the workspace folder. Read the safety model before allowing them without a prompt.

ToolArgumentsReturnsNotes
outl_asset_addpath, page?{ block_id, display_name, is_image, markdown, rel_path, target }Mutates. Copies the file at path (a path on the machine running the server, not bytes) into assets/<hash>.<ext> and appends its link as a block. Defaults to today’s journal. A file over [assets] max_bytes (default 100 MiB) is INVALID_ARG.
outl_export_mdslugraw markdownSame text as outl_page_render.
outl_export_jsonslug{ meta, blocks, … }The page’s AST plus sidecar data. The interchange format.
outl_export_hugoslug, out_dir{ slug, path, bytes }Writes a file to out_dir, anywhere the server’s user can write. Frontmatter comes from page properties.

outl_asset_add rejects daily together with page (INVALID_ARG); daily is the default and never needs setting.

Templates

A template is a page with a non-empty template:: property. The user-facing guide is Templates.

ToolArgumentsReturnsNotes
outl_template_listnone{ count, templates: [{ name, slug, page_id }] }
outl_template_applyname, page, block?{ template, page, count, created_blocks }Mutates. Deep-copies the template’s blocks under block (or the page root), replacing {{date}}, {{today}}, {{yesterday}}, {{tomorrow}}, {{page}} and {{time}} (HH:MM). The copied root carries a from-template:: property naming the template.
outl_template_resolvename{ template_slug, language, source, params }Reads a callable template without running it.
outl_template_runname, page, block, params?{ template, page, block, result }Mutates and executes code. Runs the template’s code block and writes a > **result:** subtree under block. block must belong to page. params is { "k": "v" }, strings only.

outl_template_run runs the code block through the same runtime as the apps’ run button. Treat it as the one tool here that executes something. It needs a build with the matching language runtime, and fails with no runtime for <lang> otherwise.

Batch

outl_batch applies a list of { op, args } writes in one session, in order.

{ "ops": [
  { "op": "page_create", "args": { "slug": "ideas" } },
  { "op": "block_append_tree",
    "args": { "page": "ideas", "tree": { "text": "root", "children": [{ "text": "child" }] } } },
  { "op": "page_prop_set", "args": { "page": "ideas", "key": "status", "value": "draft" } }
] }

op is one of:

page_create, page_update, page_delete, page_rename, page_merge, block_append, block_append_tree, block_insert, block_update, block_move, block_delete, block_toggle_todo, daily_append, page_prop_set, page_prop_delete.

Each op’s args are the arguments of the matching tool, and confirm rules carry over (page_merge needs confirm: true inside its args).

It stops at the first error and does not roll back. The reply is a normal success (isError: false) that carries applied (how many ran), failed_at (zero-based index), failed_op, error and a results entry per op that ran. So check for failed_at before telling the user it worked. The ops that already ran stay in the log, and the suffix never ran: resend only that suffix. There is no block_prop_* or trash_* op in a batch; call those tools directly.

Workspace

ToolArgumentsReturns
outl_workspace_infonone{ root, actor, pages, journals, blocks, ops, backlinks, assets, properties, last_modified, … }
outl_workspace_doctornone{ actor, error_count, findings: [{ severity, message }], … }

outl_workspace_doctor is the read-only half of outl doctor: it checks the op log, sidecars and block refs, and never repairs. severity is ok, info, warn or error. Repair (outl doctor --repair) stays a terminal command.

Error codes

error.codeWhenWhat to do
CONFIRM_REQUIREDA destructive tool without confirm: true.Ask the user, then resend with confirm: true.
PAGE_NOT_FOUNDThe slug names no page.Check outl_page_list. A title is not a slug.
BLOCK_NOT_FOUND, INVALID_BLOCK_IDThe id is not a block id, or no such block.Re-read the page to get ids. Ids come from outline fields, never from rendered markdown.
NO_WORKSPACEThe --workspace path has no .outl/ folder, or its config.toml does not load.Fix the host config. Not retryable from inside the conversation.
INVALID_ARGA missing or mistyped argument, bad date, unknown tool or batch op.The message names the argument.
INVALID_DATEA date the parser rejects.Use ISO YYYY-MM-DD.
SLUG_CONFLICTRenaming onto an existing page.Pass merge: true, or pick another slug.
PROP_NOT_FOUND*_prop_get on a missing key.Not an error to retry.
NOT_TRASHED, TRASH_*outl_trash_restore refused.The refusal text in outl_trash_list says why.
CYCLE_REJECTEDA move that would nest a block in its own descendant.Pick another parent.
PAGE_MARKDOWN_AHEAD_OF_LOGThe page’s .md holds lines the log never recorded, and a write would delete them.Stop retrying. Tell the user to run outl reconcile --ahead-of-log. error.data has path, lines, sample, recovery_command.
INTERNALAnything else.Run the same command on the CLI with --json for a readable error.

Protocol-level faults (malformed JSON, an unknown method) are JSON-RPC errors, not tool errors.