An AI agent using MCP for tools with search capabilities, powered by Google Gemini model and integrated with a search engine MCP server
Two tools with basic schemas and descriptions, but significant gaps in parameter documentation and output structure. Both tools have descriptions (10-20 chars baseline met), but descriptions lack actionable context for LLM selection. Input schemas present but incomplete: 'search' lacks explicit type/description for 'num_results' parameter in visible schema; 'advanced_search' has better parameter coverage but output schemas are undocumented (returns generic 'str'). No error handling guidance, no pagination support despite potentially large result sets, no output field documentation. Naming is verb-forward ('search', 'advanced_search') but lacks clarity on when to use advanced_search vs search.
Perform an advanced search with domain filtering and time range options.
Search for information online based on a query.
Output schemas undocumented. Both tools return generic 'str' with no field structure. LLMs cannot parse results or chain to downstream tools. Requires documented JSON schema with fields like 'results[]', 'total_count', 'next_cursor'.
No pagination support. Tools accept 'num_results' (max 10) but do not return pagination metadata (total_count, next_cursor, offset). Large result sets will be truncated silently, and agents cannot iterate through results.
Tool descriptions lack selection context. 'Search for information online' does not explain when to use 'advanced_search' vs 'search'. LLMs cannot disambiguate. Add: 'Use for simple queries. For domain filtering or time-range constraints, use advanced_search.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | <=2025-11-25 | v2 |
Parameter 'time_range' in advanced_search lacks enum constraint. Description lists examples ('past_hour', 'past_day', etc.) but does not enforce them. LLMs will hallucinate invalid values like 'last_week' or 'yesterday'. Replace with enum: ['past_hour', 'past_day', 'past_week', 'past_month', 'past_year'].
No error recovery guidance. Exception handler returns generic 'An error occurred during search: {str(e)}'. LLMs receive no actionable next step (retry, adjust query, check API key). Add: 'If rate-limited, wait 60s and retry. If query invalid, simplify and try again.'