Skip to main content
Glama

Open tab(s)

open_tab

Attach one or more new tabs with fresh shells to an existing window, or merge panes into an existing tab. Returns the new tab or pane ids for programmatic workspace setup.

Instructions

Attach one or more new tabs to an existing window (defaults to the first window), each with fresh shells — the programmatic equivalent of hyperpanes --attach. Returns the new tab ids. Use this (not open_pane) to add a whole tab, or several tabs, in one call. Pass as:"panes" to instead merge ALL the given panes into one existing tab (returns the new pane ids): tabId if given, else the calling pane's own tab when no windowId is given either, else the window's ACTIVE tab. With no windowId, new tabs open in the calling pane's window. Each group is one tab: { title?, color?, layout?, panes:[{ command?, args?, label?, cwd?, shell?, color?, meta? }] }. A group color ("#rrggbb"/"#rgb") is the new tab's manual colour, the same one recolor_tab sets (it overrides a pane-group colour); a pane color is that pane's frame colour.

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": {
      "groups": "<groups>"
    },
    "name": "open_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
asNo
tabIdNowith as:"panes": merge the panes into this existing tab (a tabId from list_panes) instead of the active one. Needs a hyperpanes app with attach `tabId` support; an older app merges them into the active tab
groupsYes
windowIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.25
    • addedInput schema / properties / tabId
      Added value: +{
      +  "description": "with as:\"panes\": merge the panes into this existing tab (a tabId from list_panes) instead of the active one. Needs a hyperpanes app with attach `tabId` support; an older app merges them into the active tab",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.1.20
    • addedInput schema / properties / groups / items / properties / color
      Added value: +{
      +  "anyOf": [
      +    {
      +      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  3. First observedv0.1.13

TDQS

A4.7/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses what is created (fresh shells), which window is targeted by default and why, what is returned (new tab ids, or new pane ids in panes mode), and the fallback chain when tabId/windowId are omitted. It also defines colour precedence — a group colour is the tab's manual colour, the same one recolor_tab sets, and it overrides a pane-group colour — which is non-obvious mutation behaviour an agent could otherwise get wrong.

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 the primary action and the sibling exclusion, and almost every clause adds new information. However, the middle section is a dense run-on that nests the panes-mode conditional, two defaulting rules, and the group shape, making it easy to mis-parse; splitting the panes-mode branch into its own sentence would improve it.

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 4-parameter creation tool with no output schema and no annotations, the description supplies purpose, defaults, return values, sibling differentiation, and colour semantics. The remaining gap is the cluster of layout-related fields (sizes, focused, zoomed, mainFraction) that appear in the schema but are never explained, so an agent could not confidently use the layout controls from this text alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 25%, the description does substantial compensating work: it defines `as` modes, `tabId` targeting semantics, `windowId` defaulting, the one-group-per-tab rule, and the meaning of both `color` levels plus the group's inner pane fields (command, args, label, cwd, shell, color, meta). It omits the remaining structural fields present in the schema (sizes, focused, zoomed, mainFraction, fontSize, subtitle) and does not characterise the `layout` enum values, so it does not fully close the coverage gap.

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?

States a specific verb and resource ("Attach one or more new tabs to an existing window") plus the concrete effect (fresh shells) and the return value (new tab ids). It also explicitly names the sibling it is not — "Use this (not open_pane) to add a whole tab" — so an agent can separate the two without reading either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule against an alternative (whole tab vs. single pane), and adds a second, clearly scoped mode: "Pass `as:`panes`` to instead merge ALL the given panes into one existing tab." The default resolution order for the target window/tab is spelled out (windowId → calling pane's window; tabId → calling pane's own tab → active tab), leaving nothing to inference.

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