Tools
The Hostsmith MCP server exposes nine tools across four areas: account, sites, domains, and deploys. All tools accept an optional partition argument; omit it to use your home partition.
| Area | Tool | Purpose |
|---|---|---|
| Account | get_account | Account, plan, limits, and usage |
| Sites | list_sites | List sites in your account |
| Sites | get_site | Inspect one site |
| Sites | create_site | Create a site |
| Sites | delete_site | Permanently delete a site |
| Domains | list_domains | List shared and custom domains you can use |
| Deploys | deploy_files | Push inline file contents (small text, ≤ ~1 MB total) |
| Deploys | deploy_create_upload | Start a direct-to-S3 upload for binaries / large files |
| Deploys | deploy_finalize | Commit a deploy started with deploy_create_upload |
Account
get_account
Get the user's organization (orgId, orgName), the calling user's home partition under user.homePartition, the current subscription plan with its limits (max sites, max domains, storage, bandwidth), and current usage counts. Usage is summed across all partitions.
Inputs: none.
Output: account object including orgId, orgName, user.homePartition, plan (with limits), and usage.
Example prompt:
Show my Hostsmith plan and how many sites I have left.
Sites
list_sites
List sites in the user's account. Returns each site's siteId, subdomain, domain, and current status. The result is the source of truth for "does the user already have a site at FQDN X" - call it before any create / deploy / delete to resolve the user's site reference. By default queries all data partitions and merges; pass partition to limit.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
partition | "us" | "eu" | no | Filter by partition. Omit to query both. |
Output: array of site summaries.
Example prompt:
Do I already have a site for
demo.hostsmith.link?
get_site
Get full details of one site by ID, including its public URL (https://<subdomain>.<domain>), current deployment status, and configuration. Use after list_sites to inspect a single site, or after a deploy to grab the URL.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site ID returned by list_sites or create_site. |
partition | "us" | "eu" | no | Partition the site lives in. Omit to use your home partition. |
Output: site object with URL, status, and config.
Example prompt:
What's the public URL of the site I just created?
create_site
Create a new site under one of the domains returned by list_domains. Returns the new siteId, full URL, and configuration. After creation, deploy content with deploy_files (small inline text) or deploy_create_upload + deploy_finalize (binaries or files > ~1 MB).
Constraints:
domainMUST be a domain returned bylist_domainsfor this user. Never invent one.- The selected domain must be in
activestatus. partitionpassed here MUST match the partition of the selected domain.- To serve the bare apex, pass
subdomain: "www"- only valid when the domain hasenableApexDomain: true. - For any other subdomain, the domain must have
enableSubdomains: true.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | Parent domain. Must come from list_domains. Examples: us.hostsmith.link, eu.hostsmith.link, custom. |
subdomain | string | no | Lowercase alphanumeric + hyphens; auto-generated if omitted. "www" for apex (when supported). |
partition | "us" | "eu" | no | Must match the domain's partition. |
Output: site object with siteId and URL.
Example prompt:
Create a site under
us.hostsmith.linkand call itweekly-report.
delete_site
Permanently delete a site and all of its deployed files. Destructive - the URL becomes unreachable immediately and content cannot be recovered. The agent must pass confirm: true after explicit user confirmation.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site ID to delete. |
confirm | boolean | yes* | Must be true to actually delete. Without it, the tool returns an error and does not delete. |
partition | "us" | "eu" | no | Partition the site lives in. |
Output: confirmation message including the URL that was retired.
Example prompt:
Delete the site
weekly-report-old. Yes, I'm sure.
Domains
list_domains
List the domains the user can host sites under: shared hosting domains (e.g. us.hostsmith.link, eu.hostsmith.link, available to everyone) and custom domains owned by the user's organization. Use to pick a domain value before calling create_site. Each entry includes enableApexDomain and enableSubdomains flags - check them before constructing a subdomain.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
partition | "us" | "eu" | no | Filter by partition. Omit to query both. |
shared | boolean | no | true for shared only, false for custom only. Omit for both. |
Output: array of domain summaries with enableApexDomain, enableSubdomains, partition, and status.
Example prompt:
Which custom domains can I deploy to in the EU partition?
Deploys
deploy_files
Publish in-memory file contents to a site without writing to disk. Use when the agent has just generated content (HTML page, JSON, short text). Returns the deployment version and status; call get_site afterwards if you need the public URL to share. The site must already exist - call create_site first if you do not have a siteId. Deploying overwrites existing content; confirm with the user first.
When to use: small text artifacts, total payload up to ~1 MB. For binaries or larger payloads, use deploy_create_upload instead.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site ID to deploy to. |
files | Array<{ fileName, content }> | yes | File path relative to site root and content as a string. Include index.html for HTML sites. |
partition | "us" | "eu" | no | Partition the site lives in. |
Output: Deployed N file(s). Version: <id>, Status: <status>.
Example prompt:
Deploy this HTML to my site as
index.html.
deploy_create_upload
Start a direct-to-S3 upload for binary or large files. Returns versionId plus presigned S3 PUT URLs per part. Use this instead of deploy_files for binaries (PDF, image, video, zip) or any file larger than ~1 MB.
Bundle into a zip first when the upload contains more than 3 files OR any file is larger than ~1 MB. The fileWorker auto-extracts a single-zip upload after promotion, preserving subdirectories end-to-end and avoiding one PUT round-trip per file.
Three-step protocol:
- Call
deploy_create_uploadwith{ siteId, files: [{ fileName, fileSize }] }. Receive{ versionId, files: { [fileName]: { uploadId, key, partUploadUrls, partSize, expiresAt } } }. - For each file, slice bytes into
partSizechunks and PUT each chunk to itspartUploadUrls[i].url. Capture theETagresponse header from every PUT - you need it for finalize. - Call
deploy_finalizewith the collected ETags.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site ID to deploy to. |
files | Array<{ fileName, fileSize }> | yes | Per-file path and exact byte size. Most user requests are a single file. |
partition | "us" | "eu" | no | Partition the site lives in. |
Output: envelope with versionId and per-file uploadId, key, partUploadUrls, partSize, expiresAt.
Example prompt:
Upload this 12 MB PDF to my report site at
report.pdf.
deploy_finalize
Commit a deploy started with deploy_create_upload. Pass the versionId from the start response and a completions array with the agent-collected ETags for each multi-part file. Single-part uploads (those whose start response had an empty uploadId) do not need a completion entry. Returns the live site URL on success.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
siteId | string | yes | The site ID being deployed to (must match the start call). |
versionId | string | yes | From deploy_create_upload. |
completions | Array<{ uploadId, key, parts: Array<{ ETag, PartNumber }> }> | yes | One entry per multi-part file. |
partition | "us" | "eu" | no | Partition the site lives in. |
Output: live site URL.
Example prompt:
The uploads are done - finalize the deploy.
For the canonical Zod schemas and runtime descriptions, read src/index.ts in the mcp-server repo. The descriptions there are what your agent sees at tool-discovery time.
