MCPcopy Create free account
hub / github.com/bytebase/dbhub / buildCustomTool

Function buildCustomTool

src/utils/tool-metadata.ts:289–298  ·  view source on GitHub ↗

* Build custom tool metadata for API response

(toolConfig: ToolConfig)

Source from the content-addressed store, hash-verified

287 * Build custom tool metadata for API response
288 */
289function buildCustomTool(toolConfig: ToolConfig): Tool {
290 return {
291 name: toolConfig.name,
292 description: toolConfig.description!,
293 parameters: customParamsToToolParams(toolConfig.parameters),
294 statement: toolConfig.statement,
295 readonly: toolConfig.readonly,
296 max_rows: toolConfig.max_rows,
297 };
298}
299
300/**
301 * Get tools for a specific source (API response format)

Callers 1

getToolsForSourceFunction · 0.85

Calls 1

customParamsToToolParamsFunction · 0.85

Tested by

no test coverage detected