@probelabs/probe 0.6.0-rc268 → 0.6.0-rc269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1879,7 +1879,15 @@ export class ProbeAgent {
1879
1879
  if (this.mcpBridge && !options._disableTools) {
1880
1880
  const mcpTools = this.mcpBridge.getVercelTools(this._filterMcpTools(this.mcpBridge.getToolNames()));
1881
1881
  for (const [name, mcpTool] of Object.entries(mcpTools)) {
1882
- nativeTools[name] = mcpTool;
1882
+ // MCP tools have raw JSON Schema inputSchema that must be wrapped with jsonSchema()
1883
+ // for the Vercel AI SDK. Without wrapping, asSchema() misidentifies them as Zod schemas.
1884
+ const mcpSchema = mcpTool.inputSchema || mcpTool.parameters;
1885
+ const wrappedSchema = mcpSchema && mcpSchema._def ? mcpSchema : jsonSchema(mcpSchema || { type: 'object', properties: {} });
1886
+ nativeTools[name] = tool({
1887
+ description: mcpTool.description || `MCP tool: ${name}`,
1888
+ inputSchema: wrappedSchema,
1889
+ execute: mcpTool.execute,
1890
+ });
1883
1891
  }
1884
1892
  }
1885
1893
 
@@ -83190,7 +83190,13 @@ var init_ProbeAgent = __esm({
83190
83190
  if (this.mcpBridge && !options._disableTools) {
83191
83191
  const mcpTools = this.mcpBridge.getVercelTools(this._filterMcpTools(this.mcpBridge.getToolNames()));
83192
83192
  for (const [name, mcpTool] of Object.entries(mcpTools)) {
83193
- nativeTools[name] = mcpTool;
83193
+ const mcpSchema = mcpTool.inputSchema || mcpTool.parameters;
83194
+ const wrappedSchema = mcpSchema && mcpSchema._def ? mcpSchema : jsonSchema(mcpSchema || { type: "object", properties: {} });
83195
+ nativeTools[name] = tool5({
83196
+ description: mcpTool.description || `MCP tool: ${name}`,
83197
+ inputSchema: wrappedSchema,
83198
+ execute: mcpTool.execute
83199
+ });
83194
83200
  }
83195
83201
  }
83196
83202
  if (this.apiType === "google" && this._geminiToolsEnabled && !options._disableTools) {
@@ -110138,7 +110138,13 @@ var init_ProbeAgent = __esm({
110138
110138
  if (this.mcpBridge && !options._disableTools) {
110139
110139
  const mcpTools = this.mcpBridge.getVercelTools(this._filterMcpTools(this.mcpBridge.getToolNames()));
110140
110140
  for (const [name14, mcpTool] of Object.entries(mcpTools)) {
110141
- nativeTools[name14] = mcpTool;
110141
+ const mcpSchema = mcpTool.inputSchema || mcpTool.parameters;
110142
+ const wrappedSchema = mcpSchema && mcpSchema._def ? mcpSchema : (0, import_ai6.jsonSchema)(mcpSchema || { type: "object", properties: {} });
110143
+ nativeTools[name14] = (0, import_ai6.tool)({
110144
+ description: mcpTool.description || `MCP tool: ${name14}`,
110145
+ inputSchema: wrappedSchema,
110146
+ execute: mcpTool.execute
110147
+ });
110142
110148
  }
110143
110149
  }
110144
110150
  if (this.apiType === "google" && this._geminiToolsEnabled && !options._disableTools) {
package/cjs/index.cjs CHANGED
@@ -107433,7 +107433,13 @@ var init_ProbeAgent = __esm({
107433
107433
  if (this.mcpBridge && !options._disableTools) {
107434
107434
  const mcpTools = this.mcpBridge.getVercelTools(this._filterMcpTools(this.mcpBridge.getToolNames()));
107435
107435
  for (const [name14, mcpTool] of Object.entries(mcpTools)) {
107436
- nativeTools[name14] = mcpTool;
107436
+ const mcpSchema = mcpTool.inputSchema || mcpTool.parameters;
107437
+ const wrappedSchema = mcpSchema && mcpSchema._def ? mcpSchema : (0, import_ai4.jsonSchema)(mcpSchema || { type: "object", properties: {} });
107438
+ nativeTools[name14] = (0, import_ai4.tool)({
107439
+ description: mcpTool.description || `MCP tool: ${name14}`,
107440
+ inputSchema: wrappedSchema,
107441
+ execute: mcpTool.execute
107442
+ });
107437
107443
  }
107438
107444
  }
107439
107445
  if (this.apiType === "google" && this._geminiToolsEnabled && !options._disableTools) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc268",
3
+ "version": "0.6.0-rc269",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -1879,7 +1879,15 @@ export class ProbeAgent {
1879
1879
  if (this.mcpBridge && !options._disableTools) {
1880
1880
  const mcpTools = this.mcpBridge.getVercelTools(this._filterMcpTools(this.mcpBridge.getToolNames()));
1881
1881
  for (const [name, mcpTool] of Object.entries(mcpTools)) {
1882
- nativeTools[name] = mcpTool;
1882
+ // MCP tools have raw JSON Schema inputSchema that must be wrapped with jsonSchema()
1883
+ // for the Vercel AI SDK. Without wrapping, asSchema() misidentifies them as Zod schemas.
1884
+ const mcpSchema = mcpTool.inputSchema || mcpTool.parameters;
1885
+ const wrappedSchema = mcpSchema && mcpSchema._def ? mcpSchema : jsonSchema(mcpSchema || { type: 'object', properties: {} });
1886
+ nativeTools[name] = tool({
1887
+ description: mcpTool.description || `MCP tool: ${name}`,
1888
+ inputSchema: wrappedSchema,
1889
+ execute: mcpTool.execute,
1890
+ });
1883
1891
  }
1884
1892
  }
1885
1893