Skip to content

fix(seo): correct OpenAI Agents SDK tutorial with real Python/API code#165

Open
BuyWhere wants to merge 4 commits into
mainfrom
buzz/blog-posts-2026-06-18
Open

fix(seo): correct OpenAI Agents SDK tutorial with real Python/API code#165
BuyWhere wants to merge 4 commits into
mainfrom
buzz/blog-posts-2026-06-18

Conversation

@BuyWhere

Copy link
Copy Markdown
Owner

What this fixes

The blog post openai-agents-sdk-buywhere-mcp-tutorial was drafted with fabricated code:

  • Wrong ecosystem: Used fictional npm packages (openai-agents, @buywhere/mcp-server) and TypeScript imports — but OpenAI Agents SDK is Python-only
  • Fake API: createBuyWhereMCPServer() does not exist; BuyWhere MCP is accessed via its HTTP API
  • Wrong tools: Referenced get_price_history, get_price_alerts, compare_prices — actual BuyWhere tools are search_products, compare_products, get_deals, get_product, list_categories, find_best_price

Rewrite includes

  • Python setup with pip install openai-agents httpx python-dotenv
  • Real @function_tool decorated functions calling BuyWhere HTTP MCP API
  • Correct tool list matching BuyWhere MCP schema from server.json
  • Accurate dependency links (OpenAI Agents SDK Python docs, BuyWhere API docs)

Publishes this overdue blog post to the buzz/blog-posts-2026-06-18 branch alongside the other queued posts.

BuyWhere added 4 commits June 18, 2026 22:11
…ce api-catalog

- Add route handler for /.well-known/llms serving llms.txt with proper Content-Type
- Add public/agents.json for AI agent discovery metadata
- Add public/apps.json for app listing metadata
- Enhance api-catalog route with MCP tools, auth, pricing, regions, categories
- Follow existing inline Response.json pattern from the repo

BUY-45795 (Traffic growth — 2,033→25,000 monthly visits)
…ence

The static public/.well-known/api-catalog file was served by Next.js
with application/octet-stream content-type and lacked MCP tools, auth
details, pricing, and regions that the route handler provides.
Removing it lets the route handler at src/app/.well-known/api-catalog/
serve the enhanced JSON with proper application/json content-type.
The previous draft used fictional npm packages (openai-agents,
@buywhere/mcp-server) and TypeScript imports that don't exist.

Fixed to use:
- OpenAI Agents SDK (Python) with proper pip install
- BuyWhere HTTP MCP API with httpx
- Real function_tool decorators matching actual BuyWhere tools
- Accurate tool list matching the BuyWhere MCP API schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant