Skip to content

Commit 0a004a0

Browse files
Merge branch 'main' into spec/sampling-includecontext
2 parents 2fce9fd + cf8088e commit 0a004a0

File tree

16 files changed

+79
-23
lines changed

16 files changed

+79
-23
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ npm run check:docs
7070
npm run format
7171
```
7272

73+
> [!NOTE]
74+
> You can run all schema/documentation
75+
> changes at once with `npm run prep:changes`.
76+
7377
## Blog changes
7478

7579
The blog is built using [Hugo](https://gohugo.io/installation/) and located in the [`blog`](./blog) directory.
@@ -80,7 +84,7 @@ To preview blog changes locally:
8084
npm run serve:blog
8185
```
8286

83-
## Documentation Guidelines
87+
### Documentation Guidelines
8488

8589
When contributing to the documentation:
8690

docs/docs/develop/build-server.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,10 +1658,10 @@ namespace QuickstartWeatherServer.Tools;
16581658
[McpServerToolType]
16591659
public static class WeatherTools
16601660
{
1661-
[McpServerTool, Description("Get weather alerts for a US state.")]
1661+
[McpServerTool, Description("Get weather alerts for a US state code.")]
16621662
public static async Task<string> GetAlerts(
16631663
HttpClient client,
1664-
[Description("The US state to get alerts for.")] string state)
1664+
[Description("The US state code to get alerts for.")] string state)
16651665
{
16661666
using var jsonDocument = await client.ReadJsonDocumentAsync($"/alerts/active/area/{state}");
16671667
var jsonElement = jsonDocument.RootElement;

docs/legacy/concepts/prompts.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Each prompt is defined with:
2828
```typescript
2929
{
3030
name: string; // Unique identifier for the prompt
31-
description?: string; // Human-readable description
31+
title?: string; // Optional human-readable name of the prompt for display purposes
32+
description?: string; // Optional human-readable description
3233
arguments?: [ // Optional list of arguments
3334
{
3435
name: string; // Argument identifier
@@ -54,6 +55,7 @@ Clients can discover available prompts by sending a `prompts/list` request:
5455
prompts: [
5556
{
5657
name: "analyze-code",
58+
title: "Request Analyze Code",
5759
description: "Analyze code for potential improvements",
5860
arguments: [
5961
{

docs/legacy/concepts/resources.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ Servers expose a list of resources via the `resources/list` request. Each resour
8383
```typescript
8484
{
8585
uri: string; // Unique identifier for the resource
86-
name: string; // Human-readable name
86+
name: string; // The name of the resource
87+
title?: string; // Optional human-readable name of the resource for display purposes
8788
description?: string; // Optional description
8889
mimeType?: string; // Optional MIME type
8990
size?: number; // Optional size in bytes
@@ -97,7 +98,8 @@ For dynamic resources, servers can expose [URI templates](https://datatracker.ie
9798
```typescript
9899
{
99100
uriTemplate: string; // URI template following RFC 6570
100-
name: string; // Human-readable name for this type
101+
name: string; // The name of the type
102+
title?: string; // Optional Human-readable name of the type for display purposes
101103
description?: string; // Optional description
102104
mimeType?: string; // Optional MIME type for all matching resources
103105
}
@@ -114,6 +116,8 @@ The server responds with a list of resource contents:
114116
contents: [
115117
{
116118
uri: string; // The URI of the resource
119+
name?: string; // The name of the resource
120+
title?: string; // Optional human-readable name of the resource for display purposes
117121
mimeType?: string; // Optional MIME type
118122

119123
// One of:

docs/legacy/concepts/tools.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Each tool is defined with the following structure:
2828
```typescript
2929
{
3030
name: string; // Unique identifier for the tool
31+
title?: string; // Optional human-readable name of the tool for display purposes
3132
description?: string; // Human-readable description
3233
inputSchema: { // JSON Schema for the tool's parameters
3334
type: "object",
@@ -68,6 +69,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
6869
tools: [
6970
{
7071
name: "calculate_sum",
72+
title: "Calculate Sum",
7173
description: "Add two numbers together",
7274
inputSchema: {
7375
type: "object",
@@ -107,6 +109,7 @@ async def list_tools() -> list[types.Tool]:
107109
return [
108110
types.Tool(
109111
name="calculate_sum",
112+
title="Calculate Sum",
110113
description="Add two numbers together",
111114
inputSchema={
112115
"type": "object",
@@ -145,6 +148,7 @@ Tools that interact with the local system:
145148
```typescript
146149
{
147150
name: "execute_command",
151+
title: "Execute Command",
148152
description: "Run a shell command",
149153
inputSchema: {
150154
type: "object",
@@ -163,6 +167,7 @@ Tools that wrap external APIs:
163167
```typescript
164168
{
165169
name: "github_create_issue",
170+
title: "Create GitHub Issue",
166171
description: "Create a GitHub issue",
167172
inputSchema: {
168173
type: "object",
@@ -182,6 +187,7 @@ Tools that transform or analyze data:
182187
```typescript
183188
{
184189
name: "analyze_csv",
190+
title: "Analyze CSV",
185191
description: "Analyze a CSV file",
186192
inputSchema: {
187193
type: "object",
@@ -359,6 +365,7 @@ Here's how to define tools with annotations for different scenarios:
359365
// A read-only search tool
360366
{
361367
name: "web_search",
368+
title: "Web Search",
362369
description: "Search the web for information",
363370
inputSchema: {
364371
type: "object",
@@ -377,6 +384,7 @@ Here's how to define tools with annotations for different scenarios:
377384
// A destructive file deletion tool
378385
{
379386
name: "delete_file",
387+
title: "Delete File",
380388
description: "Delete a file from the filesystem",
381389
inputSchema: {
382390
type: "object",
@@ -397,6 +405,7 @@ Here's how to define tools with annotations for different scenarios:
397405
// A non-destructive database record creation tool
398406
{
399407
name: "create_record",
408+
title: "Create Database Record",
400409
description: "Create a new record in the database",
401410
inputSchema: {
402411
type: "object",
@@ -426,6 +435,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
426435
tools: [
427436
{
428437
name: "calculate_sum",
438+
title: "Calculate Sum",
429439
description: "Add two numbers together",
430440
inputSchema: {
431441
type: "object",

docs/specification/2025-03-26/server/resources.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ sequenceDiagram
243243
Client->>Server: resources/list
244244
Server-->>Client: List of resources
245245
246+
Note over Client,Server: Resource Template Discovery
247+
Client->>Server: resources/templates/list
248+
Server-->>Client: List of resource templates
249+
246250
Note over Client,Server: Resource Access
247251
Client->>Server: resources/read
248252
Server-->>Client: Resource contents

docs/specification/2025-06-18/server/resources.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ sequenceDiagram
247247
Client->>Server: resources/list
248248
Server-->>Client: List of resources
249249
250+
Note over Client,Server: Resource Template Discovery
251+
Client->>Server: resources/templates/list
252+
Server-->>Client: List of resource templates
253+
250254
Note over Client,Server: Resource Access
251255
Client->>Server: resources/read
252256
Server-->>Client: Resource contents

docs/specification/draft/basic/authorization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ response.
479479

480480
MCP clients **MUST NOT** send tokens to the MCP server other than ones issued by the MCP server's authorization server.
481481

482-
Authorization servers **MUST** only accept tokens that are valid for use with their
482+
MCP servers **MUST** only accept tokens that are valid for use with their
483483
own resources.
484484

485485
MCP servers **MUST NOT** accept or transit any other tokens.

docs/specification/draft/basic/transports.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ In the **stdio** transport:
2828
to its standard output (`stdout`).
2929
- Messages are individual JSON-RPC requests, notifications, or responses.
3030
- Messages are delimited by newlines, and **MUST NOT** contain embedded newlines.
31-
- The server **MAY** write UTF-8 strings to its standard error (`stderr`) for logging
32-
purposes. Clients **MAY** capture, forward, or ignore this logging.
31+
- The server **MAY** write UTF-8 strings to its standard error (`stderr`) for any
32+
logging purposes including informational, debug, and error messages.
33+
- The client **MAY** capture, forward, or ignore the server's `stderr` output
34+
and **SHOULD NOT** assume `stderr` output indicates error conditions.
3335
- The server **MUST NOT** write anything to its `stdout` that is not a valid MCP message.
3436
- The client **MUST NOT** write anything to the server's `stdin` that is not a valid MCP
3537
message.
@@ -202,6 +204,7 @@ servers which want to establish stateful sessions:
202204
securely generated UUID, a JWT, or a cryptographic hash).
203205
- The session ID **MUST** only contain visible ASCII characters (ranging from 0x21 to
204206
0x7E).
207+
- The client **MUST** handle the session ID in a secure manner, see [Session Hijacking mitigations](/specification/draft/basic/security_best_practices#session-hijacking) for more details.
205208
2. If an `Mcp-Session-Id` is returned by the server during initialization, clients using
206209
the Streamable HTTP transport **MUST** include it in the `Mcp-Session-Id` header on
207210
all of their subsequent HTTP requests.

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ To create a task, requestors send a request with the `task` field included in th
160160
"status": "working",
161161
"statusMessage": "The operation is now in progress.",
162162
"createdAt": "2025-11-25T10:30:00Z",
163+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
163164
"ttl": 60000,
164165
"pollInterval": 5000
165166
}
@@ -219,6 +220,7 @@ Requestors **SHOULD** continue polling until the task reaches a terminal status
219220
"status": "working",
220221
"statusMessage": "The operation is now in progress.",
221222
"createdAt": "2025-11-25T10:30:00Z",
223+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
222224
"ttl": 30000,
223225
"pollInterval": 5000
224226
}
@@ -291,6 +293,7 @@ When a task status changes, receivers **MAY** send a [`notifications/tasks/statu
291293
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
292294
"status": "completed",
293295
"createdAt": "2025-11-25T10:30:00Z",
296+
"lastUpdatedAt": "2025-11-25T10:50:00Z",
294297
"ttl": 60000,
295298
"pollInterval": 5000
296299
}
@@ -330,13 +333,15 @@ To retrieve a list of tasks, requestors can send a [`tasks/list`](/specification
330333
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
331334
"status": "working",
332335
"createdAt": "2025-11-25T10:30:00Z",
336+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
333337
"ttl": 30000,
334338
"pollInterval": 5000
335339
},
336340
{
337341
"taskId": "abc123-def456-ghi789",
338342
"status": "completed",
339343
"createdAt": "2025-11-25T09:15:00Z",
344+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
340345
"ttl": 60000
341346
}
342347
],
@@ -373,6 +378,7 @@ To explicitly cancel a task, requestors can send a [`tasks/cancel`](/specificati
373378
"status": "cancelled",
374379
"statusMessage": "The task was cancelled by request.",
375380
"createdAt": "2025-11-25T10:30:00Z",
381+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
376382
"ttl": 30000,
377383
"pollInterval": 5000
378384
}
@@ -448,6 +454,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
448454
### TTL and Resource Management
449455

450456
1. Receivers **MUST** include a `createdAt` [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5)-formatted timestamp in all task responses to indicate when the task was created.
457+
1. Receivers **MUST** include a `lastUpdatedAt` [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5)-formatted timestamp in all task responses to indicate when the task was last updated.
451458
1. Receivers **MAY** override the requested `ttl` duration.
452459
1. Receivers **MUST** include the actual `ttl` duration (or `null` for unlimited) in `tasks/get` responses.
453460
1. After a task's `ttl` lifetime has elapsed, receivers **MAY** delete the task and its results, regardless of the task status.
@@ -704,6 +711,7 @@ A task represents the execution state of a request. The task state includes:
704711
- `createdAt`: ISO 8601 timestamp when the task was created
705712
- `ttl`: Time in milliseconds from creation before task may be deleted
706713
- `pollInterval`: Suggested time in milliseconds between status checks
714+
- `lastUpdatedAt`: ISO 8601 timestamp when the task status was last updated
707715

708716
### Task Status
709717

@@ -842,6 +850,7 @@ When the underlying request does not complete successfully, the task moves to th
842850
"taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
843851
"status": "failed",
844852
"createdAt": "2025-11-25T10:30:00Z",
853+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
845854
"ttl": 30000,
846855
"statusMessage": "Tool execution failed: API rate limit exceeded"
847856
}

0 commit comments

Comments
 (0)