Update architecture.mdx
This commit is contained in:
parent
91ff32e64b
commit
c52f1282fb
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:
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue