Skip to content

Commit aead5c1

Browse files
ochafikbhosmer-ant
authored andcommitted
Update types.ts
1 parent dcb68e1 commit aead5c1

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

src/types.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ export const ClientCapabilitiesSchema = z.object({
313313
sampling: z
314314
.object({
315315
/**
316-
* Present if the client supports non-'none' values for includeContext parameter.
316+
* Present if the client supports context inclusion via includeContext parameter.
317+
* If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
317318
*/
318319
context: AssertObjectSchema.optional(),
319320
/**
320-
* Present if the client supports tools and tool_choice parameters in sampling requests.
321-
* Presence indicates full tool calling support.
321+
* Present if the client supports tool use via tools and toolChoice parameters.
322322
*/
323323
tools: AssertObjectSchema.optional(),
324324
})
@@ -1283,8 +1283,11 @@ export const CreateMessageRequestParamsSchema = BaseRequestParamsSchema.extend({
12831283
*/
12841284
systemPrompt: z.string().optional(),
12851285
/**
1286-
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
1287-
* Values different from 'none' require clientCapabilities.sampling.context
1286+
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
1287+
* The client MAY ignore this request.
1288+
*
1289+
* Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
1290+
* declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
12881291
*/
12891292
includeContext: z.enum(['none', 'thisServer', 'allServers']).optional(),
12901293
temperature: z.number().optional(),
@@ -1300,13 +1303,14 @@ export const CreateMessageRequestParamsSchema = BaseRequestParamsSchema.extend({
13001303
*/
13011304
metadata: AssertObjectSchema.optional(),
13021305
/**
1303-
* Tool definitions for the LLM to use.
1304-
* Requires clientCapabilities.sampling.tools.
1306+
* Tools that the model may use during generation.
1307+
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
13051308
*/
13061309
tools: z.optional(z.array(ToolSchema)),
13071310
/**
1308-
* Controls tool usage behavior.
1309-
* Requires clientCapabilities.sampling.tools and tools parameter.
1311+
* Controls how the model uses tools.
1312+
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
1313+
* Default is `{ mode: "auto" }`.
13101314
*/
13111315
toolChoice: z.optional(ToolChoiceSchema),
13121316
});
@@ -1327,12 +1331,15 @@ export const CreateMessageResultSchema = ResultSchema.extend({
13271331
*/
13281332
model: z.string(),
13291333
/**
1330-
* The reason why sampling stopped.
1334+
* The reason why sampling stopped, if known.
1335+
*
13311336
* Standard values:
13321337
* - "endTurn": Natural end of the assistant's turn
13331338
* - "stopSequence": A stop sequence was encountered
13341339
* - "maxTokens": Maximum token limit was reached
13351340
* - "toolUse": The model wants to use one or more tools
1341+
*
1342+
* This field is an open string to allow for provider-specific stop reasons.
13361343
*/
13371344
stopReason: z.optional(
13381345
z.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z.string()),

0 commit comments

Comments
 (0)