diff options
| author | moon jooho <[email protected]> | 2025-07-04 09:13:02 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-04 00:13:02 +0000 |
| commit | 8d3fec08e59b100da036b685d20b080203ba3a4c (patch) | |
| tree | fdfb31c69d8cf15a536e650fb0fdd148d14051ae /packages/core/src/tools/mcp-client.ts | |
| parent | 654f8aeb614c3e5129f33d93aa9cfa06d347e3a0 (diff) | |
Add and improve JSDoc comments for core tool methods (#3128)
Diffstat (limited to 'packages/core/src/tools/mcp-client.ts')
| -rw-r--r-- | packages/core/src/tools/mcp-client.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/core/src/tools/mcp-client.ts b/packages/core/src/tools/mcp-client.ts index 52196b80..359ce30a 100644 --- a/packages/core/src/tools/mcp-client.ts +++ b/packages/core/src/tools/mcp-client.ts @@ -162,6 +162,16 @@ export async function discoverMcpTools( } } +/** + * Connects to an MCP server and discovers available tools, registering them with the tool registry. + * This function handles the complete lifecycle of connecting to a server, discovering tools, + * and cleaning up resources if no tools are found. + * + * @param mcpServerName The name identifier for this MCP server + * @param mcpServerConfig Configuration object containing connection details + * @param toolRegistry The registry to register discovered tools with + * @returns Promise that resolves when discovery is complete + */ async function connectAndDiscover( mcpServerName: string, mcpServerConfig: MCPServerConfig, @@ -375,6 +385,13 @@ async function connectAndDiscover( } } +/** + * Sanitizes a JSON schema object to ensure compatibility with Vertex AI. + * This function recursively processes the schema to remove problematic properties + * that can cause issues with the Gemini API. + * + * @param schema The JSON schema object to sanitize (modified in-place) + */ export function sanitizeParameters(schema?: Schema) { if (!schema) { return; |
