Skip to main content
Glama

craftos_session_create

Starts a persistent emulated ComputerCraft computer with attached monitors and workspace files, returning after boot with a shell prompt or running program ready to use.

Instructions

Start a persistent emulated computer you can type into, click on and watch. Monitors are attached before the shell starts. Workspace files are at the computer's root. Returns once the computer has booted, with front: "shell" (the prompt is up) or "program" (startup.lua started a program that is in front, so there is no prompt). The computer gets a copy of the workspace (without .git, node_modules, .runtime and what .gitignore ignores); for a big workspace give world.deploy to copy only some folders.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "craftos_session_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
worldNoThe world around the computer (an object). Fields: addons, version, simProgram, craftosPcApis, motd, players, host, interacting, autoApprove, economyAvailable, holdInteraction, vhcctweaks, economyDelayTicks, gearPowerAvailable, identifyAvailable, internalErrors, vhccStore, linkLatency, computerId, kind, advanced, terminal, config, position, cobaltSpeed, label, deploy, peripherals, environment, entities, ap, mekanism, turtle, disks, blocks, fills, ground, items, gameRules, turtleConfig, spawnProtection, worldBorder, loadedChunks, unloadedChunks, nextDiskId, gameData, seed; e.g. {"peripherals":[{"name":"chest_0","type":"minecraft:chest","size":27}],"deploy":[{"from":"src"}]}. world.deploy picks which workspace folders or files go on the computer, and where ([{"from":"src","to":"lib"}]), instead of a copy of the whole workspace. Every field with its options: craftos_help {topic:"world"} (or the craftos://schema/world resource). Checked before boot: a wrong key or peripheral type comes back as an error with a suggestion.
monitorsNo
liveFilesNoGive the computer the workspace folder itself instead of a copy: what the program writes lands in the workspace, and files you change there are seen at once. Only when the person asks for it; default a copy.
timeScaleNoVirtual clock speed. 10 makes sleep(), os.clock() and os.epoch() run 10x faster than real time, so slow scripts finish quickly. timeoutMs stays in real time.
worldFileNoA saved world: a name in the worlds folder (e.g. "advanced-peripherals-demo") or a workspace path to a .json file (e.g. "door.world.json"). Fields in `world` override it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing that the call blocks until boot completes, what the returned 'front' value means, exactly what is excluded from the workspace copy, and that world keys are validated before boot with suggestions on error. The annotations only cover openWorldHint/destructiveHint, so this is the main behavioral source, and it mostly delivers.

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?

Purpose and the key constraint (monitors attach before the shell, call returns after boot) are front-loaded. Sentences are dense but each carries information; only the parenthetical exclusion list and the long world field enumeration edge toward bloat.

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

Completeness5/5

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

For a five-parameter tool with a nested open-ended world object and no output schema, this covers the return state, the copy-vs-live tradeoff, the saved-world override path, and points to craftos_help {topic:"world"} plus the craftos://schema/world resource for the full field list. An agent can call it correctly without further discovery.

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 coverage is already 80% and the nested world/monitors objects are heavily documented in the schema; the description's additions (world.deploy selects folders instead of copying everything, worldFile fields are overridden by world, liveFiles writes through to the workspace) are useful but largely restate or lightly extend the schema hints. Baseline 3 with schema doing 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?

Names a specific verb and resource ('Start a persistent emulated computer') and adds concrete scope: monitors attach before the shell starts and workspace files land at the computer's root. It does not, however, distinguish itself from siblings such as craftos_network_create or explain the session lifecycle relative to craftos_session_destroy.

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?

Usage guidance is implied rather than stated: you create a session to get a computer you can drive. The conditional advice that exists is parameter-level ('for a big workspace give world.deploy', 'liveFiles: Only when the person asks for it'), not tool-level; nothing says when to prefer this over craftos_network_create or that a destroy step is needed.

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