search-docs
Search Pinecone documentation to find relevant information quickly by entering a query, simplifying access to specific technical details.
Instructions
Search Pinecone documentation for relevant information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The text to search for. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"query": {
"description": "The text to search for.",
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
}
Implementation Reference
- src/tools/docs/search-docs.ts:22-36 (handler)Handler function for the 'search-docs' tool. Connects to the Pinecone docs MCP server and calls its 'get_context' tool.server.tool('search-docs', INSTRUCTIONS, SCHEMA, async ({query}) => { const httpTransport = new StreamableHTTPClientTransport(new URL(DOCS_MCP_URL)); const client = new Client({ name: 'pinecone-docs', version: PINECONE_MCP_VERSION, }); await client.connect(httpTransport); return (await client.callTool({ name: 'get_context', arguments: {query}, })) as SearchDocsResult; });
- src/tools/docs/search-docs.ts:8-12 (schema)Instructions and Zod input schema for the 'search-docs' tool.const INSTRUCTIONS = 'Search Pinecone documentation for relevant information'; const SCHEMA = { query: z.string().describe('The text to search for.'), };
- src/tools/docs/search-docs.ts:21-37 (registration)Registration of the 'search-docs' tool via the addSearchDocsTool helper function called from docs/index.ts and ultimately from src/server.ts.export function addSearchDocsTool(server: McpServer) { server.tool('search-docs', INSTRUCTIONS, SCHEMA, async ({query}) => { const httpTransport = new StreamableHTTPClientTransport(new URL(DOCS_MCP_URL)); const client = new Client({ name: 'pinecone-docs', version: PINECONE_MCP_VERSION, }); await client.connect(httpTransport); return (await client.callTool({ name: 'get_context', arguments: {query}, })) as SearchDocsResult; }); }
- src/tools/docs/index.ts:4-6 (helper)Helper function addDocsTools that calls addSearchDocsTool to register the tool.export default async function addDocsTools(server: McpServer) { addSearchDocsTool(server); }
- src/server.ts:45-46 (registration)Top-level call to addDocsTools during server setup, which triggers the tool registration.await addDocsTools(server); addDatabaseTools(server);