Skip to content

[Bug]: explain_error recommends the nonexistent route.inputs schema path #757

Closed

Description

@jimhoyd

Runtime revision and environment

Core main a324cd8, Node 26.8.2, macOS. Also propagated by URLCode AI's locked 0.6.1 runtime.

Minimal reproduction

explainError('Path placeholder requires an input: id') matches undeclared-input and tells the agent: Ask get_schema for route.inputs.

Following the instruction with getSchemaFragment('route.inputs') throws Unknown schema path segment; the available route fields include parameters, not inputs.

Expected: guidance should name the actual authoring contract (parameters, including its in/path declaration and schema), and a schema query the tool accepts, such as route.parameters. Distinguish runtime context.inputs from YAML parameters.

Relevant output

packages/core/src/explain-error-rules.ts, undeclared-input rule. Existing test/mcp-next-tools.test.ts verifies canonical tool names but not schema paths or arguments in the emitted guidance. Add an executable follow-through test for the suggested schema query. The hosted wrapper inherits the bad path and turns it into a docs search, which does not repair the mistake.

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