Skip to content

Invalid input: expected record, received array #449

Description

@samithawiththige

Server

observability-mcp

What did you do?

When using @google-cloud/observability-mcp@latest with Gemini CLI, certain tool calls (e.g. list_metric_descriptors, list_log_entries, etc.) are giving below error

{
"error": "MCP tool 'list_metric_descriptors' reported tool error for function call: {"name":"list_metric_descriptors","args":{"name":"projects/project-xyz"}}
with response: [{"functionResponse":{"name":"list_metric_descriptors","response":{"error":{"message":"[\n {\n \"expected\": \"record\",\n
\"code\": \"invalid_type\",\n \"path\": [\n \"structuredContent\"\n ],\n \"message\": \"Invalid input: expected record, received
array\"\n }\n]","isError":true}}}}]"
}

What did you see happen?

{
"error": "MCP tool 'list_metric_descriptors' reported tool error for function call: {"name":"list_metric_descriptors","args":{"name":"projects/project-xyz"}}
with response: [{"functionResponse":{"name":"list_metric_descriptors","response":{"error":{"message":"[\n {\n \"expected\": \"record\",\n
\"code\": \"invalid_type\",\n \"path\": [\n \"structuredContent\"\n ],\n \"message\": \"Invalid input: expected record, received
array\"\n }\n]","isError":true}}}}]"
}

What did you expect to see?

It should be able to accept the returned content in the given format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions