$npx -y skills add pinecone-io/gemini-cli-extension --skill queryQuery integrated indexes using text with Pinecone MCP. IMPORTANT - This skill ONLY works with integrated indexes (indexes with built-in Pinecone embedding models like multilingual-e5-large). For standard indexes or advanced vector operations, use the CLI skill instead. Requires P
| 1 | # Pinecone Query Skill |
| 2 | |
| 3 | Search for records in Pinecone integrated indexes using natural language text queries via the Pinecone MCP server. |
| 4 | |
| 5 | ## What is this skill for? |
| 6 | |
| 7 | This skill provides a simple way to query **integrated indexes** (indexes with built-in Pinecone embedding models) using text queries. The MCP server automatically converts your text into embeddings and searches the index. |
| 8 | |
| 9 | ### Prerequisites |
| 10 | |
| 11 | **Required:** |
| 12 | 1. ✅ **Pinecone MCP server must be configured** - Check if MCP tools are available |
| 13 | 2. ✅ **PINECONE_API_KEY environment variable must be set** - Get a free API key at https://app.pinecone.io/?sessionType=signup |
| 14 | 3. ✅ **Index must be an integrated index** - Uses Pinecone embedding models (e.g., multilingual-e5-large, llama-text-embed-v2, pinecone-sparse-english-v0) |
| 15 | |
| 16 | ### When NOT to use this skill |
| 17 | |
| 18 | **Use the CLI skill instead if:** |
| 19 | - ❌ Your index is a standard index (no integrated embedding model) |
| 20 | - ❌ You need to query with custom vector values (not text) |
| 21 | - ❌ You need advanced vector operations (fetch by ID, list vectors, bulk operations) |
| 22 | - ❌ Your index uses third-party embedding models (OpenAI, HuggingFace, Cohere) |
| 23 | |
| 24 | **MCP Limitation**: The Pinecone MCP currently only supports integrated indexes. For all other use cases, use the Pinecone CLI skill. |
| 25 | |
| 26 | ## How it works |
| 27 | |
| 28 | Utilize Pinecone MCP's `search-records` tool to search for records within a specified Pinecone integrated index using a text query. |
| 29 | |
| 30 | ## Workflow |
| 31 | |
| 32 | **IMPORTANT: Before proceeding, verify the Pinecone MCP tools are available.** If MCP tools are not accessible: |
| 33 | - Inform the user that the Pinecone MCP server needs to be configured |
| 34 | - Check if `PINECONE_API_KEY` environment variable is set |
| 35 | - Direct them to the MCP setup documentation or the `help` skill |
| 36 | |
| 37 | 1. Parse the user's input for: |
| 38 | - `query` (required): The text to search for. |
| 39 | - `index` (required): The name of the Pinecone index to search. |
| 40 | - `namespace` (optional): The namespace within the index. |
| 41 | - `reranker` (optional): The reranking model to use for improved relevance. |
| 42 | |
| 43 | 2. If the user omits required arguments: |
| 44 | - If only the index name is provided, use the `describe-index` tool to retrieve available namespaces and ask the user to choose. |
| 45 | - If only a query is provided, use `list-indexes` to get available indexes, ask the user to pick one, then use `describe-index` for namespaces if needed. |
| 46 | |
| 47 | 3. Call the `search-records` tool with the gathered arguments to perform the search. |
| 48 | |
| 49 | 4. Format and display the returned results in a clear, readable table including field highlights (such as ID, score, and relevant metadata). |
| 50 | |
| 51 | --- |
| 52 | |
| 53 | ## Troubleshooting |
| 54 | |
| 55 | **`PINECONE_API_KEY` is required.** Get a free key at https://app.pinecone.io/?sessionType=signup |
| 56 | |
| 57 | If you get an access error, the key is likely missing. Ask the user to set it and restart their IDE or agent session: |
| 58 | - Terminal: `export PINECONE_API_KEY="your-key"` |
| 59 | - IDE without shell inheritance: add `PINECONE_API_KEY=your-key` to a `.env` file |
| 60 | |
| 61 | **IMPORTANT** At the moment, the query action can only be used with integrated indexes, which use hosted Pinecone embedding models to embed and search for data. |
| 62 | If a user attempts to query an index that uses a third party API model such as OpenAI, or HuggingFace embedding models, remind them that this capability is not available yet |
| 63 | with the Pinecone MCP server. |
| 64 | |
| 65 | - If required arguments are missing, prompt the user to supply them, using Pinecone MCP tools as needed (e.g., `list-indexes`, `describe-index`). |
| 66 | - Guide the user interactively through argument selection until the search can be completed. |
| 67 | - If an invalid value is provided for any argument (e.g., nonexistent index or namespace), surface the error and suggest valid options. |
| 68 | |
| 69 | ## Tools Reference |
| 70 | |
| 71 | - `search-records`: Search records in a given index with optional metadata filtering and reranking. |
| 72 | - `list-indexes`: List all available Pinecone indexes. |
| 73 | - `describe-index`: Get index configuration and namespaces. |
| 74 | - `describe-index-stats`: Get stats including record counts and namespaces. |
| 75 | - `rerank-documents`: Rerank returned documents using a specified reranking model. |
| 76 | - Ask the user interactively to clarify missing information when needed. |
| 77 | |
| 78 | --- |