Skip to main content
Glama

split_pane

Split an iTerm2 session pane horizontally or vertically, with optional profile and command for the new pane.

Instructions

Split an iTerm2 pane horizontally or vertically.

:param session_id: Session UUID to split. Defaults to the active session. :param vertical: If True, split left/right; if False, split top/bottom. :param profile: Name of the iTerm2 profile to use for the new pane. :param command: Optional command to run in the new pane after the split.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo
verticalNo
profileNo
commandNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The split_pane tool handler function. It resolves a session (defaulting to the active one), calls async_split_pane on it with the vertical and profile parameters, optionally sends a command to the new pane, and returns a success/error message.
    async def split_pane(
        session_id: str | None = None,
        vertical: bool = True,
        profile: str | None = None,
        command: str | None = None,
    ) -> str:
        """Split an iTerm2 pane horizontally or vertically.
    
        :param session_id: Session UUID to split. Defaults to the active session.
        :param vertical: If True, split left/right; if False, split top/bottom.
        :param profile: Name of the iTerm2 profile to use for the new pane.
        :param command: Optional command to run in the new pane after the split.
        """
        sess = await _session(session_id)
        new_sess = await sess.async_split_pane(vertical=vertical, profile=profile)
        if new_sess is None:
            return "Error: failed to split pane."
        if command:
            await new_sess.async_send_text(command + "\n", suppress_broadcast=True)
        return f"Split created session {new_sess.session_id}"
  • The @mcp.tool() decorator that registers split_pane as an MCP tool.
    @mcp.tool()
  • The function signature and docstring serve as the input schema (session_id, vertical, profile, command parameters).
    async def split_pane(
        session_id: str | None = None,
        vertical: bool = True,
        profile: str | None = None,
        command: str | None = None,
    ) -> str:
        """Split an iTerm2 pane horizontally or vertically.
Behavior3/5

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

With no annotations, the description must fully disclose behavior. It states the split direction but lacks details on side effects (e.g., whether the original session remains active) or failure modes. This is adequate but not thorough.

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 a single sentence followed by a parameter list. It is efficient and front-loaded with the core action. The structure is clear and scannable, though the docstring format is slightly verbose.

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?

The tool has no required parameters, and the description covers the default behavior (active session). An output schema exists, so return value documentation is not needed. The description is sufficient for an agent to understand the tool's effect and parameters.

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?

The schema has 0% description coverage, so the description's parameter comments add needed meaning. For example, 'vertical: If True, split left/right; if False, split top/bottom' clarifies the boolean. The description compensates well for the schema gaps.

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 clearly states 'Split an iTerm2 pane horizontally or vertically,' which is a specific verb-resource pair. Among siblings like 'create_tab' and 'close_session,' this tool's purpose is uniquely distinguished as splitting an existing pane.

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?

The description implies usage for splitting a pane, which is a distinct operation from creating tabs or windows. However, it does not explicitly mention when not to use it or provide alternatives, but the context is clear given sibling tool names.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lorencarvalho/iterm2-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server