(component: ComponentDefinition)
| 333 | * Uses toolProvider.name if specified, otherwise derives from component slug. |
| 334 | */ |
| 335 | export function getToolName(component: ComponentDefinition): string { |
| 336 | if (component.toolProvider?.name) { |
| 337 | return component.toolProvider.name; |
| 338 | } |
| 339 | |
| 340 | // Derive from slug: 'abuseipdb-check' → 'abuseipdb_check' |
| 341 | const slug = component.ui?.slug ?? component.id; |
| 342 | return slug.replace(/-/g, '_').replace(/\./g, '_'); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Get the tool description for a component. |
no outgoing calls
no test coverage detected