Skip to content

[Bug]: planner and recipe search steer simple JSON endpoints to function code #587

Closed

Description

@jimhoyd

Runtime revision and environment

main at 645239b; core 0.5.9 packed with npm pack and installed into scratch projects, run as llms.txt instructs (npx --no --package @jimhoyd/urlcode urlcode …); MCP driven over stdio. Node 26, macOS. Found in a hands-on usability audit (agent and human perspectives).

Minimal reproduction

  • For "POST /signup validates email and name and returns 202", plan-feature lists function and the function-based contact-form recipe, not respond + request.body.schema; matched is [] for every recipe and no outline is given.
  • search_recipes "json endpoint" ranks static-plus-api and json-api (functions) first; no recipe shows native respond: {json: …}.
  • The supported JSON Schema subset is never listed up front; agents learn it by failing (format: email unsupported — supported: uuid; pattern requires maxLength of at most 128).
  • A 422 from a JSON route is text/plain showing only the first issue unless the client sends Accept: application/json, and an additionalProperties issue does not name the extra property.
    Related: [Gap]: recipes hand-write validation and fixed responses that YAML already expresses #555 (recipes), [Bug]: urlcode review misses request.json() hand-validation and constant-response functions #556 (review detector).

Relevant output

urlcode plan-feature, MCP search_recipes, and a POST with an extra property.

Suggested fix

Add a native respond + body-schema recipe and rank native handlers first; populate matched/outline; list the schema subset in get_schema/capabilities; return JSON 422s (all issues, naming extra properties) on routes that declare a JSON body.

Activity

  1. added
    bug
    ai-first
    on Sep 23, 2026
  2. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Both halves landed: #607 (#607) made JSON-body routes always return 422 as JSON listing every issue; #605 (#605) added a native json-endpoint recipe with no project code, ranked no-code recipes first in plan-feature/search_recipes, and listed the supported JSON Schema subset in get_schema/capabilities. Closing.

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

    ai-firstbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions