{$i18n.t('Available Tools')}
{#if selectedTools.length > 0} {#if selectedToolServers.length > 0}
{$i18n.t('Tools')}
{/if}
{#each selectedTools as tool (tool.id)} {@const isMcp = tool.id.startsWith('server:mcp:')} {@const state = discovery[tool.id]} {@const needsAuth = tool.authenticated === false || state?.error === 'auth'} {@const status = authStatus(needsAuth ? { ...tool, authenticated: false } : tool)} {@const toolSpecs = needsAuth ? undefined : isMcp ? state?.specs : tool.specs} { if (open && isMcp && !needsAuth && !state) loadSpecs(tool); }} >
{resolveLocalizedResource(tool, $i18n.language)}
{#if status} {/if} {#if needsAuth} {$i18n.t('Auth required')} {:else if toolSpecs !== undefined} {toolSpecs.length === 1 ? $i18n.t('1 tool') : $i18n.t('{{COUNT}} tools', { COUNT: toolSpecs.length })} {/if}
{#if resolveLocalizedResource(tool, $i18n.language, 'description')}
{resolveLocalizedResource(tool, $i18n.language, 'description')}
{/if}
{#if needsAuth} {:else if state?.loading}

{$i18n.t('Loading tools...')}

{:else if state?.error}
{$i18n.t('Unable to load tools')}
{:else if toolSpecs?.length > 0}
{#each toolSpecs as toolSpec}
{toolSpec?.name ?? toolSpec?.function?.name}
{#if toolSpec?.description ?? toolSpec?.function?.description}
{toolSpec?.description ?? toolSpec?.function?.description}
{/if}
{/each}
{:else}

{$i18n.t('No tools found')}

{/if}
{/each}
{/if} {#if selectedToolServers.length > 0}
{$i18n.t('Tool Servers')}
{$i18n.t('Open WebUI can use tools provided by any OpenAPI server.')}
{$i18n.t('Learn more about OpenAPI tool servers.')}
{#each selectedToolServers as toolServer}
{toolServer?.openapi?.info?.title} - v{toolServer?.openapi?.info?.version}
{toolServer?.openapi?.info?.description}
{toolServer?.url}
{#each toolServer?.specs ?? [] as tool_spec}
{tool_spec?.name}
{tool_spec?.description}
{/each}
{/each}
{/if}