.joshuafrank
05/21/2025, 12:55 AM.joshuafrank
05/21/2025, 7:45 PMadelmuursepp__
05/26/2025, 9:56 PMjsx
tools: [{
name: "get_weather",
description: "Get weather information",
inputSchema: {
"$schema": "http://json-schema.org/draft-07/schema#", // This causes the error!
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": ["location"]
}
}]
By the [MCP specs](https://modelcontextprotocol.io/specification/2025-03-26/server/tools) the $schema is not specified but rather inferred. In reproducing the error this specifically affected the Vertex model, not chat-gpt-4.1. So, some additional parsing (removing $schema) can be added to transformMCPToolsToGoogle in Promptfoo to avoid this issue.
Do you know if this MCP or similar is available for me to test? You could standardize the input to align with MCP specs to work for now.
Reproducing the error 1 (Google):
I reproduced the same Error: Expected one candidate in API response. by commenting/uncommenting $schema. Worth to note it could also be any other reason, like invalid Gemini API key.adelmuursepp__
05/28/2025, 1:32 AM.joshuafrank
05/28/2025, 9:33 PM