This issue has been created
There is 1 update.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-4cceb7e2-2441-48b6-be8f-2497eafcea8b LLMAI-180 Open

MCP write_document hardcodes XWiki 2.1 syntax but new pages inherit the default wiki syntax

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-2dbd7cd7-d0c5-46fe-a180-b7e4df24965b Enrique created this issue on 01/Sep/26 13:22
 
Summary: MCP write_document hardcodes XWiki 2.1 syntax but new pages inherit the default wiki syntax
Issue Type: cid:jira-generated-image-avatar-4cceb7e2-2441-48b6-be8f-2497eafcea8b Bug
Affects Versions: 0.9
Assignee: Unassigned
Created: 01/Sep/26 13:22
Priority: cid:jira-generated-image-static-major-ef7dfcd3-8cbe-4da1-8bc5-f7a1c78237f1 Major
Reporter: Enrique
Description:

Problem

The write_document MCP tool tells clients to generate XWiki 2.1 content, but it does not set the document syntax when creating a page. The new page inherits the wiki default syntax.

On a wiki configured to use markdown/1.2 by default, XWiki 2.1 content can therefore be stored as Markdown and rendered incorrectly.

Observed with XWiki 18.4.4 and LLM MCP extension 0.9.

Source

Repository: xwiki-contrib/ai-llm
Input schema and instructions (the line that causes the bug): MCPWriteDocumentTool.java lines 169-189

.description("... Write XWiki 2.1 syntax, NOT Markdown ...")

Proposed behavior

  • Add an optional syntax parameter, for example markdown/1.2.
  • When creating a document:
    • Use the supplied syntax, when present.
    • Otherwise, obtain the target wiki's default dynamically through XWiki#getDefaultDocumentSyntax().
  • Advertise the effective default syntax dynamically in the tool description or man page instead of hardcoding XWiki 2.1.
  • When updating a document, preserve its existing syntax and reject a supplied syntax that differs from it.
  • Update the tool schema, documentation and tests.
 
 

1 update

 
cid:jira-generated-image-avatar-2dbd7cd7-d0c5-46fe-a180-b7e4df24965b Changes by Enrique on 01/Sep/26 13:24
 
Difficulty: Unknown Easy