Skip to main content
Glama

rename_tab

Change tab titles in terminal multiplexer workspaces to organize agent sessions and improve workflow clarity.

Instructions

Rename a surface tab

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
surfaceYesTarget surface ref
titleYesNew tab title
workspaceNoTarget workspace ref
preserve_prefixNoOnly replace the task suffix, keeping launcher prefix

Implementation Reference

  • The handler function for the 'rename_tab' tool in src/server.ts. It processes the arguments, performs title transformation if needed, and calls client.renameTab.
    async (args) => {
      try {
        let finalTitle = args.title;
        if (args.preserve_prefix) {
          const surfaces = await client.listPaneSurfaces({
            workspace: args.workspace,
          });
          const surface = surfaces.surfaces.find((s) => s.ref === args.surface);
          const currentTitle = surface?.title ?? "";
          finalTitle = replaceTaskSuffix(currentTitle, args.title);
        }
        await client.renameTab(args.surface, finalTitle, {
          workspace: args.workspace,
        });
        return ok({
          surface: args.surface,
          title: finalTitle,
          applied: "rename_tab",
        });
      } catch (e) {
        return err(e);
  • Registration and schema definition for the 'rename_tab' tool.
    server.tool(
      "rename_tab",
      "Rename a surface tab",
      {
        surface: z.string().describe("Target surface ref"),
        title: z.string().describe("New tab title"),
        workspace: z.string().optional().describe("Target workspace ref"),
        preserve_prefix: z
          .boolean()
          .optional()
          .default(false)
          .describe("Only replace the task suffix, keeping launcher prefix"),

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