Skip to content

Legacy list path still fails the whole page on one undecodable item #6814

Open

Description

@reyortiz3

Problem

A single tools/list (or resources/prompts) item that the toolhive-core compat types cannot decode fails the whole list on the Legacy enumeration path, so the backend lists no tools at all. The Modern path no longer does: #6772 decodes items one at a time and skips a bad item with a warning, so the same backend shows all but one tool on Modern and none on Legacy.

The Legacy path (queryTools and friends) goes through the compat client's ListTools, which runs the result through convertResult (mcpcompat/client/client.go). That marshals and then unmarshals the whole ListToolsResult in one go, so one bad item fails the page.

Context

  • The most common trigger, a top-level schema type that is a JSON Schema type array such as ["object","null"], is fixed at the source by fix(mcpcompat): accept a non-string top-level schema type toolhive-core#328, once toolhive picks up a release that contains it. That is valid JSON Schema, and valid for an outputSchema.
  • Other shapes the compat types cannot represent will still fail the whole page on Legacy.

Suggested direction

A fallback decode at the Tool level in toolhive-core (and the other list item types) would fix both paths in one place, instead of duplicating per-item decoding in toolhive. For outputSchema specifically, falling back to RawOutputSchema when the typed decode fails would keep the tool instead of dropping it.

Raised in review of #6772.

Activity

  1. added
    needs-triage
    on Oct 13, 2026
  2. removed
    needs-triage
    on Nov 24, 2026
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