Skip to content

sanitize tools for Gemini 3 compatibility #4512

@ZGltYQ

Description

@ZGltYQ

Description

Got error when try to send message to gemini 3 model:

Invalid value at 'tools.function_declarations[12].parameters.properties[0].value.enum[0]' (TYPE_STRING), 0
Invalid value at 'tools.function_declarations[12].parameters.properties[0].value.enum[1]' (TYPE_STRING), 1
Invalid value at 'tools.function_declarations[12].parameters.properties[0].value.enum[2]' (TYPE_STRING), 2
Invalid value at 'tools.function_declarations[12].parameters.properties[1].value.enum[0]' (TYPE_STRING), 0
Invalid value at 'tools.function_declarations[12].parameters.properties[1].value.enum[1]' (TYPE_STRING), 1
Invalid value at 'tools.function_declarations[12].parameters.properties[1].value.enum[2]' (TYPE_STRING), 2
Invalid value at 'tools.function_declarations[12].parameters.properties[1].value.enum[3]' (TYPE_STRING), 3

After research i found out that problem was caused by Ponter MCP, would you handle properties type ?

OpenCode version

v1.0.78

Steps to reproduce

  1. Add MCP:
    "pointer": {
    "type": "local",
    "command": ["npx", "-y", "@mcp-pointer/server@latest", "start"],
    "environment": {
    "MCP_POINTER_PORT": "7007"
    }

  2. Try to send message

Screenshot and/or share link

No response

Operating System

Nobara 42

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions