nsd_publish
Put a page online at .nsd.sg. Give a site name and either the full HTML of the page or a list of files. Creates the site if you do not have it yet; on a site you already own it adds or replaces the given files and keeps the rest. Returns the live URL. IMPORTANT: if any file contains , on*= attributes or javascript:, send it as files with encoding "base64" (standard base64 of the UTF-8 text); the hosting firewall rejects such code sent as plain text with a bare 403 Forbidden. When in doubt, always use base64. FORMS: a page can collect replies (RSVP, order, contact, sign-up) with a plain ; each field needs a name attribute, replies go to the owner's dashboard and email, visitors never log in. Add against spam, and optionally to send the visitor to your own thank-you page. No file uploads in forms. A brand-new address usually gets HTTPS within a few minutes, rarely up to 15 (the browser shows a secure-connection error until then); always pass that on to the user when the result says ready: false.
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": {
"name": "<name>"
},
"name": "nsd_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | Full HTML of the home page (index.html), plain text. Only for pages WITHOUT <script> or on*= attributes; pages with JavaScript must go through files with encoding "base64" or the request is refused with 403 by the hosting firewall. | |
| name | Yes | The site name: letters, numbers, hyphens. Becomes <name>.nsd.sg. Use an existing site name to update it. | |
| files | No | Files to publish, e.g. [{path:"index.html", content:"..."}, {path:"style.css", content:"..."}]. Any file containing <script>, on*= attributes or javascript: MUST be sent as {path, content: <base64 of the UTF-8 text>, encoding: "base64"}; images, fonts and PDFs likewise as base64. Max 100 files, 8 MB total; a build output bigger than that goes up as a ZIP from the dashboard. Special files: 404.html = the site's own not-found page; _redirects (one rule per line: "/old /new 301", "/* /index.html 200" for a single-page app) = same-site redirects only. | |
| title | No | Optional label shown only in the owner's dashboard. |