Wiki source code of MCP Tools

Last modified by Vincent Massol on 2026/09/04 19:19

Show last authors
1 Everything an AI assistant does on this wiki, it does by calling one of these tools. This page names them, grouped the way the assistant's own catalog is; {{code}}man{{/code}} documents them. Ask the assistant to call {{code}}man{{/code}} for the catalog, or {{code}}man <tool>{{/code}} for one tool's parameters, defaults and limits: that output is generated by the server itself, so it is always current.
2
3 Write tools are off by default and an administrator turns them on per wiki (see [[Enable Write Tools>>doc:documentation.extensions.admin.llm.mcp-server.enable-write-tools.WebHome]]). Whatever is enabled, the assistant acts with your rights and no others (see [[Agent Authentication>>doc:documentation.extensions.user.llm.mcp-server.agent-authentication.WebHome]]).
4
5 == Search and navigation ==
6
7 |=Tool |=What it does |=Write
8 |{{code}}query_documents{{/code}} |Search and browse XWiki documents via the wiki's Solr index. |No
9 |{{code}}get_document{{/code}} |Read an XWiki document's content (full, by line range, or outline). |No
10 |{{code}}get_tree{{/code}} |Survey a wiki or explore a subtree as an indented page tree. |No
11 |{{code}}get_history{{/code}} |Read a document's revision history, one revision's content, or a diff. |No
12 |{{code}}get_links{{/code}} |List the pages linking to a document (backlinks), or its own outgoing links. |No
13 |{{code}}get_attachment{{/code}} |Read an attachment's content or metadata from a document. |No
14 |{{code}}list_wikis{{/code}} |List the wikis reachable from this MCP endpoint. |No
15
16 {{code}}list_wikis{{/code}} exists only where the endpoint has cross-wiki reach.
17
18 == Structured data ==
19
20 |=Tool |=What it does |=Write
21 |{{code}}query_objects{{/code}} |Find structured objects (XObjects) by class and field filters. |No
22 |{{code}}get_schema{{/code}} |Describe an XWiki class: its fields and their types, or list all classes with instance counts. |No
23 |{{code}}write_object{{/code}} |Create a structured object or set fields on an existing one (schema-validated). |Yes
24 |{{code}}write_schema{{/code}} |Create or change an XClass definition (add, modify or remove a field). |Yes
25 |{{code}}delete_object{{/code}} |Remove one structured object from a document. |Yes
26
27 == Authoring ==
28
29 |=Tool |=What it does |=Write
30 |{{code}}edit_document{{/code}} |Edit a document's content and title by exact string replacement. |Yes
31 |{{code}}write_document{{/code}} |Create a document or replace its entire content. |Yes
32 |{{code}}delete_document{{/code}} |Delete a document (moves it to the recycle bin). |Yes
33 |{{code}}write_attachment{{/code}} |Attach a file to a document, or overwrite an existing attachment. |Yes
34 |{{code}}delete_attachment{{/code}} |Delete an attachment from a document. |Yes
35
36 == Help ==
37
38 |=Tool |=What it does |=Write
39 |{{code}}man{{/code}} |Show documentation for the available MCP tools. |No
40
41 {{code}}man{{/code}} also serves two reference pages: {{code}}man xwiki-syntax{{/code}} (an XWiki 2.1 syntax cheat-sheet) and {{code}}man awm{{/code}} (the structure of an App Within Minutes application, and how to build one with the write tools).
42
43 == Semantic search ==
44
45 |=Tool |=What it does |=Write
46 |{{code}}search_collections{{/code}} |Semantic + keyword search over indexed collection content. |No
47 |{{code}}list_collections{{/code}} |List the indexed collections available for semantic search. |No
48
49 These two exist only where the AI-LLM indexing module is installed, and they are governed by collection access rights rather than by the wiki's space filter.

Get Connected