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";
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'dedicated persistent instance', hinting at resource allocation and state persistence, but lacks details on permissions, side effects, error conditions, or what 'start' entails operationally (e.g., initialization time, costs). This is inadequate for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It front-loads the core action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that likely mutates state (starting an instance) with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after starting (e.g., instance state, return values, or errors), leaving critical gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'projectId' well-documented in the schema. The description adds no additional parameter context beyond implying it's for a 'specific Visum project', which aligns with the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Start') and the resource ('dedicated persistent instance for specific Visum project'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'visum_launch_project' or 'project_open', which might have overlapping functionality in a Visum context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools like 'project_open', 'visum_launch_project', and 'project_shutdown_instance', there's no indication of prerequisites, timing, or distinctions, leaving usage ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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