Repository navigation
Closed
Description
Issue description
When running the MCP server with the @chaindead/telegram-mcp integration, I receive errors indicating that the tool schemas use features from JSON Schema Draft 2020-12 (specifically $dynamicRef) that are not supported by the current validator. All Telegram tool schemas (tg_dialog, tg_dialogs, tg_me, tg_read, tg_send) are rejected as invalid.
Details:
- The schemas specify "$schema": "https://json-schema.org/draft/2020-12/schema".
- The error message is:
The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema) - This prevents the Telegram MCP tools from working as expected.
Environment:
- MCP server launched via VS Code using
npx @chaindead/telegram-mcp - Windows 11
- Authenticated successfully
Suggested Solution:
- Either update the validator to support Draft 2020-12 and
$dynamicRef, - Or downgrade the schemas to Draft-07 and remove
$dynamicRefusage.
MCP Log
[warning] 5 tools have invalid JSON schemas and will be omitted
Full error log
Tool `tg_dialog` has invalid JSON parameters:
- The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema)
- Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"type":"string","description":"Name of the dialog"},"offset":{"type":"integer","description":"Offset for continuation"}},"type":"object","required":["name"]}
Tool `tg_dialogs` has invalid JSON parameters:
- The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema)
- Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"offset":{"type":"string","description":"Offset for continuation"},"only_unread":{"type":"boolean","description":"Include only dialogs with unread mark"}},"type":"object"}
Tool `tg_me` has invalid JSON parameters:
- The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema)
- Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"type":"object"}
Tool `tg_read` has invalid JSON parameters:
- The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema)
- Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"type":"string","description":"Name of the dialog"}},"type":"object"}
Tool `tg_send` has invalid JSON parameters:
- The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. (at /$schema)
- Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"name":{"type":"string","description":"Name of the dialog"},"text":{"type":"string","description":"Plain text of the message"}},"type":"object","required":["name","text"]}
Reacted by Alex Ivanov
Metadata
Metadata
Assignees
Labels
No labels
Activity
chaindead commentedon May 9, 2025
what mcp tool in vs code you are using?
YuriiMurha commentedon May 11, 2025
GitHub Copilot. I pick "Select tools" -> "Add more tools" -> "Add MCP Server".
Here's the config settings:
YuriiMurha commentedon May 27, 2025
@chaindead If you meant which particular tools of the
@chaindead/telegram-mcpMCP Server I was to run, then none, because VS Code showed this warning and did not load the server at all, so I wasn't able to use it.chaindead commentedon May 29, 2025
try to update your mcp client, i think this issie is client side
oshliaer commentedon Jul 8, 2025
@YuriiMurha any updates?
chaindead commentedon Feb 27, 2026
I've opened #16 with a configurable approach to this — adds a
--schema-versionCLI flag (andTG_SCHEMA_VERSIONenv var) so users can sethttps://json-schema.org/draft-07/schema#for VS Code compatibility without changing the default for clients that already support Draft 2020-12.This builds on the same root cause identified here and in #11 (
invopop/jsonschemadefaulting to Draft 2020-12), but keeps the fix opt-in rather than a hard override.