Skip to main content
Glama

run_scenario_11704

Execute predefined automation scenarios on the Make MCP Server, handling diverse inputs like arrays, collections, booleans, dates, JSON, numbers, and text for workflow integration.

Instructions

Scenario Inputs All Types

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
array_of_arraysNodescription
array_of_collectionsNodescription
booleanNo
collectionNodescription
dateNodescription
jsonNodescription
numberYesrequired + default
primitive_arrayNodescription
selectNo
textNo

Implementation Reference

  • Core handler logic for executing 'run_scenario_*' tools: parses scenario ID from tool name, calls make.scenarios.run, formats output or error response.
    if (/^run_scenario_\d+$/.test(request.params.name)) {
        try {
            const output = (
                await make.scenarios.run(parseInt(request.params.name.substring(13)), request.params.arguments)
            ).outputs;
    
            return {
                content: [
                    {
                        type: 'text',
                        text: output ? JSON.stringify(output, null, 2) : 'Scenario executed successfully.',
                    },
                ],
            };
        } catch (err: unknown) {
            return {
                isError: true,
                content: [
                    {
                        type: 'text',
                        text: String(err),
                    },
                ],
            };
        }
    }
  • src/index.ts:37-57 (registration)
    Dynamically registers 'run_scenario_{id}' tools for each on-demand scenario, generating name, description, and inputSchema dynamically.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
        const scenarios = await make.scenarios.list(teamId);
        return {
            tools: await Promise.all(
                scenarios
                    .filter(scenario => scenario.scheduling.type === 'on-demand')
                    .map(async scenario => {
                        const inputs = (await make.scenarios.interface(scenario.id)).input;
                        return {
                            name: `run_scenario_${scenario.id}`,
                            description: scenario.name + (scenario.description ? ` (${scenario.description})` : ''),
                            inputSchema: remap({
                                name: 'wrapper',
                                type: 'collection',
                                spec: inputs,
                            }),
                        };
                    }),
            ),
        };
    });
  • Implements the actual API call to run the scenario: POST /scenarios/{id}/run with input data.
        async run(scenarioId: number, body: unknown): Promise<ScenarioRunServerResponse> {
            return await this.#fetch<ScenarioRunServerResponse>(`/scenarios/${scenarioId}/run`, {
                method: 'POST',
                body: JSON.stringify({ data: body, responsive: true }),
                headers: {
                    'content-type': 'application/json',
                },
            });
        }
    }
  • Helper function to remap Make scenario input interfaces to JSON schema for tool inputSchema. Used in tool registration.
    export function remap(field: Input): unknown {
        switch (field.type) {
            case 'collection':
                const required: string[] = [];
                const properties: unknown = (Array.isArray(field.spec) ? field.spec : []).reduce((object, subField) => {
                    if (!subField.name) return object;
                    if (subField.required) required.push(subField.name);
    
                    return Object.defineProperty(object, subField.name, {
                        enumerable: true,
                        value: remap(subField),
                    });
                }, {});
    
                return {
                    type: 'object',
                    description: noEmpty(field.help),
                    properties,
                    required,
                };
            case 'array':
                return {
                    type: 'array',
                    description: noEmpty(field.help),
                    items:
                        field.spec &&
                        remap(
                            Array.isArray(field.spec)
                                ? {
                                      type: 'collection',
                                      spec: field.spec,
                                  }
                                : field.spec,
                        ),
                };
            case 'select':
                return {
                    type: 'string',
                    description: noEmpty(field.help),
                    enum: (field.options || []).map(option => option.value),
                };
            default:
                return {
                    type: PRIMITIVE_TYPE_MAP[field.type as keyof typeof PRIMITIVE_TYPE_MAP],
                    default: field.default != '' && field.default != null ? field.default : undefined,
                    description: noEmpty(field.help),
                };
        }
    }
  • Make class providing authenticated API client, including scenarios.run method delegation.
    export class Make {
        readonly #apiKey: string;
        public readonly zone: string;
        public readonly version: number;
        public readonly scenarios: Scenarios;
    
        constructor(apiKey: string, zone: string, version = 2) {
            this.#apiKey = apiKey;
            this.zone = zone;
            this.version = version;
    
            this.scenarios = new Scenarios(this.fetch.bind(this));
        }
    
        async fetch<T = any>(url: string, options?: RequestInit): Promise<T> {
            options = Object.assign({}, options, {
                headers: Object.assign({}, options?.headers, {
                    'user-agent': 'MakeMCPServer/0.1.0',
                    authorization: `Token ${this.#apiKey}`,
                }),
            });
    
            if (url.charAt(0) === '/') {
                if (url.charAt(1) === '/') {
                    url = `https:${url}`;
                } else {
                    url = `https://${this.zone}/api/v${this.version}${url}`;
                }
            }
    
            const res = await fetch(url, options);
            if (res.status >= 400) {
                throw await createMakeError(res);
            }
    
            const contentType = res.headers.get('content-type');
            const result = contentType?.includes('application/json') ? await res.json() : await res.text();
            return result;
        }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. 'Scenario Inputs All Types' doesn't indicate whether this is a read or write operation, what kind of scenario is being run, what effects it has, or any behavioral characteristics like rate limits, authentication needs, or error conditions. This leaves the agent with no understanding of the tool's behavior.

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

Conciseness2/5

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

While technically concise (three words), this is a case of harmful under-specification rather than effective brevity. The description fails to convey necessary information and wastes its minimal word count on a tautological phrase. Every sentence should earn its place, but this description doesn't provide a single useful sentence.

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

Completeness1/5

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

Given the tool's complexity (10 parameters including nested objects, arrays of arrays, and collections), lack of annotations, absence of output schema, and presence of five sibling tools, the description is completely inadequate. It provides no context about what the tool does, when to use it, what behavior to expect, or how parameters relate to the scenario execution. This leaves the agent unable to properly understand or invoke the tool.

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

Parameters1/5

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

The schema has 10 parameters with 70% description coverage, but the description 'Scenario Inputs All Types' adds zero semantic information about any parameters. It doesn't explain what these inputs represent, how they relate to the scenario, or provide any context beyond what's minimally documented in the schema. For a complex tool with 10 parameters including nested objects, this is completely inadequate.

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

Purpose1/5

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

The description 'Scenario Inputs All Types' is a tautology that restates the tool name 'run_scenario_11704' without specifying what the tool actually does. It doesn't identify a specific action (verb) or resource, nor does it distinguish this tool from its five sibling tools (run_scenario_11422, etc.). This provides no meaningful information about the tool's purpose.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus its five sibling tools or any alternatives. There's no mention of context, prerequisites, or distinctions between this and other scenario-running tools. The agent would have no basis for selecting this specific tool.

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

Related 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/integromat/make-mcp-server'

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