compare_trends
Analyze and rank 2-5 AI trends side by side to identify emerging opportunities and make informed decisions.
Instructions
Compare 2-5 AI trends head to head with rankings and recommendations. Cost: $0.010 USDC. Service: signal.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topics | Yes |
Implementation Reference
- src/index.ts:166-223 (handler)The codebase implements a dynamic tool server where tool definitions are fetched at runtime from a registry URL. The `compare_trends` tool (or any other tool) is handled generically by looking up the requested tool name in the registry and then invoking the associated remote endpoint via the `callTool` function. There is no hardcoded implementation for `compare_trends` within this file.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; let registry: Registry; try { registry = await fetchRegistry(); } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }), }, ], }; } const tool = registry.tools.find((t) => t.name === name); if (!tool) { return { content: [ { type: "text", text: JSON.stringify({ error: `Tool '${name}' not found`, available_tools: registry.tools.map((t) => t.name), }), }, ], }; } try { const result = await callTool(tool, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Tool call failed", tool: name, service: tool.service, detail: String(error), }), }, ], }; } });