web_search
Search the web for information using a query, retrieving results from the internet through the Tavily API with Polygon integration.
Instructions
Search the web for information about the given query
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "web_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:13-17 (handler)The handler function for the 'web_search' MCP tool. It uses a TavilyClient instance to perform a web search based on the provided query and returns the search results.
@mcp.tool() def web_search(query: str) -> str: """Search the web for information about the given query""" search_results = client.get_search_context(query=query) return search_results