Skip to content

docs: clarify weather tool selection flow#2981

Open
Uomocapra wants to merge 2 commits into
modelcontextprotocol:mainfrom
Uomocapra:codex/clarify-weather-tool-flow
Open

docs: clarify weather tool selection flow#2981
Uomocapra wants to merge 2 commits into
modelcontextprotocol:mainfrom
Uomocapra:codex/clarify-weather-tool-flow

Conversation

@Uomocapra

Copy link
Copy Markdown

Summary

This clarifies the travel planning example in server-concepts by explaining why the AI chooses checkWeather(), 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, and git diff --check.

The full pnpm run check:docs:format still 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.

@Uomocapra Uomocapra requested review from a team as code owners June 27, 2026 08:25
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 27, 2026

@dsp-ant dsp-ant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread docs/docs/learn/server-concepts.mdx Outdated
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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied the suggested wording in 2226f11. CI is green now.

@localden localden requested a review from dsp-ant July 10, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gap in "The Complete Flow" documentation on /docs/learn/server-concepts

2 participants