-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
modelcontextprotocol/schema/draft/schema.json
Lines 2896 to 2910 in 0b3a76e
| "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:
modelcontextprotocol/schema/draft/schema.ts
Lines 158 to 161 in 0b3a76e
| 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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working