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
| Name | Required | Description | Default |
|---|---|---|---|
| surface | Yes | Target surface ref | |
| title | Yes | New tab title | |
| workspace | No | Target workspace ref | |
| preserve_prefix | No | Only replace the task suffix, keeping launcher prefix |
Implementation Reference
- src/server.ts:398-418 (handler)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); - src/server.ts:385-396 (schema)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"),