mirror of
https://github.com/tavily-ai/tavily-mcp
synced 2026-06-21 14:10:42 +00:00
Add exact_match parameter to tavily_search tool
- Add exact_match optional boolean parameter to search tool definition - Pass exact_match through handler to search API request - Bump version to 0.2.18 - Add usage example in README TAV-5096
This commit is contained in:
@@ -180,6 +180,15 @@ Before you begin, ensure you have:
|
||||
npx -y tavily-mcp@latest
|
||||
```
|
||||
|
||||
## Exact Match Search
|
||||
|
||||
Use the `exact_match` parameter to only return results containing the exact phrase(s) inside quotes in your query:
|
||||
|
||||
```js
|
||||
// Only return results containing the exact phrase "John Smith"
|
||||
search({ query: '"John Smith" CEO Acme Corp', exactMatch: true })
|
||||
```
|
||||
|
||||
## Default Parameters Configuration ⚙️
|
||||
|
||||
You can set default parameter values for the `tavily-search` tool using the `DEFAULT_PARAMETERS` environment variable. This allows you to configure default search behavior without specifying these parameters in every request.
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "tavily-mcp",
|
||||
"version": "0.2.17",
|
||||
"version": "0.2.18",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tavily-mcp",
|
||||
"version": "0.2.17",
|
||||
"version": "0.2.18",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "1.26.0",
|
||||
|
||||
+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 from 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