suspend_site
Suspend a site on a specified server and site ID to temporarily disable access, preventing public availability without deleting data.
Instructions
Suspend a site
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | The ID of the server | |
| site_id | Yes | The ID of the site to suspend |
Implementation Reference
- src/tools/sites.ts:151-168 (handler)The MCP tool handler for 'suspend_site'. Calls client.suspendSite() and returns a confirmation message.
server.tool( "suspend_site", "Suspend a site", { server_id: z.coerce.number().describe("The ID of the server"), site_id: z.coerce.number().describe("The ID of the site to suspend"), }, async ({ server_id, site_id }) => { await client.suspendSite(server_id, site_id); return { content: [ { type: "text" as const, text: `Site ${site_id} on server ${server_id} has been suspended`, }, ], }; } - src/tools/sites.ts:154-156 (schema)Input schema for suspend_site: server_id (number) and site_id (number), both required and coerced from strings.
{ server_id: z.coerce.number().describe("The ID of the server"), site_id: z.coerce.number().describe("The ID of the site to suspend"), - src/tools/sites.ts:151-169 (registration)The tool is registered via server.tool() inside the registerSiteTools() function.
server.tool( "suspend_site", "Suspend a site", { server_id: z.coerce.number().describe("The ID of the server"), site_id: z.coerce.number().describe("The ID of the site to suspend"), }, async ({ server_id, site_id }) => { await client.suspendSite(server_id, site_id); return { content: [ { type: "text" as const, text: `Site ${site_id} on server ${server_id} has been suspended`, }, ], }; } ); - src/client.ts:173-178 (handler)The underlying API client method that performs POST /servers/{serverId}/sites/{siteId}/suspend to the Ploi API.
async suspendSite(serverId: number, siteId: number): Promise<void> { await this.request<void>( "POST", `/servers/${serverId}/sites/${siteId}/suspend` ); }