-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Update the server’s tool registrations to use these schemas.
get_all_mids
{
"$schema":"https://json-schema.org/draft/2020-12/schema",
"type":"object",
"properties":{},
"additionalProperties": false
}
get_candle_snapshot
{
"$schema":"https://json-schema.org/draft/2020-12/schema",
"type":"object",
"properties":{
"coin":{"type":"string","minLength":1},
"interval":{"type":"string","pattern":"^(1m|3m|5m|15m|1h|4h|1d)$"},
"startTime":{"type":"integer","minimum":0},
"endTime":{"type":["integer","null"],"minimum":0}
},
"required":["coin","interval","startTime"],
"additionalProperties": false
}
get_l2_book
{
"$schema":"https://json-schema.org/draft/2020-12/schema",
"type":"object",
"properties":{
"symbol":{"type":"string","minLength":1}
},
"required":["symbol"],
"additionalProperties": false
}
In the TypeScript server, pass these as inputSchema (camelCase) to your MCP SDK tool definitions. Do not use nullable; use union types as shown.
Validate
AJV 2020:
npm i -g ajv-cli@6 ajv-formats
ajv validate -s schema.json --spec=draft2020