Skip to content

MCP: structuredContent returns array instead of object for list-type tools (breaks MCP clients) #10437

Closed

Description

@RileyBayside

Summary

Several Firebase MCP tools return a bare JSON array in the structuredContent
field of the tool response. The MCP spec requires structuredContent to be a
JSON object (record), not an array. MCP clients that validate the response
schema reject these tools with:

MCP error -32602: Invalid tools/call result: expected record, received array (path: structuredContent)

Bug Info

  • Affected Tool(s): firestore_query_collection, auth_get_users
  • MCP Client: Claude Code 2.1.50
  • Operating System: macOS Sequoia 15.3

Steps to Reproduce

  1. Add Firebase MCP server to your MCP client:
    npx -y firebase-tools@latest mcp
  2. Call auth_get_users or firestore_query_collection from any MCP client
    that enforces the MCP spec (structuredContent must be a JSON object)
  3. The call fails — the tool returns a bare JSON array as structuredContent
    instead of wrapping the results in an object

Working tools (return a JSON object): firestore_get_document,
firestore_list_documents, firebase_get_security_rules, functions_get_logs

Expected: { "users": [...] } or { "documents": [...] }

Actual: [{ "uid": "...", ... }, ...]

Workaround is to use the Firebase CLI directly (firebase auth:export, etc.).

Activity

  1. added
    api: mcp
    on Apr 30, 2026
  2. aalej commented on Apr 30, 2026

    @aalej
    Contributor

    Thanks for reporting this @RileyBayside, this seems to be an issue with the latest version of firebase-tools(15.16.0). When I tried pinning to 15.15.0(npx -y [email protected] mcp), the issue doesn't appear.

    I will raise this to our engineering team and mark this as reproducible.

  3. added a commit that references this issue on Apr 30, 2026
    94da71d
  4. added a commit that references this issue on Jul 9, 2026
    369d165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: mcpreproducible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions