Skip to main content
Glama
martin-1103
by martin-1103

delete_flow

Remove API workflow configurations by specifying the flow ID to manage your backend development environment and testing processes.

Instructions

Delete a flow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowIdYesID of the flow to delete

Implementation Reference

  • The primary handler function that implements the delete_flow tool logic. Validates input, calls the backend API to delete the flow, and formats the MCP response.
    export async function handleDeleteFlow(args: any): Promise<McpToolResponse> {
      try {
        const { flowId } = args;
    
        if (!flowId) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  success: false,
                  error: 'Flow ID is required'
                }, null, 2)
              }
            ]
          };
        }
    
        const instances = await getInstances();
        const deleteResponse = await instances.backendClient.deleteFlow(flowId);
    
        if (!deleteResponse.success) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  success: false,
                  error: deleteResponse.message || 'Failed to delete flow'
                }, null, 2)
              }
            ]
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: true,
                message: 'Flow deleted successfully'
              }, null, 2)
            }
          ]
        };
    
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: false,
                error: error.message || 'Unknown error occurred while deleting flow'
              }, null, 2)
              }
            ]
          };
      }
    }
  • Tool schema definition for delete_flow, specifying input validation (requires flowId) and linking to the handler.
    export const deleteFlowTool: McpTool = {
      name: 'delete_flow',
      description: 'Delete a flow',
      inputSchema: {
        type: 'object',
        properties: {
          flowId: {
            type: 'string',
            description: 'ID of the flow to delete'
          }
        },
        required: ['flowId']
      },
      handler: handleDeleteFlow
    };
  • Registration of the delete_flow tool handler in the main index.ts, dynamically importing and delegating to the specific handler function.
    'delete_flow': async (args: any) => {
      const { handleDeleteFlow } = await import('./flows/handlers/detailsHandler.js');
      return handleDeleteFlow(args);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Delete' implies a destructive, irreversible mutation, but the description doesn't specify permissions required, whether deletion is permanent, error handling (e.g., if flow doesn't exist), or side effects. For a destructive tool with zero annotation coverage, this is inadequate.

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 extremely concise with a single sentence ('Delete a flow'), which is front-loaded and wastes no words. For a simple tool with one parameter, this brevity is efficient and appropriate, earning full marks for conciseness.

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

Completeness2/5

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

Given the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It fails to address critical aspects like confirmation needs, return values, or error cases. With siblings offering related operations (e.g., 'get_flow_details'), more context is needed for safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'flowId' fully documented in the schema. The description adds no additional parameter details beyond what the schema provides, such as format examples or sourcing instructions. Baseline 3 is appropriate when the schema handles all parameter documentation.

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 action ('Delete') and resource ('a flow'), making the purpose immediately understandable. It distinguishes from siblings like 'delete_environment' or 'delete_folder' by specifying the resource type. However, it doesn't specify what constitutes a 'flow' or the scope of deletion, keeping it from a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing flow details first), consequences of deletion, or comparisons to tools like 'get_flow_details' for verification. With siblings including 'create_flow' and 'execute_flow', this lack of context is a significant gap.

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/martin-1103/mcp2'

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