Skip to content

Add bulk_operations & create_collection tools; fix Gemini JSON Schema compatibility and inspector vulnerabilities#20

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-mcp-server-error-gemini
Draft

Add bulk_operations & create_collection tools; fix Gemini JSON Schema compatibility and inspector vulnerabilities#20
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-mcp-server-error-gemini

Conversation

Copilot AI commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Gemini's function-calling API enforces strict JSON Schema validation and rejects any array-typed parameter missing an items field, causing HTTP 400 errors when using this MCP server via Antigravity. Additionally, @modelcontextprotocol/inspector was pinned to a version with two known CVEs.

Schema fix — new tools with correct array definitions

Added two missing tools. Every array property includes an explicit items schema:

// bulk_operations — operations.create / .update use { type: "object" };
// .delete uses { type: "string" } (IDs, not objects)
{
  name: "bulk_operations",
  inputSchema: {
    properties: {
      operations: {
        type: "object",
        properties: {
          create: { type: "array", items: { type: "object" } },
          update: { type: "array", items: { type: "object" } },
          delete: { type: "array", items: { type: "string" } }
        }
      }
    }
  }
}

// create_collection — fields array also carries items
{
  name: "create_collection",
  inputSchema: {
    properties: {
      fields: { type: "array", items: { type: "object" } }
    }
  }
}

Handlers call the standard Directus REST endpoints (POST/PATCH/DELETE /items/:collection, POST /collections).

Dependency — inspector security upgrade

Package Before After Fixes
@modelcontextprotocol/inspector 0.10.2 0.16.6 XSS via untrusted MCP server (≥0.16.6); missing proxy↔client auth (≥0.14.1)

Copilot AI and others added 2 commits April 20, 2026 13:58
…nd auth vulnerabilities

Agent-Logs-Url: https://github.com/pixelsock/directus-mcp/sessions/bda85b3e-6d06-4351-b272-d8b9696b615e

Co-authored-by: pixelsock <4932231+pixelsock@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MCP server error with Gemini in Antigravity Add bulk_operations & create_collection tools; fix Gemini JSON Schema compatibility and inspector vulnerabilities Apr 20, 2026
Copilot AI requested a review from pixelsock April 20, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with MCP server being used with Gemini in Antigravity

2 participants