Access and analyze product trends on social media platforms
Server has 2 tools with basic schemas and descriptions, but significant quality gaps. Tool names lack clear action verbs (both end in '_scraper' which is generic). Descriptions are present but lack deployment details, error recovery guidance, and output schema documentation. Parameters have types and descriptions, but lack validation constraints (enums, ranges, regex patterns). Output is documented in the code but not formalized in tool schemas. Error handling returns structured responses but without recovery guidance. The server appears functional but falls short of production-grade agent tool patterns.
Scrape Instagram hashtags to analyze trends related to products. Args: hashtags: List of hashtags to scrape (without the # symbol) results_limit: Maximum number of results to fetch Returns: Dictionary containing scraped hashtag data and analysis
Scrape TikTok hashtags to analyze trends related to products. Args: hashtags: List of hashtags to scrape (without the # symbol) results_per_page: Number of results to fetch per page max_profiles_per_query: Maximum number of profiles to analyze per query Returns: Dictionary containing scraped hashtag data and analysis
Tool names are generic and do not start with clear action verbs. Both use '_scraper' suffix which is implementation detail, not intent. 'tiktok_hashtag_scraper' vs 'search_tiktok_hashtags' or 'analyze_tiktok_trends'. LLMs rely on verb-noun naming to infer intent before reading descriptions.
Output schema not formally documented in tool definitions. The code defines TREND_RESULT_SCHEMA but it is never linked to tool outputs. LLMs cannot plan downstream calls without knowing what fields to expect from results. Response objects include 'analysis', 'results', 'full_results_count' but these are inferred from code, not declared in schemas.
Error handling returns structured objects but without recovery guidance. When APIFY_API_TOKEN is missing or a call fails, the response includes 'error' field but does not instruct the LLM on next steps (e.g., 'Set APIFY_API_TOKEN environment variable and retry'). Per pattern:recovery-guide, errors must tell the agent what to do.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 7 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 51 | - | v1 |
Parameter descriptions lack validation constraints. 'results_per_page' and 'results_limit' have defaults but no min/max bounds, enums, or ranges declared. LLMs may pass extreme values (0, 999999) that break the Apify API. Description should state: 'Number of results to fetch per page (1-100, default 10)'.
Tool descriptions do not explain WHEN to use each tool over the other. Both tools scrape hashtags but on different platforms. The descriptions do not state 'Use this tool when analyzing TikTok trends specifically' or explain the differences in what data each platform returns. This forces LLMs to guess which tool applies.
No pagination support. Tools return 'results[:10]' hardcoded in the response. If an agent needs more than 10 results, it has no way to fetch the next page. Per pattern:paginated-result, tools returning lists must support offset/limit and return total counts. The 'full_results_count' field exists but there is no mechanism to fetch results beyond the first 10.
APIFY_API_TOKEN exposed in environment. While not a tool parameter (good), the code logs and warns about missing token at module load time, which could expose configuration details. Per pattern:secret-injection, use vault or secure config. Also, no rate limiting or timeout handling visible for Apify calls, a hung API call will block the agent indefinitely.
Trend_resource implements a resource endpoint but the method only returns a placeholder. The docstring says 'This is a placeholder. In a real implementation, this would fetch cached results or trigger...', this is incomplete and non-functional. Remove or complete it before production.