Skip to main content
Glama

code_start

Destructive

Start background JavaScript in QuickJS for asynchronous code execution; supply cwd for a new session or sessionId to continue an existing one.

Instructions

Start background JavaScript in QuickJS. cwd is the absolute project directory, passed as this tool's cwd argument: required for a new session (do not define cwd inside the code); omit it only when sessionId continues an existing session. Supported modes: autoApprove (default, no classifier or human prompts), rules, auto and bypassPermissions. Node.js globals/imports are unavailable. All OS/MCP operations use checked helpers; Docker additionally isolates file/shell operations. Without Docker, permitted shell programs have the host account's OS permissions. Use code_status to inspect progress. Output hooks may withhold output until completion. Completed results and explicit JSON state persist; running jobs do not resume after restart.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "code_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
codeYes
sessionIdNo
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.1/5.0
Behavior5/5

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

Despite annotations already flagging destructive/openWorld/non-idempotent, the description adds substantive behavior: no Node globals or imports, checked OS/MCP helpers, Docker isolation vs. host-account permissions without it, output hooks that may withhold output, completed results persisting while running jobs do not resume after restart, and mode semantics including autoApprove's no-prompt default.

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?

Front-loaded with purpose, then the cwd rule, then environment constraints and lifecycle notes. Dense but nearly every clause carries operational meaning; the dangling modes sentence is the one piece that does not map to anything callable.

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

Completeness4/5

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

For a background-execution tool with no output schema, the description covers permissions, isolation, output delivery, status checking, and persistence across restarts. The remaining gaps are the undocumented timeoutMs and the referenced-but-absent mode parameter.

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?

With 0% schema coverage the description must carry parameter meaning, and it does well for cwd and sessionId, but timeoutMs (defaulting to two hours) is never mentioned. It also enumerates execution "modes" (autoApprove, rules, auto, bypassPermissions) that do not appear as any parameter in the schema, which can mislead an agent about what it can actually pass.

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?

States a specific verb and resource: "Start background JavaScript in QuickJS." The word "background" plus the session/persistence notes distinguishes it from a plain synchronous execute, but the description never explicitly contrasts itself with the sibling code_execute, so the agent must infer the boundary.

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

Usage Guidelines4/5

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

Gives clear conditional guidance for the cwd argument (required for a new session, omit only when sessionId continues one) and directs the agent to code_status for progress. It stops short of naming when to choose this over code_execute or code_session_resume, so the run-vs-start decision is left implicit.

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