Skip to main content
Glama

list_executions

Retrieve recent workflow executions with execution ID, status, and timestamps. Filter by status, limit results, and paginate through execution history.

Instructions

List recent executions for a workflow. Returns execution id, status, timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID
statusNoFilter: running, completed, failed
limitNoMax results (default 50, max 500)
directionNoSort order (default: desc)
nextTokenNoPagination cursor from a previous response. Pass this to fetch the next page of results.

Implementation Reference

  • The handler function for the "list_executions" tool, which calls the client's listExecutions method and formats the result as MCP text content.
        async ({ workflowId, status, limit, direction, nextToken }, extra) => {
            const client = clientFactory(extra);
            const result = await client.listExecutions(workflowId, { status, limit, direction, nextToken });
            return {
                content: [{
                    type: 'text' as const,
                    text: JSON.stringify(result, null, 2),
                }],
            };
        }
    );
  • Registration and schema definition for the "list_executions" tool, defining the required parameters and description.
    'list_executions',
    'List recent executions for a workflow. Returns execution id, status, timestamps.',
    {
        workflowId: z.string().describe('The workflow ID'),
        status: z.string().optional().describe('Filter: running, completed, failed'),
        limit: z.number().optional().describe('Max results (default 50, max 500)'),
        direction: z.enum(['asc', 'desc']).optional().describe('Sort order (default: desc)'),
        nextToken: z.string().optional().describe('Pagination cursor from a previous response. Pass this to fetch the next page of results.'),
    },

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

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