Skip to main content
Glama

upgrade_contam_project

Convert older CONTAM project files to newer formats using the prjup utility, maintaining compatibility for airflow and contaminant transport simulations.

Instructions

Use this when you need to upgrade an older .prj file to a newer CONTAM project format using prjup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYes
targetVersionNo
createBackupNo
timeoutSecondsNo

Implementation Reference

  • The tool "upgrade_contam_project" is registered and implemented in contam-mcp/src/server.js using the 'prjup' executable to upgrade CONTAM project files.
      "upgrade_contam_project",
      "Use this when you need to upgrade an older .prj file to a newer CONTAM project format using prjup.",
      {
        projectPath: z.string(),
        targetVersion: z.string().optional(),
        createBackup: z.boolean().optional(),
        timeoutSeconds: z.number().int().min(1).max(600).optional()
      },
      async ({ projectPath, targetVersion, createBackup, timeoutSeconds }) => {
        const executablePath = await resolveExecutable("prjup");
        const resolvedProjectPath = asAbsolutePath(projectPath);
    
        if (!(await fileExists(resolvedProjectPath))) {
          throw new Error(`Project file not found: ${resolvedProjectPath}`);
        }
    
        const projectDirectory = path.dirname(resolvedProjectPath);
        const before = await snapshotDirectory(projectDirectory);
        const args = [resolvedProjectPath];
    
        if (createBackup === false) {
          args.push("-n");
        }
        if (targetVersion) {
          args.push(`--projectversion=${targetVersion}`);
        }
    
        const result = await runProcess(executablePath, args, {
          cwd: projectDirectory,
          timeoutSeconds: timeoutSeconds ?? 60
        });
        const after = await snapshotDirectory(projectDirectory);
    
        return toolResponse(
          result.ok ? "prjup completed successfully." : "prjup finished with errors or a non-zero exit code.",
          {
            executablePath,
            projectPath: resolvedProjectPath,
            args,
            ...result,
            fileChanges: diffSnapshots(before, after)
          }
        );
      }
    );
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 the external tool 'prjup' but fails to disclose critical mutation behaviors: whether the upgrade is destructive, what happens if the process fails, whether the original file is preserved or overwritten, or the significance of the createBackup parameter.

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

Conciseness4/5

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

Single sentence structure with no redundant information. The 'Use this when...' construction is slightly more verbose than imperative mood ('Upgrade...'), but remains efficient and front-loaded with the trigger condition.

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 file-mutation tool with four undocumented parameters and no output schema, the description is insufficient. It omits error handling, return value description, and behavioral details for half the parameters, leaving significant operational gaps.

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

Parameters2/5

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

With 0% schema description coverage, the description inadequately compensates. It implicitly maps 'older .prj file' to projectPath and 'newer format' to targetVersion, but provides no semantic guidance for createBackup (despite its behavioral importance) or timeoutSeconds.

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 identifies the action (upgrade), resource (older .prj file), target state (newer CONTAM project format), and mechanism (prjup). It effectively distinguishes from sibling 'update_contam_project_references' through the specific terminology of 'upgrade' and 'format' versus 'update' and 'references'.

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

Usage Guidelines3/5

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

Provides explicit when-to-use guidance ('Use this when you need to upgrade...'), but lacks when-not-to-use guidance, prerequisites (e.g., file permissions), or explicit references to alternatives like update_contam_project_references for different use cases.

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/summer521521/contam_MCP'

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