Skip to content

Inspector shows invalid tool error even for a valid response #84

Closed

Description

@TikiCat7

The inspector client is showing displaying an invalid tool result, even though if the tool response is valid. I'm using the weather mpc from the documentation to replicate.

Screenshot 2024-11-27 at 7 01 56 PM

It looks like CallToolResultSchema.safeParse(toolResult) expects an array, however in the weather app example the tool result is an object.

{
  "content": {
    "mimeType": "application/json",
    "text": "[\n  {\n    \"date\": \"2024-11-27\",\n    \"temperature\": 16.19,\n    \"conditions\": \"few clouds\"\n  },\n  {\n    \"date\": \"2024-11-28\",\n    \"temperature\": 13.37,\n    \"conditions\": \"clear sky\"\n  }\n]"
  }
}

Activity

  1. ashwin-ant commented on Nov 27, 2024

    @ashwin-ant
    Member

    Hey @TikiCat7, thanks for this report! This was actually an error in the docs that's now been fixed. If you go check out the docs now, the example code is updated.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions