(component: ComponentDefinition)
| 347 | * Uses toolProvider.description if specified, otherwise uses component docs/description. |
| 348 | */ |
| 349 | export function getToolDescription(component: ComponentDefinition): string { |
| 350 | if (component.toolProvider?.description) { |
| 351 | return component.toolProvider.description; |
| 352 | } |
| 353 | |
| 354 | return component.ui?.description ?? component.docs ?? component.label; |
| 355 | } |
| 356 | |
| 357 | /** |
| 358 | * Get complete tool metadata for MCP tools/list response. |