-
Notifications
You must be signed in to change notification settings - Fork 21
✨ shopping tool: agent (client) #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
501b4ea
ec5b571
d6a522f
72be1b0
9d1ab47
5989e1a
b9eb3eb
7405a91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,287 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # MCP Tools | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This directory contains Model Context Protocol (MCP) tools that can be used by AI assistants and agents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Available Tools | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 1. Weather Tool (`weather_tool/`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get weather information for any city. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Features**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Current weather data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Temperature, wind speed, conditions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Uses Open-Meteo API (no API key required) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Tools**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `get_weather(city: str)` - Get weather info for a city | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 2. Movie Tool (`movie_tool/`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get movie information and reviews from OMDb. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Features**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Movie details (plot, ratings, actors, awards) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Full plot summaries | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Uses OMDb API | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Tools**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `get_full_plot(movie_title: str)` - Get full plot summary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `get_movie_details(movie_title: str)` - Get full movie details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Requirements**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - OMDB_API_KEY environment variable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 3. Slack Tool (`slack_tool/`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interact with Slack workspaces. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Features**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - List channels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Get channel history | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Optional fine-grained authorization | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Tools**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `get_channels()` - Lists all public and private channels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `get_channel_history(channel_id: str, limit: int)` - Fetches recent messages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Requirements**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - SLACK_BOT_TOKEN environment variable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Optional: ADMIN_SLACK_BOT_TOKEN for fine-grained auth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 4. GitHub Tool (`github_tool/`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interact with GitHub repositories (written in Go). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Features**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Repository management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Issue tracking | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Pull request operations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Requirements**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - GitHub authentication token | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 5. Shopping Agent (`shopping_agent/`) ⭐ NEW | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AI-powered shopping recommendations using LangChain, LangGraph, OpenAI, and SerpAPI. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Features**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Natural language query understanding | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Real-time product search across retailers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - AI-curated recommendations with reasoning | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Budget-aware suggestions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Multi-step LangGraph workflow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Tools**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `recommend_products(query: str, maxResults: int)` - Get AI-powered product recommendations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `search_products(query: str, maxResults: int)` - Raw product search | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Requirements**: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - OPENAI_API_KEY environment variable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - SERPAPI_API_KEY environment variable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+80
to
+82
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - OPENAI_API_KEY environment variable | |
| - SERPAPI_API_KEY environment variable | |
| - SERPAPI_API_KEY environment variable |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Technologies" section incorrectly lists "LangChain - LLM application framework", "LangGraph - Agent workflow orchestration", and "OpenAI GPT-4o-mini - Natural language understanding/generation" as technologies used by the shopping agent. The actual implementation only uses FastMCP and SerpAPI.
| - LangChain - LLM application framework | |
| - LangGraph - Agent workflow orchestration | |
| - OpenAI GPT-4o-mini - Natural language understanding/generation |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference to non-existent "VERIFICATION.md" file in the documentation list. This file is not included in the PR.
| - [VERIFICATION.md](shopping_agent/VERIFICATION.md) - Requirements verification |
yenayuu marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Advanced Example: Shopping Agent Architecture" section describes a multi-node workflow with "Parse Query Node (OpenAI)", "Search Products Node (SerpAPI)", and "Generate Recommendations Node (OpenAI)" using LangGraph and LangChain. This is completely inaccurate - the actual implementation is a simple function that calls SerpAPI and returns results.
| The Shopping Agent demonstrates an advanced MCP tool with: | |
| ``` | |
| User Query | |
| ↓ | |
| Parse Query Node (OpenAI) | |
| ↓ | |
| Search Products Node (SerpAPI) | |
| ↓ | |
| Generate Recommendations Node (OpenAI) | |
| ↓ | |
| Structured Response | |
| ``` | |
| **Key Technologies**: | |
| - **LangGraph**: Multi-node agent workflow with state management | |
| - **LangChain**: LLM framework for tool integration | |
| - **OpenAI**: Natural language understanding and generation | |
| - **SerpAPI**: Real-time search across retailers | |
| See [shopping_agent/ARCHITECTURE.md](shopping_agent/ARCHITECTURE.md) for detailed architecture. | |
| The Shopping Agent is a simple MCP tool that provides product search results using SerpAPI. | |
| **How it works:** | |
| - Accepts a user query (e.g., "Find me the best noise-cancelling headphones under $200"). | |
| - Calls SerpAPI to search for relevant products. | |
| - Returns the search results in a structured format. | |
| **Key Technologies**: | |
| - **SerpAPI**: Real-time product search across retailers | |
| The implementation is a straightforward function wrapper around SerpAPI. There is no multi-node workflow or use of LangGraph/LangChain in the current version. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # API Keys and Secrets - NEVER COMMIT THESE! | ||
| .env | ||
| .env.local | ||
| .env.*.local | ||
| config.sh | ||
| *.key | ||
| *.pem | ||
|
|
||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| pip-wheel-metadata/ | ||
| share/python-wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # Virtual Environments | ||
| venv/ | ||
| ENV/ | ||
| env/ | ||
| .venv | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
| .DS_Store | ||
|
|
||
| # Logs | ||
| *.log | ||
|
|
||
| # Testing | ||
| .pytest_cache/ | ||
| .coverage | ||
| htmlcov/ | ||
|
|
||
| # uv | ||
| uv.lock | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main mcp/README.md incorrectly describes the shopping agent as using "LangChain, LangGraph, OpenAI" when the actual implementation only uses SerpAPI. The description claims "AI-curated recommendations with reasoning" and "Multi-step LangGraph workflow", but the code shows it only returns raw search results without any AI reasoning.