Skip to main content
Glama

new_split

Create a new split pane for terminal or browser windows to organize parallel AI agent workflows within a terminal multiplexer.

Instructions

Create a new split pane (terminal or browser)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYesSplit direction
workspaceNoTarget workspace ref
surfaceNoTarget surface ref
paneNoTarget pane ref
typeNoSurface typeterminal
urlNoURL for browser surfaces
titleNoTab title
focusNoFocus the new pane

Implementation Reference

  • The handler function for the "new_split" tool in src/server.ts, which calls client.newSplit to perform the actual splitting logic.
    async (args) => {
      try {
        const result = await client.newSplit(args.direction, {
          workspace: args.workspace,
          surface: args.surface,
          pane: args.pane,
          type: args.type,
          url: args.url,
          title: args.title,
          focus: args.focus,
        });
        if (args.title) {
          await client.renameTab(result.surface, args.title, {
            workspace: result.workspace || args.workspace,
          });
          result.title = args.title;
        }
        return ok({ ...result });
      } catch (e) {
        return err(e);
      }
    },
  • src/server.ts:222-244 (registration)
    Registration of the "new_split" tool and its input schema using Zod in src/server.ts.
    server.tool(
      "new_split",
      "Create a new split pane (terminal or browser)",
      {
        direction: z
          .enum(["left", "right", "up", "down"])
          .describe("Split direction"),
        workspace: z.string().optional().describe("Target workspace ref"),
        surface: z.string().optional().describe("Target surface ref"),
        pane: z.string().optional().describe("Target pane ref"),
        type: z
          .enum(["terminal", "browser"])
          .optional()
          .default("terminal")
          .describe("Surface type"),
        url: z.string().optional().describe("URL for browser surfaces"),
        title: z.string().optional().describe("Tab title"),
        focus: z
          .boolean()
          .optional()
          .default(true)
          .describe("Focus the new pane"),
      },

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/EtanHey/cmuxlayer'

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