Skip to main content
Glama

devcontainer_up

Start or initialize a devcontainer environment in a specified workspace folder to ready it for development tasks.

Instructions

Start or initialize a devcontainer environment in the specified workspace folder.Use this to ensure the devcontainer is running and ready for development tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceFolderYes
outputFilePathNo

Implementation Reference

  • The core handler function for the 'devcontainer_up' tool. It spawns a devcontainer CLI process with the 'up' command and the provided workspace folder.
    export async function up(options: DevContainerUpOptions): Promise<number> {
      return runCommand(
        ['up', '--workspace-folder', options.workspaceFolder],
        createStdoutStream(options)
      );
    }
  • TypeScript interface defining the options schema for the up function, including the required workspaceFolder field.
    interface DevContainerUpOptions extends DevcontainerOptions {
      workspaceFolder: string;
    }
  • src/server.ts:10-30 (registration)
    Registration of the 'devcontainer_up' tool on the MCP server using server.tool(), defining Zod schema for input and delegating to the handler.
    server.tool(
      "devcontainer_up",
      "Start or initialize a devcontainer environment in the specified workspace folder." + 
      "Use this to ensure the devcontainer is running and ready for development tasks.",
      {
        workspaceFolder: z.string(),
        outputFilePath: z.string().optional(),
      },
      async ({ workspaceFolder, outputFilePath }) => {
        await devcontainers.up({ workspaceFolder, stdioFilePath: outputFilePath });
    
        return {
          content: [
            {
              type: "text",
              text: `Devcontainer started in ${workspaceFolder}`,
            }
          ]
        }
      }
    );
  • Helper function that spawns the devcontainer CLI process and pipes output, used by the up handler.
    async function runCommand(args: string[], stdout: fs.WriteStream): Promise<number> {
      return new Promise((resolve, reject) => {
        const proc = spawn('node', [devcontainerBinaryPath(), ...args], {
          stdio: ['ignore', 'pipe', 'inherit'],
        });
    
        proc.stdout.pipe(stdout);
    
        proc.on('close', (code) => {
          stdout.end();
    
          if (code === 0) {
            resolve(code);
          } else {
            reject(new Error(`devcontainer command ${args.join(' ')} exited with code ${code}`));
          }
        });
      });
    }
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It mentions 'start or initialize' but does not detail side effects (e.g., what happens if already running, permissions needed, or potential failures). This leaves significant behavioral ambiguity.

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?

The description is concise with two sentences, focusing on purpose and usage. No extraneous information, though it could be slightly more structured (e.g., separate sentences for each aspect).

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?

Given no annotations, no output schema, and two parameters, the description lacks critical context: what a devcontainer environment is, what 'ready for development' means, error handling, or post-condition state. For a setup tool, more completeness is needed.

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?

The description adds meaning to the workspaceFolder parameter by mentioning 'specified workspace folder', but outputFilePath is entirely ignored. With 0% schema coverage and 2 parameters, the description fails to compensate for the lack of schema descriptions, particularly for the optional parameter.

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 tool starts or initializes a devcontainer environment in a workspace folder, using verbs 'start or initialize' and specifying the resource. It distinguishes from siblings (exec, run_user_commands) by implying it's the setup tool, though not explicitly.

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?

It advises using the tool to ensure the devcontainer is running and ready for development tasks, providing context for when to use it (before other tasks). However, it does not explicitly state when not to use it or compare with alternatives like devcontainer_exec.

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/crunchloop/mcp-devcontainers'

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