Skip to main content
Glama

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:

  1. export_form() → download the .xlsx

  2. Add label::Language (code) columns to survey and choices sheets

  3. 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

NameRequiredDescriptionDefault
form_uidYes
file_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden. It does disclose valuable behavior — UID and submissions are preserved, and the return payload includes uid, enketo_url, and management_url — but it never says what happens to questions removed in the new XLSForm, whether the operation is reversible, or what permissions are required for a live-form mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core statement, then usage context, then the numbered workflow. The Args/Returns blocks mirror the schema and output schema respectively, which is slightly redundant, but the translation workflow is genuinely informative rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a two-parameter mutation with an output schema that already documents return fields, the description supplies purpose, live-form caveats, and a worked workflow. The remaining gap is destructive semantics around replaced question definitions, which matters for an operation on a form with existing submissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for both parameters. It does document each one and adds the useful .xlsx format constraint on file_path, but 'the unique identifier (uid) of the form to replace' largely restates the parameter name and gives no sourcing hint (e.g., where to obtain the uid).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Replace an existing form with a new XLSForm version') and immediately scopes it by what is preserved: the form UID and all existing submissions. That preservation clause is what separates it from a deploy-style sibling, so an agent can pick correctly without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete when-to-use cases (adding translations, modifying questions, any update to a live form) plus an explicit three-step workflow and a pointer to info(topic="translate"). It never states when NOT to use it or names a contrasting alternative for creating a brand-new form, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.