Skip to content

bug: Gemini tools isnt compatible with MCP #1704

@omarcresp

Description

@omarcresp

Describe the bug

mcphub.nvim works asking the llms tools to send an object but for gemini when you declare a tool and put the type object it ask to write to schema of that object which isnt compatible to the current implementation of the mcphub.nvim tools

Looking at other mcp - gemini integrations. They didnt pass one mcp tool to the llm instead pass each mcp connected server tool as its own tools. and then link that back to the mcp server. It would require a refactor in the mcphub.nvim - avante integration

I have a PR that implements tools on gemini provider but its blocked by this because as of now it would break if mcphub.nvim is connected

To reproduce

No response

Expected behavior

No response

Installation method

Use lazy.nvim:

{
  "yetone/avante.nvim",
  event = "VeryLazy",
  lazy = false,
  version = false, -- set this if you want to always pull the latest change
  opts = {
    -- add any opts here
  },
  -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
  build = "make",
  -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

NVIM v0.10.4
Build type: Release
LuaJIT 2.1.1713773202

Linux nixos-jackcres 6.12.19

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions