|
40 | 40 | @mcp.tool( |
41 | 41 | description=""" |
42 | 42 | |
43 | | - Web Search API, works like Google Search. |
| 43 | + You MUST use this tool whenever you need to search for real-time or external information on the web. |
| 44 | + |
| 45 | + A web search API that works just like Google Search. |
44 | 46 | |
45 | 47 | Args: |
46 | | - query (str): The search query string. Use 3-5 keywords. Add the current date for time-sensitive queries, e.g. `latest iPhone 2025` |
| 48 | + query (str): The search query. Aim for 3-5 keywords for best results. For time-sensitive topics, include the current date (e.g. `latest iPhone 2025`). |
47 | 49 | |
48 | 50 | Search Strategy: |
49 | | - - If no valid results found, try changing search keywords |
| 51 | + - If no useful results are returned, try rephrasing your query with different keywords. |
50 | 52 | |
51 | 53 | Returns: |
52 | | - Text content with search results in JSON format. The response structure is: |
| 54 | + A JSON object containing the search results, structured as follows: |
53 | 55 | { |
54 | 56 | "organic": [ |
55 | 57 | { |
@@ -102,26 +104,28 @@ def web_search( |
102 | 104 | @mcp.tool( |
103 | 105 | description=""" |
104 | 106 | |
105 | | - A powerful LLM that can analyze and understand image content from files or URLs, follow your instruction. |
106 | | - Use this tool to understand images by LLM. |
107 | | - Only support jpeg, png, webp formats. Other formats like pdf/gif/psd/svg and so on are not supported. |
| 107 | + You MUST use this tool whenever you need to analyze, describe, or extract information from an image, |
| 108 | + including when you get an image from user input or any task-related image. |
| 109 | +
|
| 110 | + An LLM-powered vision tool that can analyze and interpret image content from local files or URLs based on your instructions. |
| 111 | + Only JPEG, PNG, and WebP formats are supported. Other formats (e.g. PDF, GIF, PSD, SVG) are not supported. |
108 | 112 |
|
109 | 113 | Args: |
110 | | - prompt (str): The text prompt describing what you want to analyze or extract from the image. |
111 | | - image_source (str): The source location of the image to analyze. |
| 114 | + prompt (str): A text prompt describing what you want to analyze or extract from the image. |
| 115 | + image_source (str): The location of the image to analyze. |
112 | 116 | Accepts: |
113 | 117 | - HTTP/HTTPS URL: "https://example.com/image.jpg" |
114 | 118 | - Local file path: |
115 | 119 | - Relative path: "images/photo.png" |
116 | 120 | - Absolute path: "/Users/username/Documents/image.jpg" |
117 | | - IMPORTANT: If the file path starts with @ symbol, you MUST remove the @ prefix before passing to this function. |
| 121 | + IMPORTANT: If the file path starts with an @ symbol, you MUST strip the @ prefix before passing it to this function. |
118 | 122 | For example: |
119 | | - - If you see "@Documents/photo.jpg", use "Documents/photo.jpg" |
120 | | - - If you see "@/Users/username/image.png", use "/Users/username/image.png" |
| 123 | + - "@Documents/photo.jpg" → "Documents/photo.jpg" |
| 124 | + - "@/Users/username/image.png" → "/Users/username/image.png" |
121 | 125 | Supported formats: JPEG, PNG, WebP |
122 | 126 | |
123 | 127 | Returns: |
124 | | - Text content with the image analysis result. |
| 128 | + A text description of the image analysis result. |
125 | 129 | """ |
126 | 130 | ) |
127 | 131 | def understand_image( |
|
0 commit comments