Tool labels
A tool call is shown as a short sentence instead of its technical name: Reading knowledge/index.md instead of Read {"file_path": "…"}. The chats, the progress view and the logs use a formatAction(toolName, input) function; by default createFriendlyToolLabel().
The kit's labels
| Tool | Label |
|---|---|
Read, Write, Edit | Reading <file>, Writing to <file>, Editing <file> |
Glob | Searching for files matching "<pattern>" |
Grep | Searching file contents for "<pattern>" |
Bash | Running "<command>" |
Agent | Delegating to "<subagent>": <description> |
WebFetch | Fetching <url> |
WebSearch | Searching the web for "<query>" |
Skill | Applying the "<skill>" skill |
request_human_approval | Asking for human approval: <summary> |
request_manual_login | Waiting for a human to intervene manually |
save_to_sources | Saving a file to sources/<destination> |
Labels follow the kit's language. Long paths keep their end (…/course/knowledge/index.md), long text its start.
Any other tool gets its name with underscores as spaces. An MCP tool from a server that isn't local is prefixed with the server: [inventory] find product.
Labels for your tools
import { createFriendlyToolLabel, truncate, truncatePath } from "@falkenslab/agent-kit";
const formatAction = createFriendlyToolLabel({
// Called with the tool's short name (without "mcp__<server>__") and its input.
describe: (tool, input) => {
switch (tool) {
case "browser_navigate":
return `Opening ${truncate(String(input.url), 70)}`;
case "browser_click":
return `Clicking "${truncate(String(input.element), 50)}"`;
case "save_report":
return `Saving the report to ${truncatePath(String(input.path), 60)}`;
default:
return undefined; // the kit's label, or the tool's name
}
},
// Servers whose tools are yours: no "[server]" prefix.
extraLocalServers: ["playwright", "reports"],
});
await runChatInk(opener, { runsDir, formatAction });
truncate(text, max = 60) cuts the end with …; truncatePath(path, max = 60) cuts the start, keeping the file name.
Folded summaries
With Ctrl+O, a group of consecutive tool calls folds into one line: "Read 2 files, searched the web, ran 1 subagent". The kit has phrases for the built-in tools; any other counts as "used N tools". Give your tools their own with toolPhrase:
import type { ToolPhrase } from "@falkenslab/agent-kit";
const toolPhrase = (tool: string): ToolPhrase | undefined => {
if (tool === "mcp__playwright__browser_navigate") return ["opened {n} page", "opened {n} pages"];
if (tool === "mcp__playwright__browser_click") return ["clicked {n} time", "clicked {n} times"];
return undefined;
};
await runChatInk(opener, { runsDir, toolPhrase });
A ToolPhrase is [one, many], with {n} for the count. Calls with the same phrase are counted together, in the order they first appear, and the line starts with a capital.
Coloring labels
Labels are drawn in the theme's toolLabel role (dimmed by default). An agent can still color inside its own labels (with ui.* or picocolors); see Themes.