{#if groups.length === 0}
No tools available
{:else}
{#each groups as group (group.label)} {@const isExpanded = expandedGroups.has(group.label)}
toggleExpanded(group.label)}>
{#if isExpanded}
{:else}
{/if} {@const faviconUrl = group.serverId ? mcpStore.getServerFavicon(group.serverId) : null}
{group.tools.length} tool{group.tools.length !== 1 ? 's' : ''}
Tool
Enabled
Always allow
{#each group.tools as tool (tool.function.name)} {@const toolName = tool.function.name} {@const isEnabled = toolsStore.isToolEnabled(toolName)} {@const permissionKey = toolsStore.getPermissionKey(toolName)} {@const isAlwaysAllowed = permissionKey ? permissionsStore.hasTool(permissionKey) : false}
toolsStore.toggleTool(toolName)} class="h-4 w-4" />
{ if (isAlwaysAllowed) { permissionsStore.revokeTool(permissionKey!); } else { permissionsStore.allowTool(permissionKey!); } }} class="h-4 w-4" />
{/each}
{/each}
{/if}