project_shutdown_instance
Shutdown a specific project instance by providing its project identifier to terminate operations and release resources.
Instructions
Shutdown specific project instance
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier to shutdown |
Implementation Reference
- src/index-backup.ts:973-1004 (handler)MCP tool handler registration for 'project_shutdown_instance': validates input, calls projectManager.shutdownProjectInstance(projectId), and formats markdown response with success/error messages.server.tool( "project_shutdown_instance", "Shutdown specific project instance", { projectId: z.string().describe("Project identifier to shutdown") }, async ({ projectId }) => { try { const result = await projectManager.shutdownProjectInstance(projectId); return { content: [ { type: "text", text: result.success ? `š **Istanza Terminata**\n\nā ${result.message}` : `ā **Errore Terminazione**\n\n${result.message}` } ] }; } catch (error) { return { content: [ { type: "text", text: `ā **Errore:** ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
- src/index-backup.ts:976-978 (schema)Input schema using Zod: requires 'projectId' as string with description.{ projectId: z.string().describe("Project identifier to shutdown") },
- Core shutdown logic in ProjectInstanceManager: retrieves instance, calls controller.shutdown(), deactivates and removes from map, returns success/error.public async shutdownProjectInstance(projectId: string): Promise<{ success: boolean; message: string; }> { const instance = this.projectInstances.get(projectId); if (!instance) { return { success: false, message: `Project instance ${projectId} not found` }; } try { await instance.controller.shutdown(); instance.isActive = false; this.projectInstances.delete(projectId); console.error(`š Project ${instance.config.name} instance shutdown completed`); return { success: true, message: `Project ${instance.config.name} instance shutdown successfully` }; } catch (error) { return { success: false, message: `Error shutting down ${instance.config.name}: ${error instanceof Error ? error.message : String(error)}` }; } }