You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`PINECONE_API_KEY`| Yes | - | Your Pinecone API key|
64
+
|`PINECONE_INDEX_NAME`| No |`rag-hybrid`| Pinecone index name (dense + sparse for hybrid)|
65
+
|`PINECONE_RERANK_MODEL`| No |`bge-reranker-v2-m3`| Reranking model|
66
+
|`PINECONE_READ_ONLY_MCP_LOG_LEVEL`| No |`INFO`| Logging level|
67
67
68
68
### Claude Desktop Configuration
69
69
@@ -143,11 +143,11 @@ node node_modules/@will-cppa/pinecone-read-only-mcp/dist/index.js --api-key YOUR
143
143
### Available Options
144
144
145
145
```
146
-
--api-key TEXT Pinecone API key (or set PINECONE_API_KEY env var)
147
-
--index-name TEXT Pinecone index name [default: rag-hybrid]
148
-
--rerank-model TEXT Reranking model [default: bge-reranker-v2-m3]
149
-
--log-level TEXT Logging level [default: INFO]
150
-
--help, -h Show help message
146
+
--api-key TEXT Pinecone API key (or set PINECONE_API_KEY env var)
147
+
--index-name TEXT Pinecone index name [default: rag-hybrid]
148
+
--rerank-model TEXT Reranking model [default: bge-reranker-v2-m3]
149
+
--log-level TEXT Logging level [default: INFO]
150
+
--help, -h Show help message
151
151
```
152
152
153
153
## Deployment
@@ -338,6 +338,45 @@ Returns the **unique document count** matching a metadata filter and semantic qu
338
338
}
339
339
```
340
340
341
+
### `keyword_search`
342
+
343
+
Performs **keyword (lexical/sparse-only)** search over the dedicated sparse index (default: `rag-hybrid-sparse`, i.e. `{PINECONE_INDEX_NAME}-sparse`). Use for exact or keyword-style queries. Does not use the dense index or semantic reranking. Call `list_namespaces` first to discover namespaces; `suggest_query_params` is optional.
|`namespace`| string | Yes | - | Namespace to search (use `list_namespaces` to discover) |
351
+
|`top_k`| integer | No |`10`| Number of results to return (1-100) |
352
+
|`metadata_filter`| object | No | - | Optional metadata filter (same operators as `query`) |
353
+
|`fields`| string[]| No | - | Optional field names to return; omit for all fields |
354
+
355
+
**Returns:** JSON with `status`, `query`, `namespace`, `index` (sparse index name), `result_count`, and `results` (ids, metadata, scores). Result rows match the `query` tool shape (e.g. `paper_number`, `title`, `author`, `url`, `content`, `score`, `reranked: false`).
356
+
357
+
**Example response:**
358
+
359
+
```json
360
+
{
361
+
"status": "success",
362
+
"query": "contracts C++",
363
+
"namespace": "wg21-papers",
364
+
"index": "rag-hybrid-sparse",
365
+
"result_count": 5,
366
+
"results": [
367
+
{
368
+
"paper_number": "P0548",
369
+
"title": "Contracts for C++",
370
+
"author": "John Doe",
371
+
"url": "https://...",
372
+
"content": "...",
373
+
"score": 0.85,
374
+
"reranked": false
375
+
}
376
+
]
377
+
}
378
+
```
379
+
341
380
### `query`
342
381
343
382
Performs hybrid semantic search over the specified namespace in the Pinecone index with optional metadata filtering. For **count** questions, use the `count` tool instead.
@@ -470,6 +509,18 @@ npm run build
470
509
npm test
471
510
```
472
511
512
+
### Testing the keyword_search tool
513
+
514
+
1.**Connectivity and keyword search (script):**
515
+
Run the search test script (includes a keyword search step against the sparse index):
516
+
```bash
517
+
PINECONE_API_KEY=your-key npm run test:search
518
+
```
519
+
If the sparse index (`rag-hybrid-sparse` by default) does not exist or has no data, the keyword search step is skipped with a warning.
520
+
521
+
2.**Via MCP client:**
522
+
Start the server and call the `keyword_search` tool with `query_text`, `namespace` (from `list_namespaces`), and optional `top_k` or `metadata_filter`. Response shape is the same as the `query` tool (e.g. `results` with ids, metadata, scores; `reranked` is always `false`).
Copy file name to clipboardExpand all lines: src/constants.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ Features:
45
45
- Count: Use the count tool for "how many X?" questions; it uses semantic search only and minimal fields (no content) for performance, returning unique document count.
46
46
- URL Generation: Use generate_urls to synthesize URLs for namespaces that support it when metadata lacks url.
47
47
- Document reassembly: Use query_documents to get whole documents (chunks grouped and merged by document_number/doc_id/url) for content analysis or summarization.
48
+
- Keyword search: Use keyword_search to query the sparse index (default: rag-hybrid-sparse) for lexical/keyword-only retrieval without reranking.
48
49
49
50
Usage:
50
51
1. Use list_namespaces (cached for 30 minutes) to discover available namespaces in the index
0 commit comments