MCPcopy Create free account
hub / github.com/ShipSecAI/studio / getToolName

Function getToolName

packages/component-sdk/src/tool-helpers.ts:335–343  ·  view source on GitHub ↗
(component: ComponentDefinition)

Source from the content-addressed store, hash-verified

333 * Uses toolProvider.name if specified, otherwise derives from component slug.
334 */
335export 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.

Callers 2

getToolMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected