[Docs] Fix invented Python APIs in advanced topics and pin doc dependencies #1231
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1231"
general
weight: 0.35
skytin1004
Why
05-AdvancedTopics/mcp-realtimestreamingtaught Python against modules that never existed in the MCP SDK (mcp.core.*,ServerOptions, …).05-AdvancedTopics/mcp-foundry-agent-integrationpinnedmcp==1.11.0, which the notebook never imports, and installed the Azure packages unpinned with-U. Theazure-ai-projectsAPI has also changed between major versions.11-MCPServerHandsOnLabsinstalled test and security tools unpinned.pytest -qin a folder with no tests (exit code 5), and the docs still listed Python 3.8+ / Node.js 18+ as minimums.mcpneeds Python ≥ 3.10, Node 18 is end-of-life, and the current Inspector requires Node ≥ 22.19.What changed
mcp-realtimestreaming: rewrote the "MCP in Various Data Streaming Frameworks" section against the realmcp2.3.0 API. It explains the two ways to combine MCP with a broker: put the broker behind an MCP server, or use it as the transport.MCPServerwithpublish_readingandconsume_window. The consumer streams each event withctx.report_progress, commits offsets after processing, and returns a structured summary over Streamable HTTP. The matchingmcp.Clientreceives the progress throughprogress_callback.Server(on_list_tools/on_call_tool) and bymcp.Client.mcp>=2.3.0,<3,aiokafka>=0.15.0,<1(Python 3.11+, noted in the README),pulsar-client>=3.13.0,<4.mcp-foundry-agent-integration(Python README sections andmcp_support_python.ipynb)azure-ai-projects2.x API:agents.create_versionwithPromptAgentDefinitionandMCPTool(require_approval="always"), thenget_openai_client(),conversations.create, andresponses.createwithagent_reference.mcp_approval_request/McpApprovalResponse; the agent version is deleted at the end.mcp==1.11.0andazure-ai-agents==1.1.0b4. Now pinned:azure-ai-projects>=2.10.0,<3,azure-identity>=1.27.0,<2,openai>=3.44.0,<4. The notebook uses%pipand has its outputs cleared.11-MCPServerHandsOnLabsCI examples (10-Deployment, 12-Best-Practices):pytest>=9.2.0,<10,pytest-cov>=7.1.0,<8,pytest-asyncio>=1.4.1,<2,bandit[toml]>=1.9.4,<2. The labs'mcp1.x choice is unchanged, since it follows the external sample repo.AGENTS.md
cd 03-GettingStarted/samples/python && python -m pip install -r requirements.txt "pytest>=9.2.0,<10" && python -m pytest -q, which runs real tests.Minimum versions in the docs
11-MCPServerHandsOnLabsREADME and 03-Setup, andpython_requiresin 06-CommunityContributions.13-mcp-inspectornow says 22.19+ (from@modelcontextprotocol/inspector'sengines).05-stdio-serverTypeScript README and the module 10 table say 22 LTS.Testing
2 passed, exit 0.mcp-realtimestreaming: all 5 Python blocks parse and import withmcp2.3.0,aiokafka0.15.0 andpulsar-client3.13.0.- The Kafka server and client ran as separate processes over Streamable HTTP: 4 progress notifications, then the structured summary.
- The Pulsar-transport server and client ran
tools/listandtools/callend to end.- No broker was available here, so these runs used small in-memory or file-backed stand-ins for
aiokafka/pulsar.asyncio. The calls they mirror were checked against the real library signatures.- Imports, config, client and tool construction ran for real against
azure-ai-projects2.10.0,azure-identity1.27.0, andopenai3.44.0.- The agent create/delete calls ran against stubs matching the real SDK signatures, and the OpenAI traffic went to a mock transport so the real
openaitypes parsedmcp_approval_request/mcp_call.- No Azure endpoint was contacted.
Not changed
06-CommunityContributionsPython example, which still uses an inventedmcp_toolspackage (onlypython_requireswas fixed).trivy-action@master,codeql-action@v2).03-GettingStarted/05-stdio-server/solution/typescript/package.jsonhas@modelcontextprotocol/sdk>=1.26.0with no major cap; that will be covered by the TypeScript SDK update.🤖 Generated with Claude Code