Skip to main content
Glama

Fork a briq or a whole stack

briq_fork

Branch before you try something you might want to undo: a migration, a destructive test, a second approach next to the first. Pass briq to fork one briq, or stack to fork every briq of a stack into a new stack (names kept, so the forked app talks to the forked database). Each fork starts from a copy of its source's disk as it is now, keeps the same credentials, and gets its own address; the source keeps running and never sees what the fork does. Processes in a fork start fresh on the copied disk, like after a power cut (a database replays its log); memory is not copied. A briq without a volume gets its config and boot files; what it wrote to its own disk stays with the source. Returns outputs pointing at the fork. Keep the fork, or briq_destroy it to throw the attempt away.

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": "briq_fork"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdNoSingle raw-image fork with a copied volume: replace CMD (string or argv); keeps the image ENTRYPOINT
briqNobriq id (bq_…) to fork
intoNoStack fork only: name of the new stack (default "<stack>-fork")
nameNoSingle fork only: name of the fork (default "<name>-fork")
waitNoWait until the forks are ready (default true)
sleepNoWhen it goes to sleep: after this long without use, as a string: "30m", "3h", "7d", or "never" (always on, Pro plan and above). Never a number. Use means your calls on it (exec, files, logs, expose), on any briq of its stack, and visits to its stack's URLs. A sleeping briq keeps its disk, costs nothing, and the next call or visit wakes it. A command started with briq_exec async is use while it runs. Other work briq cannot see (a worker, a bot that only makes outgoing connections) needs a window longer than that work, or "never". Default: the source's. A window longer than your key allows is refused: send a shorter one.
stackNoWith `briq`: the stack to create the fork in (default: the same). Without: the stack to fork whole.
exposeNoStack fork only: reach the fork from outside briq (a laptop, a sandbox). Database ports get TLS endpoints, front doors a URL in this mode; outputs use them. Leave it out when only briqs of the stack use the fork.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cmd
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Single raw-image fork with a copied volume: replace CMD (string or argv); keeps the image ENTRYPOINT"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the fork copies the source disk as it is now, keeps credentials, gets its own address, and leaves the source running and isolated. It also explains that memory is not copied, processes start fresh like after a power cut, and volume-less briqs retain config and boot files but not their own disk writes. These details are substantive and consistent with `destructiveHint=false`.

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 front-loaded with the reason to fork and the mode selection, then proceeds into disk, credential, process, and cleanup behavior. It is dense but well structured; the narrative is slightly long, yet every paragraph contributes relevant information.

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 an eight-parameter fork tool with no output schema, it covers the important behavioral surface: disk snapshot, credentials, source isolation, process freshness, volume-less behavior, and cleanup. It does not spell out the output shape or details of `wait` and `expose`, but the input schema fully covers those parameters.

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 description coverage is 100%, so the schema already documents the parameters in detail. The description adds useful mode-level meaning by explaining that `briq` forks one briq while `stack` forks every briq in a stack, but it leaves the specific semantics of `cmd`, `wait`, `sleep`, and `expose` to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: fork either one briq via `briq` or an entire stack via `stack` into a new stack. It clearly distinguishes the two modes and explains what the result is, so an agent can tell what the tool does without opening the schema.

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?

It gives concrete when-to-use scenarios such as migrations, destructive tests, and trying a second approach, and points to `briq_destroy` for discarding the fork. It does not explicitly state when not to fork or name an alternative such as `briq_run`, but the usage context is otherwise clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.