Skip to main content
Glama

run_scenario_11422

List inventory items by triggering an automation workflow designed for AI systems, enabling seamless integration with your existing Make scenarios.

Instructions

Tool: List Inventory (Lists items in inventory.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for CallToolRequestSchema. Matches tool names like 'run_scenario_11422' using regex, extracts scenario ID from name.substring(13), executes the scenario via make.scenarios.run, and returns output as text or error.
    server.setRequestHandler(CallToolRequestSchema, async request => {
        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),
                        },
                    ],
                };
            }
        }
        throw new Error(`Unknown tool: ${request.params.name}`);
    });
  • src/index.ts:37-57 (registration)
    Dynamic registration of tools in ListToolsRequestSchema handler. For each on-demand scenario, creates a tool 'run_scenario_<id>' (e.g., run_scenario_11422 for id=11422), generates 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,
                            }),
                        };
                    }),
            ),
        };
    });
  • Remaps Make scenario input specification to JSON Schema object used as inputSchema for the dynamic tools.
    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),
                };
        }
    }
  • The Scenarios class run method that actually executes the scenario by POSTing to Make API /scenarios/{id}/run with input arguments.
        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',
                },
            });
        }
    }
  • Fetches the input interface/spec for a scenario, used to generate the tool's inputSchema.
    async ['interface'](scenarioId: number): Promise<ScenarioInteface> {
        return (await this.#fetch<ScenarioInterfaceServerResponse>(`/scenarios/${scenarioId}/interface`)).interface;
    }
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. The description only states what the tool does ('Lists items in inventory') without mentioning any behavioral traits like whether this is a read-only operation, if it requires authentication, what format the output takes, or any rate limits. For a tool with zero annotation coverage, this is insufficient.

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 extremely concise ('Tool: List Inventory (Lists items in inventory.)') with no wasted words. It's front-loaded with the tool name and purpose. However, the structure is slightly awkward with the parenthetical repetition, and it could be more polished while maintaining brevity.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'inventory' refers to, what format the list takes, or how this tool differs from its siblings. For a tool with no structured metadata, the description should provide more context to be fully usable by an agent.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of parameters. The description doesn't need to add parameter semantics, and it correctly doesn't mention any parameters. A baseline of 4 is appropriate for zero-parameter tools when the schema coverage is complete.

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

Purpose3/5

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

The description states the tool's purpose as 'Lists items in inventory', which is a clear verb+resource combination. However, it doesn't distinguish this tool from its siblings (all named 'run_scenario_XXXX'), leaving the agent uncertain about what makes this specific scenario unique. The description is adequate but lacks sibling differentiation.

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 about when to use this tool versus the five sibling 'run_scenario' tools. The description doesn't mention any context, prerequisites, or alternatives, leaving the agent with no usage guidelines beyond the basic purpose statement.

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