From a7315238b0f1fc02e7bade151db86256588d0450 Mon Sep 17 00:00:00 2001 From: Uomocapra <141239189+Uomocapra@users.noreply.github.com> Date: Sat, 27 Jun 2026 16:24:31 +0800 Subject: [PATCH 1/4] docs: clarify weather tool selection flow --- docs/docs/learn/server-concepts.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/learn/server-concepts.mdx b/docs/docs/learn/server-concepts.mdx index 9942ab550..1e7330045 100644 --- a/docs/docs/learn/server-concepts.mdx +++ b/docs/docs/learn/server-concepts.mdx @@ -268,7 +268,9 @@ Consider a personalized AI travel planner application, with three connected serv The AI first reads all selected resources to gather context - identifying available dates from the calendar, learning preferred airlines and hotel types from travel preferences, and discovering previously enjoyed locations from past trips. - Using this context, the AI then executes a series of Tools: + The prompt template starts the planning workflow, but it does not have to list every tool call in advance. The AI application can see the tools exposed by connected servers and decides which ones are useful for the user's goal. In this example, because a Weather Server is connected and weather can affect travel plans, the AI chooses to call `checkWeather()`. If the Weather Server were not connected, that tool would not be available, so the AI would need to continue without it, ask the user to connect a weather source, or use another available source of weather context. + + Using the available context and tools, the AI then executes a series of Tools: - `searchFlights()` - Queries airlines for NYC to Barcelona flights - `checkWeather()` - Retrieves climate forecasts for travel dates From 2226f112a89f14f17f3aab4adfcce7b9f7218f60 Mon Sep 17 00:00:00 2001 From: Uomocapra <141239189+Uomocapra@users.noreply.github.com> Date: Wed, 1 Jul 2026 10:05:12 +0800 Subject: [PATCH 2/4] docs: apply weather tool flow review wording --- docs/docs/learn/server-concepts.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/learn/server-concepts.mdx b/docs/docs/learn/server-concepts.mdx index 1e7330045..2abf21d8a 100644 --- a/docs/docs/learn/server-concepts.mdx +++ b/docs/docs/learn/server-concepts.mdx @@ -268,9 +268,10 @@ Consider a personalized AI travel planner application, with three connected serv The AI first reads all selected resources to gather context - identifying available dates from the calendar, learning preferred airlines and hotel types from travel preferences, and discovering previously enjoyed locations from past trips. - The prompt template starts the planning workflow, but it does not have to list every tool call in advance. The AI application can see the tools exposed by connected servers and decides which ones are useful for the user's goal. In this example, because a Weather Server is connected and weather can affect travel plans, the AI chooses to call `checkWeather()`. If the Weather Server were not connected, that tool would not be available, so the AI would need to continue without it, ask the user to connect a weather source, or use another available source of weather context. + Using this context, the AI then executes the prompt provided by the AI application. In our example, the AI application exposes the weather tools from the connected MCP weather server to the model. Because weather can affect travel plans, the AI chooses to call `checkWeather()` when interpreting the prompt. + + As a result the AI executes a series of tools: - Using the available context and tools, the AI then executes a series of Tools: - `searchFlights()` - Queries airlines for NYC to Barcelona flights - `checkWeather()` - Retrieves climate forecasts for travel dates From c4c367f9f58296a7053f5c78a52fd02bfbb56a49 Mon Sep 17 00:00:00 2001 From: Paul Carleton Date: Mon, 27 Jul 2026 15:20:44 +0100 Subject: [PATCH 3/4] schema: fix 2025-11-25 NumberSchema min/max/default to number in generated JSON The TypeScript source declares these fields as `number`, but typescript-json-schema emits `integer` without an explicit hint, so the released 2025-11-25 schema.json rejects fractional values like `default: 95.5` that the schema.ts source of truth allows. Add the same @TJS-type annotations #2710 applied to the draft schema and regenerate. Same shape as 357adac4, which corrected Task.ttl nullability in the released 2025-11-25 generated schema when it contradicted schema.ts. No-Verification-Needed: JSDoc-only source edit plus script-regenerated schema.json --- schema/2025-11-25/schema.json | 6 +++--- schema/2025-11-25/schema.ts | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/schema/2025-11-25/schema.json b/schema/2025-11-25/schema.json index 9d2e662a2..c722dd45b 100644 --- a/schema/2025-11-25/schema.json +++ b/schema/2025-11-25/schema.json @@ -2107,16 +2107,16 @@ "NumberSchema": { "properties": { "default": { - "type": "integer" + "type": "number" }, "description": { "type": "string" }, "maximum": { - "type": "integer" + "type": "number" }, "minimum": { - "type": "integer" + "type": "number" }, "title": { "type": "string" diff --git a/schema/2025-11-25/schema.ts b/schema/2025-11-25/schema.ts index b734ae30e..850a083fa 100644 --- a/schema/2025-11-25/schema.ts +++ b/schema/2025-11-25/schema.ts @@ -2254,8 +2254,17 @@ export interface NumberSchema { type: "number" | "integer"; title?: string; description?: string; + /** + * @TJS-type number + */ minimum?: number; + /** + * @TJS-type number + */ maximum?: number; + /** + * @TJS-type number + */ default?: number; } From 2ebb8060268e177b22598b403d6ba6764bb899ac Mon Sep 17 00:00:00 2001 From: Paul Carleton Date: Mon, 27 Jul 2026 18:41:05 +0100 Subject: [PATCH 4/4] schema: fix 2025-06-18 NumberSchema min/max to number in generated JSON Same generator artifact as 2025-11-25: schema.ts declares number, the generated JSON says integer. 2025-06-18 has no default field on NumberSchema, so only minimum/maximum change. No-Verification-Needed: JSDoc-only source edit plus script-regenerated schema.json --- schema/2025-06-18/schema.json | 4 ++-- schema/2025-06-18/schema.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/schema/2025-06-18/schema.json b/schema/2025-06-18/schema.json index 775dc9917..15c5d5127 100644 --- a/schema/2025-06-18/schema.json +++ b/schema/2025-06-18/schema.json @@ -1399,10 +1399,10 @@ "type": "string" }, "maximum": { - "type": "integer" + "type": "number" }, "minimum": { - "type": "integer" + "type": "number" }, "title": { "type": "string" diff --git a/schema/2025-06-18/schema.ts b/schema/2025-06-18/schema.ts index 0df081ee2..b7aa52452 100644 --- a/schema/2025-06-18/schema.ts +++ b/schema/2025-06-18/schema.ts @@ -1504,7 +1504,13 @@ export interface NumberSchema { type: "number" | "integer"; title?: string; description?: string; + /** + * @TJS-type number + */ minimum?: number; + /** + * @TJS-type number + */ maximum?: number; }