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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Rule UUID to delete |
Implementation Reference
- index.js:311-314 (handler)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) }] }; } - index.js:310-310 (schema)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) }] }; } ); - index.js:29-55 (helper)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);