Skip to content

Conversation

@edujuan
Copy link
Member

@edujuan edujuan commented Nov 25, 2025

Referencing issue universal-tool-calling-protocol/code-mode#10

Summary by cubic

Fix JSON Schema resolution for MCP tool discovery by dereferencing $refs and $defs. Restores compatibility with FastMCP 2.0+ servers and removes MissingRefError during tool listing.

  • Bug Fixes

    • Dereference input/output schemas during tool discovery to inline $refs/$defs (FastMCP 2.0+). Prevents "MissingRefError: can't resolve reference #/$defs/...". Falls back to the original schema on failure and remains backward compatible.
  • Dependencies

    • Add @apidevtools/json-schema-ref-parser.

Written for commit ddc02a5. Summary will update automatically on new commits.

h3xxit and others added 10 commits October 22, 2025 16:01
* Add direct call plugin

* Update packages/direct-call/tsconfig.json

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update packages/direct-call/README.md

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Add cjs builds

* Update versions

* Add pure string to text plugin

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…tibility

- Add @apidevtools/json-schema-ref-parser dependency
- Implement schema dereferencing in registerManual to resolve $defs and $ref
- Resolves issue with FastMCP 2.0+ servers (e.g., basic-memory)
- Fixes MissingRefError: can't resolve reference #/$defs/...
- Maintains backwards compatibility with legacy MCP servers
- All existing tests pass

Related to: universal-tool-calling-protocol/code-mode#10
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@h3xxit h3xxit merged commit 1f2c108 into dev Nov 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants