What happened?
MCP servers with tools where the JSON schema doesn't specify a type are skipped during gemini loading, even though it works perfectly.
What did you expect to happen?
n8n deploys similar tools, and it's not a problem for others cli
Client information
╭────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.1.22 │
│ Git Commit 5fe4e02 │
│ Model gemini-2.5-pro │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method OAuth │
│ │
╰────────────────────────────────────────────────────────────────────────────────╯
Login information
No response
Anything else we need to know?
IN packages/core/src/tools/mcp-client.ts, line 570, function hasValidTypes
+++++++
THIS CHECK COULD BE COMMENTED ?
if (!s['type']) {
// These keywords contain an array of schemas that should be validated.
//
// If no top level type was given, then they must each have a type.
let hasSubSchema = false;
const schemaArrayKeywords = ['anyOf', 'allOf', 'oneOf'];
for (const keyword of schemaArrayKeywords) {
const subSchemas = s[keyword];
if (Array.isArray(subSchemas)) {
hasSubSchema = true;
for (const subSchema of subSchemas) {
if (!hasValidTypes(subSchema)) {
return false;
}
}
}
}
// If the node itself is missing a type and had no subschemas, then it isn't valid.
if (!hasSubSchema) return false;
}
+++++++
I tried it on a local fork, and it works.
What happened?
MCP servers with tools where the JSON schema doesn't specify a type are skipped during gemini loading, even though it works perfectly.
What did you expect to happen?
n8n deploys similar tools, and it's not a problem for others cli
Client information
╭────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.1.22 │
│ Git Commit 5fe4e02 │
│ Model gemini-2.5-pro │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method OAuth │
│ │
╰────────────────────────────────────────────────────────────────────────────────╯
Login information
No response
Anything else we need to know?
IN packages/core/src/tools/mcp-client.ts, line 570, function hasValidTypes
+++++++
THIS CHECK COULD BE COMMENTED ?
if (!s['type']) {
// These keywords contain an array of schemas that should be validated.
//
// If no top level type was given, then they must each have a type.
let hasSubSchema = false;
const schemaArrayKeywords = ['anyOf', 'allOf', 'oneOf'];
for (const keyword of schemaArrayKeywords) {
const subSchemas = s[keyword];
if (Array.isArray(subSchemas)) {
hasSubSchema = true;
for (const subSchema of subSchemas) {
if (!hasValidTypes(subSchema)) {
return false;
}
}
}
}
// If the node itself is missing a type and had no subschemas, then it isn't valid.
if (!hasSubSchema) return false;
}
+++++++
I tried it on a local fork, and it works.