delete_site
Remove a site from Fastly NGWAF MCP Server by specifying corporation and site names to manage web application security efficiently.
Instructions
Delete a site
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| corpName | No | Corporation name (uses context default if not provided) | |
| siteName | No | Site name (uses context default if not provided) |
Implementation Reference
- server.js:941-947 (handler)MCP tool handler for 'delete_site' in the CallToolRequestHandler's switch statement. It resolves the corporation and site names using resolveContext, checks if siteName is provided, and delegates to the client's deleteSite method.case 'delete_site': const { corpName: corpForDelete, siteName: siteForDelete } = resolveContext(typedArgs); if (!siteForDelete) { throw new Error('Site name is required. Please set context or provide siteName parameter.'); } result = await client.deleteSite(corpForDelete, siteForDelete); break;
- server.js:524-534 (registration)Registration of the 'delete_site' tool in the tools array, returned by list_tools handler. Includes name, description, and input schema definition.{ name: 'delete_site', description: 'Delete a site', inputSchema: { type: 'object', properties: { corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' }, siteName: { type: 'string', description: 'Site name (uses context default if not provided)' }, }, }, },
- server.js:91-94 (helper)Implementation of the deleteSite method in FastlyNGWAFClient class, which sends the DELETE API request to remove the specified site and returns success confirmation.async deleteSite(corpName, siteName) { await this.api.delete(`/corps/${corpName}/sites/${siteName}`); return { success: true }; }