Skip to main content
Glama

Connect a form to Xodia Forms

connect_form

Turns a form in the site's code into a Xodia form, the same way as Send to Xodia Forms in Xodia's Settings panel: it writes action, method="post", data-xodia-form, success and error text, a hidden spam field and the page field onto the form, adds the site helper, and makes the form's record (recipients: you, the member whose AI this is; the Turnstile check on for paid plans). Pick the form with index, line or match, or leave them out when the file has one form. Works on React (.tsx, .jsx) and plain HTML (.html) files. Keep the form's field names, keep or add a role="status" (or data-xodia-status) element for the answer, and never add an onSubmit or a mailto: action; a form with its own submit code is connected but flagged, so remove that code. Refused for a form that is already connected (form_already_connected), a file with no such form, other file types, and forms with no named fields. Saved at once, like every edit in Xodia; pushing to Git and publishing stay the user's. Recipients, Turnstile, notifications and webhooks are changed in Xodia.

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": {
      "file": "<file>",
      "projectId": "<projectId>"
    },
    "name": "connect_form"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe file the form is in, relative to the project root (src/pages/Contact.tsx, contact.html)
lineNoA line of the form in the file (its <form> tag or any line inside it), as read_file numbers them
nameNoThe form's name in Xodia (Contact form); default from the data-xodia-connect value or the file name
indexNoWhich form in the file, 1 for the first. Give one of index, line or match, or none when the file has one form
matchNoThe form's data-xodia-connect value, id, name or aria-label, as written in the code
branchNoOptional branch; default the branch the workspace has open
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false, openWorld=false; the description goes far beyond by listing the exact attributes written, the helper added, the record created with recipients and Turnstile, and that the edit is saved immediately with Git push and publish left to the user. It also discloses a soft-failure state (a form with its own submit code is connected but flagged) and a named error code, form_already_connected.

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?

Purpose and mechanism are front-loaded and nearly every sentence carries real information (written attributes, file types, constraints, refusals, persistence semantics). It is a single dense run-on paragraph that mixes mechanics, parameters and constraints without separation, which makes it harder to scan than it needs to be.

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?

For a 7-parameter mutating tool with no output schema, the description covers side effects, supported inputs, refusals and post-edit state well. The remaining gap is the return value: with no output schema, nothing tells the agent what the tool hands back (e.g., the created record or modified ranges).

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 description coverage is 100%, so every parameter including file, line, index, match, branch and projectId is already documented in the schema. The description restates the index/line/match selection rule and the omit-when-single-form case, which reinforces but does not add meaning beyond the structured fields, so baseline 3 applies.

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?

Opens with a specific verb+resource ("Turns a form in the site's code into a Xodia form") and immediately grounds it in the equivalent UI action ("Send to Xodia Forms in Xodia's Settings panel"). It then enumerates exactly what is written, which distinguishes it from generic siblings like edit_file or list_forms without ambiguity.

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

Usage Guidelines5/5

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

Explicit selection guidance is given: pick the form with index, line or match, or omit them when the file has one form. Supported file types (.tsx, .jsx, .html) and explicit refusal conditions (already connected, no such form, other file types, no named fields) delimit when the tool will not work, which is exactly the when/when-not coverage an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources