replace_form
Replace a KoboToolbox form with a new XLSForm version while preserving its UID and submissions; use it to add translations or modify questions on a live form.
Instructions
Replace an existing form with a new XLSForm version.
Updates the form definition while preserving the form UID and all existing submissions. Use this for adding translations, modifying questions, or any update to a live form.
Typical translation workflow:
export_form() → download the .xlsx
Add label::Language (code) columns to survey and choices sheets
replace_form() → redeploy with translations
Call info(topic="translate") for detailed guidance.
Args: form_uid: The unique identifier (uid) of the form to replace. file_path: Path to the new XLSForm (.xlsx) file.
Returns: JSON object with uid, enketo_url, and management_url.
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": {
"form_uid": "<form_uid>",
"file_path": "<file_path>"
},
"name": "replace_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_uid | Yes | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |