Merge pull request #73 from LaurentAjdnik/message_types_order
Message types order
This commit is contained in:
commit
1ff08bebbd
1 changed files with 10 additions and 10 deletions
|
|
@ -123,22 +123,14 @@ MCP has these main types of messages:
|
|||
}
|
||||
```
|
||||
|
||||
2. **Notifications** are one-way messages that don't expect a response:
|
||||
```typescript
|
||||
interface Notification {
|
||||
method: string;
|
||||
params?: { ... };
|
||||
}
|
||||
```
|
||||
|
||||
3. **Results** are successful responses to requests:
|
||||
2. **Results** are successful responses to requests:
|
||||
```typescript
|
||||
interface Result {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
```
|
||||
|
||||
4. **Errors** indicate that a request failed:
|
||||
3. **Errors** indicate that a request failed:
|
||||
```typescript
|
||||
interface Error {
|
||||
code: number;
|
||||
|
|
@ -147,6 +139,14 @@ MCP has these main types of messages:
|
|||
}
|
||||
```
|
||||
|
||||
4. **Notifications** are one-way messages that don't expect a response:
|
||||
```typescript
|
||||
interface Notification {
|
||||
method: string;
|
||||
params?: { ... };
|
||||
}
|
||||
```
|
||||
|
||||
## Connection lifecycle
|
||||
|
||||
### 1. Initialization
|
||||
|
|
|
|||
Loading…
Reference in a new issue