Tool Name
{#if errors.name}
{errors.name}
{/if}
Description
{#if errors.description}
{errors.description}
{/if}
Parameters
+ Add Parameter
{#if parameters.length > 0}
{#each parameters as param, index (index)}
{#if errors[`param_${index}`]}
{errors[`param_${index}`]}
{/if}
{/each}
{:else}
No parameters defined. Click "Add Parameter" to define inputs.
{/if}
{#if implementation === 'javascript' || implementation === 'python'}
{implementation === 'javascript' ? 'JavaScript' : 'Python'} Code
showTemplates = !showTemplates}
class="flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300"
>
Templates
{#if showTemplates && currentTemplates.length > 0}
{#each currentTemplates as template (template.id)}
applyTemplate(template)}
class="w-full text-left px-3 py-2 rounded hover:bg-theme-tertiary"
>
{template.name}
{template.description}
{/each}
{/if}
showDocs = !showDocs}
class="flex items-center gap-1 text-xs {showDocs ? 'text-emerald-400' : 'text-theme-muted hover:text-theme-secondary'}"
>
Docs
{#if implementation === 'javascript'}
Arguments are passed as an args object. Return the result.
{:else}
Arguments are available as args dict. Print JSON result to stdout.
{/if}
showDocs = false}
/>
{#if errors.code}
{errors.code}
{/if}
showTest = !showTest}
class="mt-3 flex items-center gap-2 text-sm {showTest ? 'text-emerald-400' : 'text-theme-muted hover:text-theme-secondary'}"
>
{showTest ? 'Hide Test Panel' : 'Test Tool'}
showTest = false}
/>
{/if}
{#if implementation === 'http'}
Endpoint URL
{#if errors.endpoint}
{errors.endpoint}
{/if}
{/if}
Enable tool
enabled = !enabled}
class="relative inline-flex h-6 w-11 cursor-pointer rounded-full transition-colors {enabled ? 'bg-blue-600' : 'bg-theme-tertiary'}"
role="switch"
aria-checked={enabled}
>