NSD.SG
v0.14.11Put the page your AI made online at yourname.nsd.sg.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
nsd_publish
Put a page online at <name>.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 <script>, 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…
| Parameter | Type | Description |
|---|---|---|
name * | string | The site name: letters, numbers, hyphens. Becomes <name>.nsd.sg. Use an existing site name to update it. |
files | array | 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… |
html | string | 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 wi… |
title | string | Optional label shown only in the owner's dashboard. |
nsd_update
Replace ALL files of an existing site with the given HTML or files. Older versions are kept and can be restored from the dashboard. Same rule as nsd_publish: anything containing <script>, on*= attributes or javascript: must be sent as files with encoding "base64", or the hosting firewall refuses it with 403.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The site id from nsd_list_sites. |
files | array | |
html | string | Full HTML of the new home page, plain text, only when it has no <script> or on*= attributes; otherwise use files with encoding "base64". |
nsd_list_sites
List the caller's sites: id, name, live URL, status, plan and days of free period left.
nsd_get_site
One site: URL, status, files, storage used and the plan's limits.
| Parameter | Type | Description |
|---|---|---|
site_id * | string |
nsd_read_file
Read one file of a live site, exactly as it is online now. Use it before a small change ("change the price", "fix the date") in a chat that does not have the page yet: read the file, change only what the user asked, then send it back with nsd_publish under the same name. Text files come back as text, images and other binary files as base64. Max 1 MB.
| Parameter | Type | Description |
|---|---|---|
path * | string | The file path as nsd_get_site lists it, e.g. index.html. |
site_id * | string | The site id from nsd_list_sites. |
nsd_delete_site
Delete a site and all its versions. Requires the site id (never a name). The address becomes free for anyone.
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | Must be true. |
site_id * | string |