toolRegistryService
Workspace API / services/toolRegistryService
services/toolRegistryService
Interfaces
ToolDefinition
Defined in: services/toolRegistryService.ts:19
Properties
tool_id
tool_id:
string
Defined in: services/toolRegistryService.ts:20
organization_id
organization_id:
string|null
Defined in: services/toolRegistryService.ts:21
name
name:
string
Defined in: services/toolRegistryService.ts:22
provider
provider:
ToolProvider
Defined in: services/toolRegistryService.ts:23
version
version:
string
Defined in: services/toolRegistryService.ts:24
description
description:
string
Defined in: services/toolRegistryService.ts:25
input_schema
input_schema:
JSONSchema
Defined in: services/toolRegistryService.ts:26
output_schema?
optionaloutput_schema:JSONSchema
Defined in: services/toolRegistryService.ts:27
mcp_server_uri?
optionalmcp_server_uri:string
Defined in: services/toolRegistryService.ts:28
is_enabled
is_enabled:
boolean
Defined in: services/toolRegistryService.ts:29
is_system
is_system:
boolean
Defined in: services/toolRegistryService.ts:30
created_at
created_at:
string
Defined in: services/toolRegistryService.ts:31
updated_at
updated_at:
string
Defined in: services/toolRegistryService.ts:32
ToolRegistration
Defined in: services/toolRegistryService.ts:35
Properties
name
name:
string
Defined in: services/toolRegistryService.ts:36
provider
provider:
ToolProvider
Defined in: services/toolRegistryService.ts:37
version
version:
string
Defined in: services/toolRegistryService.ts:38
description
description:
string
Defined in: services/toolRegistryService.ts:39
input_schema
input_schema:
JSONSchema
Defined in: services/toolRegistryService.ts:40
output_schema?
optionaloutput_schema:JSONSchema
Defined in: services/toolRegistryService.ts:41
mcp_server_uri?
optionalmcp_server_uri:string
Defined in: services/toolRegistryService.ts:42
MCPCapability
Defined in: services/toolRegistryService.ts:502
MCP (Model Context Protocol) capability definition
Properties
name
name:
string
Defined in: services/toolRegistryService.ts:503
description
description:
string
Defined in: services/toolRegistryService.ts:504
inputSchema
inputSchema:
JSONSchema
Defined in: services/toolRegistryService.ts:505
outputSchema?
optionaloutputSchema:JSONSchema
Defined in: services/toolRegistryService.ts:506
Type Aliases
ToolProvider
ToolProvider =
"native"|"mcp"
Defined in: services/toolRegistryService.ts:17
NativeToolName
NativeToolName = keyof typeof
NATIVE_TOOLS_REGISTRY
Defined in: services/toolRegistryService.ts:204
Variables
NATIVE_TOOLS_REGISTRY
constNATIVE_TOOLS_REGISTRY:Record<string,ToolRegistration>
Defined in: services/toolRegistryService.ts:52
Built-in native tools available to all organizations
Functions
isNativeToolName()
isNativeToolName(
toolName):toolName is string
Defined in: services/toolRegistryService.ts:206
Parameters
toolName
string
Returns
toolName is string
isToolExecutionAllowed()
isToolExecutionAllowed(
toolName):boolean
Defined in: services/toolRegistryService.ts:210
Parameters
toolName
string
Returns
boolean
getAvailableTools()
getAvailableTools(
userId,organizationId):Promise<ToolDefinition[]>
Defined in: services/toolRegistryService.ts:228
Get all available tools for an organization
Parameters
userId
string
organizationId
string
Returns
Promise<ToolDefinition[]>
getToolByName()
getToolByName(
userId,organizationId,toolName):Promise<ToolDefinition|null>
Defined in: services/toolRegistryService.ts:331
Get a specific tool by name
Parameters
userId
string
organizationId
string
toolName
string
Returns
Promise<ToolDefinition | null>
isToolAllowed()
isToolAllowed(
toolName,allowedTools):boolean
Defined in: services/toolRegistryService.ts:382
Check if a tool is allowed for a skill
Parameters
toolName
string
allowedTools
string[]
Returns
boolean
registerMCPTool()
registerMCPTool(
organizationId,userId,registration):Promise<ToolDefinition>
Defined in: services/toolRegistryService.ts:398
Register an MCP tool
Parameters
organizationId
string
userId
string
registration
name
string
mcpServerUri
string
description
string
inputSchema
outputSchema?
Returns
Promise<ToolDefinition>
disableTool()
disableTool(
userId,organizationId,toolId):Promise<void>
Defined in: services/toolRegistryService.ts:462
Disable a tool
Parameters
userId
string
organizationId
string
toolId
string
Returns
Promise<void>
enableTool()
enableTool(
userId,organizationId,toolId):Promise<void>
Defined in: services/toolRegistryService.ts:480
Enable a tool
Parameters
userId
string
organizationId
string
toolId
string
Returns
Promise<void>
snapshotMCPCapabilities()
snapshotMCPCapabilities(
mcpServerUri):Promise<MCPCapability[]>
Defined in: services/toolRegistryService.ts:513
Snapshot capabilities from an MCP server This would connect to the MCP server and fetch its tool definitions
Parameters
mcpServerUri
string
Returns
Promise<MCPCapability[]>
importMCPCapabilities()
importMCPCapabilities(
organizationId,userId,mcpServerUri,capabilities):Promise<ToolDefinition[]>
Defined in: services/toolRegistryService.ts:539
Import MCP capabilities into the tool registry
Parameters
organizationId
string
userId
string
mcpServerUri
string
capabilities
Returns
Promise<ToolDefinition[]>