mirror of
https://github.com/tavily-ai/tavily-mcp
synced 2026-06-21 14:10:42 +00:00
feat: add exact_match parameter to tavily_search tool
- Add exact_match boolean parameter to tavily_search inputSchema - Pass exact_match through tool handler to search method - Include exact_match in search API request payload - Update README with exact_match usage example - Bump version to 0.2.18 The exact_match parameter, when set to true, restricts results to those containing the exact quoted phrase(s) in the query. Refs: TAV-5096
This commit is contained in:
@@ -190,6 +190,15 @@ You can set default parameter values for the `tavily-search` tool using the `DEF
|
||||
export DEFAULT_PARAMETERS='{"include_images": true}'
|
||||
```
|
||||
|
||||
### Exact Match Search
|
||||
|
||||
Use the `exact_match` parameter to only return results containing the exact phrase(s) in quotes within your query:
|
||||
|
||||
```js
|
||||
// Only return results containing the exact phrase "John Smith"
|
||||
tavily_search({ query: '"John Smith" CEO Acme Corp', exact_match: true })
|
||||
```
|
||||
|
||||
### Example usage from Client
|
||||
```json
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tavily-mcp",
|
||||
"version": "0.2.17",
|
||||
"version": "0.2.18",
|
||||
"mcpName": "io.github.tavily-ai/tavily-mcp",
|
||||
"description": "MCP server for advanced web search using Tavily",
|
||||
"repository": {
|
||||
|
||||
+8
-2
@@ -73,7 +73,7 @@ class TavilyClient {
|
||||
this.server = new Server(
|
||||
{
|
||||
name: "tavily-mcp",
|
||||
version: "0.2.10",
|
||||
version: "0.2.18",
|
||||
},
|
||||
{
|
||||
capabilities: {
|
||||
@@ -226,6 +226,10 @@ class TavilyClient {
|
||||
type: "boolean",
|
||||
description: "Whether to include the favicon URL for each result",
|
||||
default: false
|
||||
},
|
||||
exact_match: {
|
||||
type: "boolean",
|
||||
description: "If true, only return results containing the exact phrase(s) in quotes within the query"
|
||||
}
|
||||
},
|
||||
required: ["query"]
|
||||
@@ -453,7 +457,8 @@ class TavilyClient {
|
||||
country: args.country,
|
||||
include_favicon: args.include_favicon,
|
||||
start_date: args.start_date,
|
||||
end_date: args.end_date
|
||||
end_date: args.end_date,
|
||||
exact_match: args.exact_match
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -577,6 +582,7 @@ class TavilyClient {
|
||||
include_favicon: params.include_favicon,
|
||||
start_date: params.start_date,
|
||||
end_date: params.end_date,
|
||||
exact_match: params.exact_match,
|
||||
api_key: API_KEY,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user