Wiki source code of MCP Tools

Last modified by Vincent Massol on 2026/11/30 17:34

Show last authors
1 The ##man## tool documents both the tools and the catalog's reference pages. Ask the assistant to call ##man## for the catalog, or ##man <tool>## 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, an assistant that has signed in acts with your rights and no others, and an assistant served as a guest never receives a write tool (see [[Agent Authentication>>doc:documentation.extensions.user.llm.mcp-server.agent-authentication.WebHome]]).
4
5 == Authoring ==
6
7 |=Tool |=What it does |=Write
8 |##delete_attachment## |Delete an attachment from a document. |Yes
9 |##delete_document## |Delete a document (moves it to the recycle bin). |Yes
10 |##edit_document## |Edit a document's content and title by exact string replacement. |Yes
11 |##write_attachment## |Attach a file to a document, or overwrite an existing attachment. |Yes
12 |##write_document## |Create a document or replace its entire content. |Yes
13
14 == Help ==
15
16 |=Tool |=What it does |=Write
17 |##man## |Show documentation for the available MCP tools. |No
18
19 ##man## is always available, even when an administrator has turned every other tool off. For a guest caller it lists only the read tools and the reference pages.
20
21 == Reference ==
22
23 The catalog's Reference section documents the syntax and structures the write tools produce.
24
25 |=Reference page |=What it covers
26 |##awm## |The structure of an App Within Minutes application, and how to build one with the write tools.
27 |##xwiki-syntax## |An XWiki 2.1 syntax cheat-sheet.
28
29 == Search & Navigation ==
30
31 |=Tool |=What it does |=Write
32 |##get_attachment## |Read an attachment's content or metadata from a document. |No
33 |##get_document## |Read a document's source (full, by line range, or outline), or its rendered output as plain text or HTML. |No
34 |##get_history## |Read a document's revision history, one revision's content, or a diff. |No
35 |##get_links## |List the pages linking to a document (backlinks), or its own outgoing links. |No
36 |##get_tree## |Survey a wiki or explore a subtree as an indented page tree. |No
37 |##list_wikis## |List the wikis reachable from this MCP endpoint. |No
38 |##query_documents## |Search and browse XWiki documents via the wiki's Solr index. |No
39
40 Searches and tree reads leave hidden pages out unless the caller asks for them; ##get_links## counts hidden backlinks without listing them by default. ##get_document## returns the source by default and its rendered output only when asked.
41
42 ##list_wikis## appears only where the endpoint has cross-wiki reach; it is not part of the tool selection.
43
44 == Semantic Search ==
45
46 |=Tool |=What it does |=Write
47 |##list_collections## |List the indexed collections available for semantic search. |No
48 |##search_collections## |Semantic + keyword search over indexed collection content. |No
49
50 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.
51
52 == Structured Data ==
53
54 |=Tool |=What it does |=Write
55 |##delete_object## |Remove one structured object from a document. |Yes
56 |##get_schema## |Describe an XWiki class: its fields and their types, or list all classes with instance counts. |No
57 |##query_objects## |Find structured objects (XObjects) by class and field filters. |No
58 |##write_object## |Create a structured object or set fields on an existing one (type-checked: the field must exist, number, date and boolean values must parse, and a value of a fixed list must be one of its values). |Yes
59 |##write_schema## |Create or change an XClass definition (add, modify or remove a field). |Yes

Get Connected