Skip to main content
Glama
jongall45

Frontrun MCP Server

by jongall45

frontrun_delete_rule

Remove a custom classification rule from the Frontrun MCP Server to manage venture capital tracking configurations.

Instructions

Delete a custom classification rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesRule UUID to delete

Implementation Reference

  • The handler function for 'frontrun_delete_rule' tool - makes a DELETE API call to /classify/rules/{id} endpoint and returns the result as JSON text
    async ({ id }) => {
      const result = await apiCall('DELETE', `/classify/rules/${id}`);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Zod schema defining the input parameter: 'id' as a required string with description 'Rule UUID to delete'
    { id: z.string().describe('Rule UUID to delete') },
  • index.js:307-315 (registration)
    Tool registration using server.tool() - registers 'frontrun_delete_rule' with description 'Delete a custom classification rule.'
    server.tool(
      'frontrun_delete_rule',
      'Delete a custom classification rule.',
      { id: z.string().describe('Rule UUID to delete') },
      async ({ id }) => {
        const result = await apiCall('DELETE', `/classify/rules/${id}`);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      }
    );
  • apiCall helper function that handles HTTP requests to the Frontrun API with authentication headers, timeout handling, and error management
    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);

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