Skip to main content
Glama

delete_workflow_template

Remove a saved workflow template by name to keep your template list organized.

Instructions

Delete a saved workflow template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name to delete.

Implementation Reference

  • The handler for the 'delete_workflow_template' tool. It validates the name, deletes the template file via fs.unlink, and returns a confirmation message.
    server.tool(
      "delete_workflow_template",
      "Delete a saved workflow template.",
      deleteSchema,
      async (args) => {
        validateName(args.name);
        try {
          await fs.unlink(templatePath(store.dir, args.name));
        } catch {
          throw new Error(`Template "${args.name}" not found.`);
        }
        return {
          content: [
            { type: "text" as const, text: `Deleted template "${args.name}".` },
          ],
        };
      },
    );
  • The schema (deleteSchema) for the delete_workflow_template tool, defining the 'name' parameter as a zod string.
    const deleteSchema = {
      name: z.string().describe("Template name to delete."),
    };
  • src/server.ts:48-48 (registration)
    Where registerTemplateTools is called, registering all template tools (including delete_workflow_template) on the MCP server.
    registerTemplateTools(s, client, templateStore);
  • The export function registerTemplateTools which calls server.tool() to register delete_workflow_template.
    export function registerTemplateTools(
      server: McpServer,
      client: ComfyUIClient,
      store: TemplateStore,
    ): void {
  • Helper function validateName used by the handler to validate the template name against a regex pattern.
    function validateName(name: string): void {
      if (!TEMPLATE_NAME_PATTERN.test(name)) {
        throw new Error(
          `Invalid template name "${name}". Must start with alphanumeric; only letters, digits, '-', '_' allowed; max 64 chars.`,
        );
      }
    }
Behavior2/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 implies a destructive operation ('Delete') but does not mention permissions, cascading effects, or confirm irreversibility. The minimal description is insufficient for an AI to understand side effects.

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 a single, short sentence with no redundant information. Every word serves a purpose, making it highly concise and efficiently front-loaded.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema), the description is mostly adequate. However, it could mention that the action is irreversible, which would improve completeness for an AI agent.

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 coverage is 100% and the single parameter 'name' is described clearly in the schema as 'Template name to delete.' The tool description adds no additional meaning beyond the schema, meeting the baseline but not exceeding it.

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 the resource 'saved workflow template'. It differentiates from sibling tools like save, get, list, and run, but does not specify the deletion is by name or any unique scope.

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?

No guidance is provided on when to use this tool versus alternatives, prerequisites (e.g., template must exist), or that deletion is irreversible. The description is purely declarative.

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/miller-joe/comfyui-mcp'

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