Skip to main content
Glama

project_start_instance

Start a dedicated persistent instance for a specific Visum project to enable structured sequential thinking capabilities for AI assistants.

Instructions

Start dedicated persistent instance for specific Visum project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier (campoleone, testProject, etc.)

Implementation Reference

  • MCP server tool registration for 'project_start_instance', including input schema and handler function that invokes projectManager.startProjectInstance and formats the response content.
    server.tool( "project_start_instance", "Start dedicated persistent instance for specific Visum project", { projectId: z.string().describe("Project identifier (campoleone, testProject, etc.)") }, async ({ projectId }) => { try { const result = await projectManager.startProjectInstance(projectId); if (result.success) { return { content: [ { type: "text", text: `๐Ÿš€ **Istanza Progetto Avviata**\n\nโœ… ${result.message}\n\n๐Ÿ“Š **Network Stats:**\n- Nodi: ${result.stats?.nodes}\n- Link: ${result.stats?.links}\n- Zone: ${result.stats?.zones}\n\n๐Ÿ”„ L'istanza รจ ora attiva e pronta per ricevere comandi.` } ] }; } else { return { content: [ { type: "text", text: `โŒ **Errore Avvio Istanza**\n\n${result.message}` } ] }; } } catch (error) { return { content: [ { type: "text", text: `โŒ **Errore:** ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Zod schema for the tool input parameter 'projectId'.
    { projectId: z.string().describe("Project identifier (campoleone, testProject, etc.)") },
  • Core implementation of startProjectInstance method in ProjectInstanceManager, called by the tool handler. Handles project config lookup, instance creation, Visum process startup via PersistentVisumController, and stores the active instance.
    public async startProjectInstance(projectId: string): Promise<{ success: boolean; message: string; stats?: any; }> { console.error(`๐Ÿš€ Starting persistent instance for project: ${projectId}`); const config = this.PROJECT_CONFIGS[projectId]; if (!config) { return { success: false, message: `Unknown project ID: ${projectId}. Available: ${Object.keys(this.PROJECT_CONFIGS).join(', ')}` }; } // Verifica se l'istanza รจ giร  attiva if (this.projectInstances.has(projectId)) { const existing = this.projectInstances.get(projectId)!; if (existing.isActive) { return { success: true, message: `Project ${config.name} instance already running`, stats: existing.stats }; } } try { const startTime = Date.now(); // Crea controller personalizzato per questo progetto const controller = new PersistentVisumController(config.projectPath); const result = await controller.startPersistentVisumProcess(); if (result.success) { const projectInstance: ProjectInstance = { config, controller, isActive: true, startTime, lastUsed: Date.now(), stats: { nodes: result.nodes || 0, links: result.links || 0, zones: result.zones || 0 } }; this.projectInstances.set(projectId, projectInstance); console.error(`โœ… Project ${config.name} instance started successfully`); console.error(` ๐Ÿ“Š Network: ${result.nodes} nodes, ${result.links} links, ${result.zones} zones`); console.error(` โฑ๏ธ Startup time: ${Date.now() - startTime}ms`); return { success: true, message: `Persistent instance for ${config.name} started successfully`, stats: projectInstance.stats }; } else { return { success: false, message: `Failed to start ${config.name}: ${result.message}` }; } } catch (error) { return { success: false, message: `Error starting ${config.name}: ${error instanceof Error ? error.message : String(error)}` }; } }
  • Initialization of projectManager singleton instance used by the tool handler.
    const projectManager = ProjectInstanceManager.getInstance(); // Project-specific instances const serverManager = ProjectServerManager.getInstance(); // TCP server manager
  • Import of ProjectInstanceManager class.
    import { ProjectInstanceManager } from "./project-instance-manager.js";

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