Single tool server with adequate but incomplete definition quality. The search_web tool has a clear verb-based name and reasonable schema with proper typing, but critical gaps exist in descriptions, parameter documentation, and error handling guidance. The tool description is functional but lacks context on when/why to use it vs alternatives. Parameters lack actionable constraints and dependency hints. Output schema is undocumented, LLMs cannot predict return structure for downstream reasoning. Error handling exists but provides no recovery guidance. Security baseline met (API key injected via environment), but no rate limiting or input sanitization documented.
Tools (1)
search_webread onlyauthsource verified68/100
Search the web using OpenRouter and return relevant results
Output schema undocumented, LLMs cannot predict return structure or plan downstream steps. No documentation of what fields SearchWebResult contains, field types, or pagination behavior.
Tool description lacks actionable context. '217-char description does not state WHEN to use this tool vs other search options, WHAT format results are in, or consequences of calling it. Missing dependency hints (e.g., 'This tool requires OpenRouter API key to be configured').
Parameter descriptions lack actionable constraints. 'focus' parameter has enum constraint visible in schema but description does not explain what 'technical' vs 'development' vs 'general' actually filter, LLMs must guess the semantic difference. 'num_results' description states range (1-10) but not what happens at boundary values or why 10 is the cap.
search_web
Recommendations
Add comprehensive output schema documentation to ListToolsRequest response. Define SearchWebResult structure with explicit fields, types, and example values. E.g., 'Returns {results: [{title: string, url: string, snippet: string, source: string}], total_results: number, focus_applied: string}' in tool description or separate schema property.
Expand tool description to 150-250 chars covering: WHAT (web search across technical domains), WHEN (when you need current information, comparison of solutions, API documentation), OUTCOME (returns ranked results with snippets), CONSTRAINTS (max 10 results, technical focus may filter results), and NEXT STEPS (typical use: extract URL from result, fetch full content with separate tool).
Enhance parameter descriptions with semantic context: 'focus: Focus area for search results. "technical" filters for APIs, frameworks, libraries; "development" prioritizes tutorials and best practices; "general" includes news and discussions. Defaults to technical.' Similarly expand num_results description to explain rate limiting consequences.
Implement error recovery guidance. Replace generic error responses with: (1) categorized errors, 'Invalid query (user-fixable): queries must be 1-100 chars' vs 'API timeout (retryable): OpenRouter service temporarily unavailable' vs 'Auth failed (fatal): check OPENROUTER_API_KEY env var'; (2) actionable suggestions, 'If search returns no results, try a shorter or more general query' or 'If you hit rate limits, reduce num_results or wait before retry'.
Error handling provides no recovery guidance. Code catches Zod validation errors and generic errors but returns raw error text: 'Invalid parameters: ...' and 'Search failed: ...'. LLMs cannot determine if error is retryable, user-fixable, or fatal. No suggestions for next steps (e.g., 'Try a shorter query', 'Check API key configuration').
No rate limiting, timeout specification, or runaway protection documented. External API calls (OpenRouter) have no visible timeout or retry bounds. Agent could exhaust quota or hang indefinitely without safeguards.
Output from openrouter.ts (SearchWebResult structure) is not documented in tool schema. Code returns JSON.stringify(result, null, 2) but LLMs have no formal schema of what result contains, whether it's {results: [], metadata: {}} or {items: [{title, url, snippet}]} etc. This forces LLMs to infer structure from examples, degrading accuracy.
No input sanitization or constraint validation beyond Zod schema. If OpenRouter API is vulnerable to injection attacks (unlikely but possible with plugin parameters), untrusted user queries pass through directly. Code should validate/escape search_prompt generation in utils.ts.
search_web
Add explicit timeout configuration and document it in openrouter.ts. Set axios timeout to 30s with clear error message: 'Search request timed out after 30s. OpenRouter service may be overloaded. Retry or simplify query.' Return retryable error classification so LLM knows to retry.
Document input validation rules in parameter descriptions. State that 'query' must be non-empty (checked by Zod), and explain what 'invalid focus' means, is it silently ignored or error-throwing?
Add rate limit headers/tracking if OpenRouter provides them. Return X-RateLimit-Remaining in response metadata so agent can throttle subsequent calls before hitting hard limit.
Implement optional dry-run or search_preview capability (if API supports) to let agents validate queries before committing to full search.
Export SearchWebResult TypeScript type as explicit JSON Schema in ListToolsRequest so LLMs see the full shape: 'outputSchema: {type: "object", properties: {results: {...}, total_results: {...}}}'