docs: clarify weather tool selection flow#2981
Open
Uomocapra wants to merge 2 commits into
Open
Conversation
dsp-ant
requested changes
Jun 29, 2026
dsp-ant
left a comment
Member
There was a problem hiding this comment.
I appreciate you are trying to clarify this. I made some modifications that I do believe make it more clear. I think the current proposal has some incorrectness in what the AI application exposes and where the AI model reasons about a prompt.
Comment on lines
+271
to
+273
| 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: |
Member
There was a problem hiding this comment.
Suggested change
| 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: | |
| 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: |
Author
There was a problem hiding this comment.
Applied the suggested wording in 2226f11. CI is green now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This clarifies the travel planning example in
server-conceptsby explaining why the AI choosescheckWeather(), how that relates to the connected Weather Server, and what should happen if that server is not available.Fixes #2966.
Testing
I checked the changed page with
pnpm exec prettier --check docs/docs/learn/server-concepts.mdx,pnpm run check:docs:js-comments, andgit diff --check.The full
pnpm run check:docs:formatstill reports existing formatting warnings across many unrelated markdown files, so I did not reformat the repository.AI disclosure
This documentation update was prepared with AI assistance. I reviewed the issue, repository policy, the surrounding page context, and the final diff before opening the PR.