toolTitle function

String toolTitle(
  1. String name
)

The name a tool call is shown under, like Read or Bash.

Implementation

String toolTitle(String name) {
  return switch (name) {
    'read' => 'Read',
    'write' => 'Write',
    'edit' => 'Update',
    'glob' || 'grep' => 'Search',
    'bash' => 'Bash',
    'powershell' => 'PowerShell',
    'sleep' => 'Wait',
    'ask_user_question' => 'AskUserQuestion',
    'task_create' || 'task_update' || 'task_list' => 'Update Todos',
    'list_mcp_resources' => 'ListMcpResources',
    'read_mcp_resource' => 'ReadMcpResource',
    _ => name,
  };
}