Skip to content

Schema: Update schema to 2020-12  #182

Closed

Description

@jokemanfire

Activity

  1. jokemanfire commented on May 17, 2025

    @jokemanfire
    MemberAuthor
  2. jokemanfire commented on May 17, 2025

    @jokemanfire
    MemberAuthor

    And it is uncertain whether the schema third-party library currently in use strictly follows draft implementation.

  3. samscott89 commented on May 21, 2025

    @samscott89

    Adding a few observations here:

    The schema library we are currently using is relatively new. Is there a more mature alternative, or should we identify this repository and iterate on it

    In my experience schemars is one of the more mature/robust schema generators. However, there has been some sporadic maintenance since it's primarily maintained by a single person in their free time. But there are mature applications that depend on it like Oso, Zed, and cargo itself.

    I think the main thing to look out for is this issue + path to 1.0.

    Relatedly, and regarding:

    Regarding whether the draft strictly follows the official schema https://json-schema.org/draft-07/schema

    I ran into this issue with a MCP server built using this repo (main branch) with claude code. Related to this issue: anthropics/claude-code#586.

    According to the schemars 0.8 docs the default schema conforms to draft07. However, when using this with Claude Code, it fails because Claude is expecting draft2020_12. For the record, it works fine with inspector.

    As an experiment, I tried migrating rmcp to use the 1.0 prerelease of schemars. It was pretty easy and with that change my MCP server now works with Claude Code (and still works with inspector).

  4. jokemanfire commented on May 22, 2025

    @jokemanfire
    MemberAuthor

    @samscott89 Thank you for your summary, now I think the main problem is still focused on MCP's spec specification, which has too unclear a description of the schema . Although spec is based on draft 07 or draft 2020_12, it may add some adaptive modifications to it, but these are not described in the document.This can easily lead to misunderstandings in SDK development.
    So my current idea is:

    1. I will no longer consider the issue of schema libraries, as the problem itself is not caused by schema libraries. And especially for large projects like Zed that are using it.
    2. For now, try to adapt to various clients as much as possible and use the most basic schema patterns until the official spec file is clear.

    @4t145 @Hendler cc

  5. removed this from the Pre release milestones milestone on May 26, 2025
  6. jokemanfire commented on Jun 18, 2025

    @jokemanfire
    MemberAuthor
  7. pinned this issue on Jun 18, 2025
  8. cn-kali-team commented on Jun 30, 2025

    @cn-kali-team

    Is there a plan to upgrade schemas to version 1.0 in the project?
    项目有计划将schemars升级到1.0版本吗
    https://docs.rs/schemars/latest/

  9. jokemanfire commented on Jul 1, 2025

    @jokemanfire
    MemberAuthor

    #258 It is in progress , but I am not planning to elevate it in the upcoming version.

  10. Sunsvea commented on Jul 8, 2025

    @Sunsvea

    Adding a few observations here:

    The schema library we are currently using is relatively new. Is there a more mature alternative, or should we identify this repository and iterate on it

    In my experience schemars is one of the more mature/robust schema generators. However, there has been some sporadic maintenance since it's primarily maintained by a single person in their free time. But there are mature applications that depend on it like Oso, Zed, and cargo itself.

    I think the main thing to look out for is this issue + path to 1.0.

    Relatedly, and regarding:

    Regarding whether the draft strictly follows the official schema https://json-schema.org/draft-07/schema

    I ran into this issue with a MCP server built using this repo (main branch) with claude code. Related to this issue: anthropics/claude-code#586.

    According to the schemars 0.8 docs the default schema conforms to draft07. However, when using this with Claude Code, it fails because Claude is expecting draft2020_12. For the record, it works fine with inspector.

    As an experiment, I tried migrating rmcp to use the 1.0 prerelease of schemars. It was pretty easy and with that change my MCP server now works with Claude Code (and still works with inspector).

    Just here to mirror Sam's comments. Some MCP servers are generating malformed schemas... They say they’re draft-07, but aren’t actually conforming. Claude Code ends up rejecting them (400).

    In my case, one external MCP was the culprit. Removing it fixed the issue, but I agree that this kind of thing shouldn’t fall on the user or Anthropic to debug. Ideally, the protocol should enforce schema validity or at least define clearer expectations (e.g., strict draft2020-12 compliance).

    Also +1 on the schemars 1.0-pre upgrade. I tried it too and had similar success.

  11. jokemanfire commented on Jul 11, 2025

    @jokemanfire
    MemberAuthor

    Shemars has been update to 1.0 now.

  12. jokemanfire commented on Nov 12, 2025

    @jokemanfire
    MemberAuthor
  13. changed the title [-]Discussion: Schema's problem[/-] [+]Schema: Update schema to 2020-12 [/+] on Nov 19, 2025
  14. unpinned this issue on Dec 4, 2025
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

    T-enhancementNew features and enhancementsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions