Skip to main content
Glama

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
NameRequiredDescriptionDefault
projectIdYesProject identifier to shutdown

Implementation Reference

  • 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)}` } ] }; } } );
  • 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)}` }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/multiluca2020/visum-thinker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server