Update architecture.mdx

This commit is contained in:
Laurent AJDNIK 2024-12-10 08:26:18 +01:00 • committed by GitHub
commit c52f1282fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -123,22 +123,14 @@ MCP has these main types of messages:
} }
``` ```
2. **Notifications** are one-way messages that don't expect a response: 2. **Results** are successful responses to requests:
```typescript
interface Notification {
method: string;
params?: { ... };
}
```
3. **Results** are successful responses to requests:
```typescript ```typescript
interface Result { interface Result {
[key: string]: unknown; [key: string]: unknown;
} }
``` ```
4. **Errors** indicate that a request failed: 3. **Errors** indicate that a request failed:
```typescript ```typescript
interface Error { interface Error {
code: number; 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 ## Connection lifecycle
### 1. Initialization ### 1. Initialization