Hi 👋
I'm trying to improve the typing situation in the Python SDK, and I was trying to understand the Notification and Request objects in the JSON schema.
If we see the definition of both of them in the schema.json, they are never referenced:
|
"Request": { |
|
"properties": { |
|
"method": { |
|
"type": "string" |
|
}, |
|
"params": { |
|
"additionalProperties": {}, |
|
"type": "object" |
|
} |
|
}, |
|
"required": [ |
|
"method" |
|
], |
|
"type": "object" |
|
}, |
If we check how it's being used in the schema.ts, we can see that it's only used in JSONRPCRequest:
|
export interface JSONRPCRequest extends Request { |
|
jsonrpc: typeof JSONRPC_VERSION; |
|
id: RequestId; |
|
} |
I belive those types are redudant, given that the types that are really relevant are JSONRPCRequest and JSONRPCNotification. Can we drop them?
Hi 👋
I'm trying to improve the typing situation in the Python SDK, and I was trying to understand the
NotificationandRequestobjects in the JSON schema.If we see the definition of both of them in the
schema.json, they are never referenced:modelcontextprotocol/schema/draft/schema.json
Lines 2896 to 2910 in 0b3a76e
If we check how it's being used in the
schema.ts, we can see that it's only used inJSONRPCRequest:modelcontextprotocol/schema/draft/schema.ts
Lines 158 to 161 in 0b3a76e
I belive those types are redudant, given that the types that are really relevant are
JSONRPCRequestandJSONRPCNotification. Can we drop them?