Skip to main content

Tool Server Protocol

Tool servers expose a standard HTTP API. Any service that implements this protocol can be used as a tool in the Simulation Lab. See the Tool Server Protocol reference for the full spec.

Multi-Tool Composition

A workspace can include multiple tool servers. The agent sees a unified tool list. Tools are automatically namespaced by their server name (e.g., email-env__send_email, chronos-server__create_event). Routing is handled transparently; the agent calls tools by name and the Simulation Lab forwards each call to the correct server.

Tool Definition Format

Each tool server is defined as a YAML file that maps directly to Docker Compose services. Here is the email tool as an example:
The YAML specifies everything Docker needs: images, ports, health checks, environment variables, and dependency ordering. The CLI reads these definitions and composes them into a working docker-compose.yml. For tools that are hosted externally and don’t need Docker services, use the tool_server_url field instead:

Built-in Toolsets

Below is a selection of out-of-the-box tools that come with Simulation Lab. We are continually adding more domain-specific tools as part of our roadmap.

Bring Your Own Tools

Simulation Lab supports three paths for integrating custom tools: MCP servers, env-local custom tool definitions, and custom CLI tools for coding environments.

Custom MCP Servers

You can add custom MCP servers to any environment so the agent can call them alongside built-in tools. SimLab supports two MCP transport patterns:
  • URL-based — SimLab connects directly to an HTTP MCP endpoint. No extra container is added.
  • Command-based — SimLab adds an mcp-gateway container that starts your stdio MCP servers and exposes them over HTTP inside the environment.

Configuration format

Create a mcp-servers.json file with a top-level mcpServers object. Each server must define exactly one of url or command:
Naming rules:
  • Server names may contain only letters, numbers, _, and -.
  • Names must not collide with built-in tool server names (e.g. email, calendar).

Adding MCP servers to an environment

Pass your config at env init:
After init, SimLab persists the config as environments/<env-name>/mcp-servers.json. For command-based servers, it also generates an mcp-gateway service in docker-compose.yml.

Managing API keys and env vars

For command-based servers, set secrets in environments/<env-name>/.env before running simlab env up. If an env var name is used by only one MCP server, set it directly:
If multiple servers share the same env var name, use the scoped form:
Server names are normalized for scoped env vars by uppercasing and replacing non-alphanumeric characters with _ (e.g. my-docs becomes MY_DOCS).

Env-Local Custom Tool Definitions

For environment-specific tool servers that aren’t part of the built-in catalog, you can scaffold custom tool definitions under the environment’s custom-tools/ directory. These use the same YAML schema as built-in catalog tools.

Scaffold a custom tool

This creates the following layout:
The command also adds harbor-main to the tools list in env.yaml and regenerates the environment’s Docker Compose and related files.

Edit and regenerate

After editing custom-tools/*.yaml, env.yaml, or mcp-servers.json, regenerate the environment:
SimLab will also detect stale generated files when you run simlab env up, simlab tasks run, or simlab tasks seed, and prompt to regenerate in interactive sessions.

Inspect a custom tool

Naming rules

  • Custom tool names must not shadow built-in tool names.
  • Env-local custom tool names must be unique within the environment.
  • MCP server names must not conflict with either built-in or env-local tool names.

Custom CLI Tools (Coding Environments)

For coding environments that need extra CLI tooling installed in the sandbox, you can customize the environment with setup scripts, mounted fixtures, and reusable skills.

Layout

Setup script

The setup script runs inside the coding sandbox at startup. Use it to install any tools your tasks require:

Running with custom CLI tools

Task Generation with Custom Tools

Custom tools (both MCP and env-local) are available for task generation. Provide your tool definitions and the pipeline produces tasks, seed data, and verifiers tailored to your tools:
At runtime, the agent discovers custom tools through the same unified tool list as built-in tools and calls them transparently.