Skip to main content
Glama

maasy_trigger_workflow

Trigger a Maasy workflow manually to run automations, sequences, or CRM flows for a specific contact with custom variables.

Instructions

Trigger a maasy workflow manually — automations, sequences, CRM flows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoBrand UUID
workflow_idYesWorkflow UUID (get from maasy → Workflows)
contact_idNoContact UUID to run the workflow for
variablesNoCustom variables passed to the workflow

Implementation Reference

  • src/index.ts:341-351 (registration)
    Registration of the 'maasy_trigger_workflow' tool on the MCP server. It defines the schema (workflow_id, contact_id, variables) and delegates to toolHandler('trigger_workflow').
    server.tool(
      "maasy_trigger_workflow",
      "Trigger a maasy workflow manually — automations, sequences, CRM flows.",
      {
        project_id: z.string().optional().describe("Brand UUID"),
        workflow_id: z.string().describe("Workflow UUID (get from maasy → Workflows)"),
        contact_id: z.string().optional().describe("Contact UUID to run the workflow for"),
        variables: z.record(z.unknown()).optional().describe("Custom variables passed to the workflow"),
      },
      toolHandler("trigger_workflow")
    );
  • Generic toolHandler factory that wraps tool execution. For 'maasy_trigger_workflow', it calls callGateway('trigger_workflow', args) which sends the request to the Supabase mcp-gateway edge function.
    function toolHandler(toolName: string, argsFn?: (args: Record<string, unknown>) => Record<string, unknown>) {
      return async (args: Record<string, unknown>) => {
        try {
          const gatewayArgs = argsFn ? argsFn(args) : args;
          // Auto-inject default project_id if not provided
          if (DEFAULT_PROJECT_ID && !gatewayArgs.project_id) {
            gatewayArgs.project_id = DEFAULT_PROJECT_ID;
          }
          const result = await callGateway(toolName, gatewayArgs);
          return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `Error: ${e instanceof Error ? e.message : String(e)}` }],
            isError: true,
          };
        }
      };
    }
  • Zod schema for the 'maasy_trigger_workflow' tool inputs: optional project_id, required workflow_id string, optional contact_id string, optional variables record.
    {
      project_id: z.string().optional().describe("Brand UUID"),
      workflow_id: z.string().describe("Workflow UUID (get from maasy → Workflows)"),
      contact_id: z.string().optional().describe("Contact UUID to run the workflow for"),
      variables: z.record(z.unknown()).optional().describe("Custom variables passed to the workflow"),
    },
  • The callGateway function that sends the tool name ('trigger_workflow') and arguments to the Supabase edge function (mcp-gateway) via HTTP POST.
    export async function callGateway(tool: string, args: Record<string, unknown> = {}): Promise<unknown> {
      const res = await fetch(gatewayUrl, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          [authHeader.name]: authHeader.value,
        },
        body: JSON.stringify({ tool, args }),
      });
    
      const data = await res.json();
    
      if (!res.ok) {
        throw new Error(data.error || `Gateway error (${res.status})`);
      }
    
      return data.result;
    }
Behavior2/5

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

No annotations exist, and the description does not disclose behavioral traits such as whether the trigger is destructive, idempotent, or has side effects (e.g., sending emails). The agent lacks critical safety information.

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 description is a single sentence that captures the core purpose efficiently. It is concise but could be improved by front-loading key usage cues at no extra length.

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 no output schema and no annotations, the description lacks essential context such as return values, error handling, or workflow execution details. It is insufficient for a tool that may have side effects.

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%, so the baseline is 3. The description adds no extra meaning beyond the schema's parameter descriptions; it simply restates the tool's purpose without enhancing parameter understanding.

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?

The description 'Trigger a maasy workflow manually — automations, sequences, CRM flows' clearly states the specific action (trigger) and resource (workflow), distinguishing it from sibling tools like create_skill or list_brands.

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 vs alternatives, prerequisites, or when not to use it. The description is purely declarative without conditional advice.

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/Jbelieve/mcp-server'

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