An MCP server that provides web search capabilities via SerpAPI and integrates with LangChain for RAG (Retrieval-Augmented Generation) and LLM-based question answering on PDF documents
Single tool 'search_web' has a clear action verb and basic schema with Zod validation. However, the description (127 chars) is generic and lacks context on when to use it vs alternatives. Parameters lack detailed constraints (e.g., num range, query format). Output is raw JSON dump with no field documentation, making it hard for LLMs to extract relevant data. Error handling is minimal, only catches exceptions without recovery guidance. No pagination support despite potentially large result sets.
Search the web using SerpAPI. Returns search results including organic results, snippets, and related information.
Output schema undocumented. Tool returns raw JSON.stringify(results) with no field descriptions. LLMs cannot determine which fields to extract or how to chain results to downstream tools.
Parameter 'num' lacks constraints. No min/max bounds specified. LLMs could pass 0, negative, or absurdly large values (e.g., 10000) causing API failures or timeouts.
No pagination support. SerpAPI results can be large; tool accepts 'num' but no offset/page parameter. Returning all results in one call risks context window exhaustion.
Error handling is generic. Catches errors but returns only error.message with no recovery guidance. LLM cannot determine if error is retryable, user-fixable, or fatal.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 47 | 2026-07-28+ | v2 |
SERPAPI_KEY exposed as environment variable without validation. If key is missing, tool fails silently. No permission scoping or audit trail for API calls.