create_or_update_wiki_page
Create a new wiki page or edit an existing one in Redmine, including targeted find-and-replace patches, metadata changes, parent hierarchy, and file attachments.
Instructions
Create a new wiki page or update an existing one.
CONTENT - provide exactly one of text or text_patches (mutually exclusive):
- text: Full page content. Required when creating a new page. For updates, replaces entire content.
- text_patches: Apply targeted find-and-replace edits to the existing page content.
Format: [{"old_text": "text to find", "new_text": "replacement"}]
Optional "replace_all": true to replace all occurrences (default: false).
Only works on existing pages. Cannot be used to create new pages.
METADATA-ONLY UPDATE:
For existing pages, you can update only metadata (parent_title, comments, uploads)
without providing text or text_patches.
Args:
project_id: Project ID (numeric) or project identifier (string) (required)
title: Wiki page title (required)
text: Full page content in Textile or Markdown format.
Required for creating new pages. Replaces entire content on update.
Cannot be used together with text_patches.
text_patches: List of find-and-replace edits for the existing page content.
Each dict: {"old_text": "text to find", "new_text": "replacement"}.
Optional "replace_all": true to replace all occurrences (default: false).
Example: [{"old_text": "## Old Section", "new_text": "## New Section"}]
IMPORTANT: Use get_wiki_page() first to see exact current content before constructing patches.
Cannot be used together with text. Only works on existing pages.
comments: Comment describing the change (optional)
parent_title: Title of the parent page for hierarchy (optional)
uploads: List of file uploads to attach. Each upload should be a dictionary with:
- token: Upload token from upload_attachment() (required)
- filename: Filename to use in Redmine (required)
- content_type: MIME type (optional)
- description: File description (optional)
Returns:
Dictionary containing the created/updated wiki page information
Note:
- Redmine automatically manages version history
- Use existing upload_attachment() to get upload tokens for attachments
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"title": "<title>"
},
"name": "create_or_update_wiki_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| title | Yes | ||
| uploads | No | ||
| comments | No | ||
| project_id | Yes | ||
| parent_title | No | ||
| text_patches | No |