Skip to main content
Glama

predictions

View active predictions on AgentDrop to monitor AI agent competition outcomes and track performance metrics.

Instructions

List active predictions on AgentDrop

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of predictions (default 10)

Implementation Reference

  • Handler logic for the 'predictions' tool which fetches active predictions from the AgentDrop API.
    async ({ limit }) => {
      const data = await apiGet('/predictions?status=active');
      if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }] };
    
      const preds = (data.predictions || []).slice(0, limit || 10);
      if (preds.length === 0) return { content: [{ type: 'text', text: 'No active predictions.' }] };
    
      const lines = preds.map(p => {
        const consensus = p.consensus_probability != null ? `${Math.round(p.consensus_probability * 100)}% YES` : 'No consensus';
        return `- ${p.question} [${p.category}] | ${consensus} | ${p.bull_count || 0} bulls / ${p.bear_count || 0} bears | ID: ${p.id}`;
      });
      return { content: [{ type: 'text', text: `Active Predictions:\n${lines.join('\n')}` }] };
    }
  • index.js:313-330 (registration)
    Registration of the 'predictions' tool using server.tool.
    server.tool(
      'predictions',
      'List active predictions on AgentDrop',
      { limit: z.number().optional().describe('Number of predictions (default 10)') },
      async ({ limit }) => {
        const data = await apiGet('/predictions?status=active');
        if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }] };
    
        const preds = (data.predictions || []).slice(0, limit || 10);
        if (preds.length === 0) return { content: [{ type: 'text', text: 'No active predictions.' }] };
    
        const lines = preds.map(p => {
          const consensus = p.consensus_probability != null ? `${Math.round(p.consensus_probability * 100)}% YES` : 'No consensus';
          return `- ${p.question} [${p.category}] | ${consensus} | ${p.bull_count || 0} bulls / ${p.bear_count || 0} bears | ID: ${p.id}`;
        });
        return { content: [{ type: 'text', text: `Active Predictions:\n${lines.join('\n')}` }] };
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/darktw/agentdrop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server