Skip to main content
Glama
jongall45

Frontrun MCP Server

by jongall45

frontrun_convergence

Detect when multiple venture capital firms independently follow the same X account within a time window, signaling potential pre-funding interest. Adjust threshold and timeframe to filter signal strength.

Instructions

Detect convergence: entities followed by multiple tracked accounts independently within a time window. Higher threshold = stronger signal. This is the highest-signal endpoint — when 3+ VCs independently follow the same account, it strongly suggests pre-funding interest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNoMinimum number of tracked accounts that must have followed. Default: 2. Use 3+ for high-conviction signals.
sinceNoTime window: "48h", "7d", "14d", "30d", or ISO date. Default: "7d"

Implementation Reference

  • Handler function for frontrun_convergence tool. Builds query parameters (threshold, since) and makes a GET request to the /v1/convergence API endpoint, returning JSON-formatted results.
      async ({ threshold, since }) => {
        const params = new URLSearchParams();
        if (threshold) params.set('threshold', String(threshold));
        if (since) params.set('since', since);
        const qs = params.toString();
        const result = await apiCall('GET', `/convergence${qs ? '?' + qs : ''}`);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Zod schema defining two optional input parameters: threshold (number) for minimum tracked accounts, and since (string) for the time window.
    {
      threshold: z.number().optional().describe('Minimum number of tracked accounts that must have followed. Default: 2. Use 3+ for high-conviction signals.'),
      since: z.string().optional().describe('Time window: "48h", "7d", "14d", "30d", or ISO date. Default: "7d"'),
    },
  • index.js:161-177 (registration)
    Complete tool registration for frontrun_convergence using MCP server.tool() method. Registers the tool name, description, input schema, and handler function.
    // --- GET /v1/convergence ---
    server.tool(
      'frontrun_convergence',
      'Detect convergence: entities followed by multiple tracked accounts independently within a time window. Higher threshold = stronger signal. This is the highest-signal endpoint — when 3+ VCs independently follow the same account, it strongly suggests pre-funding interest.',
      {
        threshold: z.number().optional().describe('Minimum number of tracked accounts that must have followed. Default: 2. Use 3+ for high-conviction signals.'),
        since: z.string().optional().describe('Time window: "48h", "7d", "14d", "30d", or ISO date. Default: "7d"'),
      },
      async ({ threshold, since }) => {
        const params = new URLSearchParams();
        if (threshold) params.set('threshold', String(threshold));
        if (since) params.set('since', since);
        const qs = params.toString();
        const result = await apiCall('GET', `/convergence${qs ? '?' + qs : ''}`);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Helper function apiCall that handles all HTTP requests to the Frontrun API. Includes authentication headers, timeout handling (60s), and error handling for rate limits, auth failures, and insufficient balance.
    async function apiCall(method, path, body = null) {
      const url = `${API_URL}/v1${path}`;
      const options = {
        method,
        headers: {
          'X-API-Key': API_KEY,
          'Content-Type': 'application/json',
        },
      };
      if (body) {
        options.body = JSON.stringify(body);
      }
    
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 60000);
      options.signal = controller.signal;
    
      let response;
      try {
        response = await fetch(url, options);
      } catch (err) {
        clearTimeout(timeout);
        if (err.name === 'AbortError') return { error: 'Request timed out (60s). Try a narrower query.' };
        return { error: `Network error: ${err.message}` };
      }
      clearTimeout(timeout);
    
      if (response.status === 429) {
        const retry = response.headers.get('Retry-After') || '60';
        return { error: `Rate limited. Retry in ${retry}s.` };
      }
      if (response.status === 401) {
        return { error: 'Invalid API key. Check FRONTRUN_API_KEY.' };
      }
      if (response.status === 402) {
        const data = await response.json();
        return { error: 'Insufficient balance', ...data };
      }
      if (!response.ok) {
        const text = await response.text();
        return { error: `HTTP ${response.status}: ${text.slice(0, 500)}` };
      }
    
      return response.json();
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It effectively communicates the tool's core behavior (detecting convergence patterns) and signal strength logic (higher threshold = stronger signal). However, it lacks details about output format, rate limits, authentication requirements, or what constitutes 'tracked accounts' versus regular accounts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise and front-loaded. The first sentence establishes the core functionality, the second explains signal strength logic, and the third provides usage context - every sentence earns its place with zero wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no annotations and no output schema, the description provides adequate but incomplete coverage. It explains the tool's purpose and signal logic well, but doesn't describe the output format, what 'entities' or 'tracked accounts' mean in this context, or how results are structured. Given the complexity of convergence detection, more context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds meaningful context beyond the schema by explaining that 'higher threshold = stronger signal' and that '3+ VCs independently follow the same account' creates 'high-conviction signals.' This provides valuable semantic interpretation of the threshold parameter that isn't in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: detecting convergence when multiple tracked accounts independently follow the same entity within a time window. It specifies the verb ('detect convergence') and resource ('entities followed by multiple tracked accounts'), but doesn't explicitly differentiate from sibling tools like 'frontrun_trending' or 'frontrun_new_follows' that might also identify interesting patterns in follows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool: for 'highest-signal endpoint' when seeking strong pre-funding interest signals, with explicit guidance that '3+ VCs independently follow the same account' indicates high conviction. However, it doesn't specify when NOT to use it or name alternative tools for different scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/jongall45/frontrun-mcp-server'

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