docs: improve discoverability and docs for the instructions parameter

Closed
QI
2mo ago
+48-0

Summary

Improve discoverability and documentation of the instructions parameter on
MCPServer (which flows through to InitializeResult.instructions).

Closes #1464

Changes

  • Added a docstring to the instructions parameter in MCPServer.__init__,
    explaining its purpose and hinting at tool-grouping / workflow use cases.
  • Added a new "Server instructions" section to docs/get-started/first-steps.md
    with a concrete example showing how to use instructions to express tool
    grouping and ordering guidance.
  • Added docs_src/first_steps/tutorial002.py as the referenced example.

Checklist

  • Linked issue: #1464 (documentation, ready for work, P1)
  • Change is minimal and focused
  • Docs example follows the existing --8<-- include pattern
  • No code logic changes (docs + docstring only)

šŸ¤– AI-assisted: This PR was drafted with AI assistance. I (the contributor)
have reviewed the diff, understand the change, and confirm the example
accurately demonstrates the instructions parameter.