Skip to content

Conversation

MariumAfzal2703
Copy link
Contributor

This PR fixes missing imports in the MCP documentation (mcp.md).
Several code snippets use Agent, Runner, ModelSettings, or MCPServer* classes without including the corresponding import statements. This makes the examples fail with NameError when copied and run directly.

Changes included

  • Added missing Agent, Runner, and ModelSettings imports in the SSE MCP servers example.
  • Added missing Agent, Runner, and MCPServerStdio imports in the Stdio MCP servers example.
  • Added missing Agent import in the Prompts example.
  • Ensured all snippets are runnable out of the box with consistent imports.

Why this matters

  • Improves developer experience by making examples copy-paste runnable.
  • Prevents confusion for new users who encounter NameError.
  • Keeps documentation consistent and complete.

@seratch seratch added the documentation Improvements or additions to documentation label Sep 12, 2025
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Thanks for improving this!

@seratch seratch enabled auto-merge (squash) September 12, 2025 01:22
@seratch seratch merged commit 7c497c9 into openai:main Sep 12, 2025
5 checks passed
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.

2 participants