Skip to main content
Glama

Sergio by Serviche

Delete a flow

delete_flow
DestructiveIdempotent

Deletes a flow as Delete on the Automations page does. A flow that has never run on a conversation is removed for good. A flow that has already run on conversations is instead switched off and kept (its runs in progress end), because its history points at it; Archive (set_flow_archived) hides a flow without deleting it. A system flow cannot be deleted. flow_id comes from read('flows'); check the flow's steps before deleting, so a flow with something the company still needs is archived instead. Pass the same idempotency_key when retrying.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "flow_id": "<flow_id>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "delete_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
flow_idYes
idempotency_keyYesYour id for this operation (8-128 of A-Z a-z 0-9 . _ : -). Reuse it on every retry of the same operation; use a new one for a new operation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds substantive behavior beyond them: a never-run flow is removed permanently, a flow with conversation history is instead switched off and retained, in-progress runs end, and system flows cannot be deleted. That is genuine consequence-level detail. It stops short of describing permissions or the response body, which keeps it from a 5.

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

Conciseness4/5

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

The destructive outcome and the archive alternative are front-loaded, and each sentence carries a distinct rule (permanent delete, disable-and-keep, archive alternative, system-flow block, id sourcing, retry key). It is dense, however, with several clauses chained into single long sentences, and the retry-key note duplicates schema text.

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

Completeness5/5

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

With only two parameters, no output schema, and annotations covering the safety profile, the description supplies everything needed to call correctly: the branching outcomes, the exclusion, the id source, and the idempotency rule. Nothing material for a destructive operation is left unstated.

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?

Schema description coverage is 50%: idempotency_key is documented in the schema, while flow_id has only a format/pattern. The description compensates by stating that flow_id comes from read('flows'), giving the agent provenance the schema does not. The retry instruction for idempotency_key largely restates the schema's own wording, so it is not fully additive.

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

Purpose5/5

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

States a specific verb and resource ("Deletes a flow") and anchors it to a familiar UI action ("as Delete on the Automations page does"). It immediately distinguishes the tool from the archive sibling by noting that set_flow_archived hides a flow without deleting it, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance and a named alternative: check the flow's steps before deleting, and archive via set_flow_archived if the company still needs something. It also names the prerequisite source for the id (read('flows')) and states the system-flow exclusion, leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources