Markus Michalski FAQ

Wiki.js Plugin: Tools

Reference for all ten MCP tools of the Wiki.js plugin: parameters, return values, validation, the shrink guard confirmContentShrink, publish status, verified markers.

Deutsche Version

Back to overview

Wiki.js Plugin: Tools

This documentation always describes the latest published version.

The MCP server wikijs-mcp provides ten tools. Seven of them talk to the Wiki.js GraphQL API, three work exclusively on the local SQLite database.

Tool Purpose Target
wikijs_create_page Create a page Wiki.js (write)
wikijs_update_page Change a page Wiki.js (write)
wikijs_get_page Read a page Wiki.js (read)
wikijs_list_pages List pages Wiki.js (read)
wikijs_search_pages Full-text search Wiki.js (read)
wikijs_delete_page Delete a page Wiki.js (destructive)
wikijs_move_page Move a page Wiki.js (write)
wikijs_get_page_history Read the local change history local DB only
wikijs_mark_verified Mark a page as checked against the code local DB only
wikijs_get_verified_refs Read verified refs local DB only

Common rules

All inputs are validated before a request goes to Wiki.js.

Field Rule
path 1 to 500 characters, only letters, digits, -, _ and /, starts and ends with a letter or digit, no .. and no //, no leading slash
locale Format de or en-US (two lowercase letters, optionally a hyphen and two uppercase letters)
id positive integer
title 1 to 200 characters
description 1 to 500 characters
content 1 to 500,000 characters
tags at most 50 tags, each 1 to 100 characters

In practice the database column for the Wiki.js description is limited to 255 characters. Keep the description under 250 characters, otherwise saving in Wiki.js fails even though the tool validation allows 500.

The validation rejects paths with a dot or non-ASCII characters. You address such pages by their id.

Errors come back as a normal tool result. Typical messages: Page not found at path: ..., Either "id" or "path" must be provided, HTTP error! status: ..., GraphQL request failed: ..., Request timed out. Please try again..

wikijs_create_page

Creates a new page. If a page already exists at that path, the call fails.

Parameter Type Required Default Description
path string Yes Page path without leading slash
title string Yes Title
content string Yes Content (Markdown or HTML)
description string Yes Meta description
locale string No en Language
editor string No markdown markdown, code or ckeditor
isPublished boolean No true Publish immediately
isPrivate boolean No false Private page
tags string No [] Tags
sourceRepo string No empty Source project for the local history
sourceRef string No empty Commit or tag for the local history
summary string No empty One sentence about the change, local history only

Returns: message (Page created successfully at /<path>) and page with id, path, title.

wikijs_update_page

Changes an existing page. The page is identified by id, or by path plus locale.

Parameter Type Required Default Description
id integer No* Page ID
path string No* Page path
locale string No en Language, matters for path access
content string No New content, replaces the whole page
title string No New title
description string No New description
isPublished boolean No not set Publish status
tags string No Replaces the tags
sourceRepo, sourceRef, summary string No empty Local history only
confirmContentShrink boolean No false Confirms an intentional large reduction

*One of id or path is required.

Whatever you do not send is kept: the server loads the page and sends content, title, description and tags back unchanged. This does not apply to the publish status.

Send isPublished: true with every update of a published page. Without it the server sends no status, and Wiki.js saves the page as a draft.

content replaces the entire page body, there is no patching. Load the page with wikijs_get_page first and send the complete new text.

Shrink guard (confirmContentShrink)

If the old content is at least 200 characters long and the new content is shorter than half of it, the server refuses the update. The error message names both lengths. If the reduction is intended (for example when rebuilding a hub into a short version), repeat the call with confirmContentShrink: true. The guard only applies when content is sent.

Returns: message (Page <id> updated successfully) and result (Wiki.js response with succeeded, errorCode, message).

isPrivate and the editor type cannot be changed through this tool.

wikijs_get_page

Reads a page by id, or by path plus locale (default en).

Returns: id, path, title, description, content, contentType, isPublished, locale, createdAt, updatedAt.

Content over 100,000 characters is truncated and ends with the notice [Content truncated. Original length: ... chars. ...].

You need the updatedAt value for wikijs_mark_verified. Read it after the last publish.

wikijs_list_pages

Parameter Type Default Description
locale string all Filter by language
limit integer 50 1 to 200
offset integer 0 Number of entries to skip, at least 0

Returns: pages (per page id, path, title, description, locale, isPublished, tags, updatedAt) and pagination with limit, offset, total_count, has_more and, while more pages exist, next_offset. For this the server fetches all pages from Wiki.js every time and filters and slices locally. total_count applies after the locale filter.

wikijs_search_pages

Parameter Type Required Description
query string Yes Search term, 2 to 200 characters
locale string No Filter results by language

Returns: totalHits, suggestions and results (per hit id, title, path, description, locale). The locale filter is applied after the search.

wikijs_delete_page

Deletes a page permanently. Parameters as for wikijs_get_page (id or path, locale). Returns: message (Page <id> deleted permanently) and result.

Deleting cannot be undone. Ask before you do it.

wikijs_move_page

Parameter Type Required Default Description
destinationPath string Yes New path
id integer No* Page ID
path string No* Current path
locale string No en Current language
destinationLocale string No en Target language

Returns: message, from, to, destinationLocale, result.

The URL of the page changes, links have to be updated. History entries and verified markers are filed by path: after a move they stay with the old path, and at the new path the page counts as never verified.

wikijs_get_page_history

Reads the locally logged change history. Does not call Wiki.js.

Parameter Type Required Default Description
path string Yes Page path, as used with create/update
locale string No all Filter by language
limit integer No 20 1 to 200, newest first

Returns: path and entries. Each entry has id, page_path, changed_at (UTC), locale, source_repo, source_ref, summary, verified and page_updated_at. verified is 1 only for entries written by wikijs_mark_verified. For entries from create/update, source_ref only means that the page was written at that state.

Only calls where at least one of sourceRepo, sourceRef, summary was set are logged.

wikijs_mark_verified

Records that a page was checked against the source code at a given commit. It writes only to the local database, does not change the Wiki.js page, and checks neither that the page exists nor that the ref is valid.

Parameter Type Required Description
path string Yes Page path, a leading / is ignored
locale string Yes Language
sourceRepo string Yes Name of the source project
sourceRef string Yes Commit or tag the page was checked against
pageUpdatedAt string Yes updatedAt of the page, read after the last publish
summary string No Short note, e.g. baseline claim check

The tool rejects empty values (after trimming whitespace and line breaks) for sourceRepo, sourceRef or pageUpdatedAt. Paths with .., //, a trailing slash or whitespace are rejected.

Returns: message (Marked /<path> (<locale>) as verified at <ref>).

wikijs_get_verified_refs

Returns the newest verified ref per page and locale. Pages that were never marked do not appear, even if they have a written-at sourceRef. Does not call Wiki.js.

Parameter Type Required Description
path string No Page path, all verified pages when omitted
locale string No Filter by language

Returns: entries with page_path, locale, source_repo, source_ref, page_updated_at, verified_at.

The marker only counts while page_updated_at matches the current updatedAt of the page in Wiki.js. The tool does not compare this itself, the source-check skill does.

Tool annotations

Tool Read-only Destructive Idempotent
wikijs_get_page, wikijs_list_pages, wikijs_search_pages yes no yes
wikijs_get_page_history, wikijs_get_verified_refs yes no yes
wikijs_create_page, wikijs_move_page, wikijs_mark_verified no no no
wikijs_update_page no no yes
wikijs_delete_page no yes no

How the tools work together is shown on the Workflows page.