Skip to main content
Glama

test_app_action

Test app actions directly by providing app ID, action ID, and input data to verify functionality before integrating into workflows.

Instructions

Test an app action in isolation without creating a workflow or execution. Pass the appId and actionId (from list_apps / get_app_actions) plus input data to run the action directly and see results immediately. Useful for verifying inputs before wiring a step into a workflow. Example: test_app_action("web-scraping", "scrape", { url: "https://example.com" })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdYesApp ID (e.g., "agentled", "web-scraping", "hunter")
actionIdYesAction ID (e.g., "scrape", "get-linkedin-company-from-url", "find-email-person-domain")
inputNoInput data for the action (e.g., { url: "https://example.com" })
bypassCacheNoSkip cache and run against the live API (default: false)

Implementation Reference

  • Registration of the 'test_app_action' tool within the McpServer, including description, schema definition, and the handler function calling the client.
        server.tool(
            'test_app_action',
            `Test an app action in isolation without creating a workflow or execution.
    Pass the appId and actionId (from list_apps / get_app_actions) plus input data to run the action directly and see results immediately.
    Useful for verifying inputs before wiring a step into a workflow.
    Example: test_app_action("web-scraping", "scrape", { url: "https://example.com" })`,
            {
                appId: z.string().describe('App ID (e.g., "agentled", "web-scraping", "hunter")'),
                actionId: z.string().describe('Action ID (e.g., "scrape", "get-linkedin-company-from-url", "find-email-person-domain")'),
                input: z.record(z.string(), z.any()).optional().describe('Input data for the action (e.g., { url: "https://example.com" })'),
                bypassCache: z.boolean().optional().describe('Skip cache and run against the live API (default: false)'),
            },
            async ({ appId, actionId, input, bypassCache }, extra) => {
                const client = clientFactory(extra);
                const result = await client.testAppAction(appId, actionId, input, bypassCache);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • The 'test_app_action' tool is registered using `server.tool` in `src/tools/testing.ts`.
        server.tool(
            'test_app_action',
            `Test an app action in isolation without creating a workflow or execution.
    Pass the appId and actionId (from list_apps / get_app_actions) plus input data to run the action directly and see results immediately.
    Useful for verifying inputs before wiring a step into a workflow.
    Example: test_app_action("web-scraping", "scrape", { url: "https://example.com" })`,
            {
                appId: z.string().describe('App ID (e.g., "agentled", "web-scraping", "hunter")'),
                actionId: z.string().describe('Action ID (e.g., "scrape", "get-linkedin-company-from-url", "find-email-person-domain")'),
                input: z.record(z.string(), z.any()).optional().describe('Input data for the action (e.g., { url: "https://example.com" })'),
                bypassCache: z.boolean().optional().describe('Skip cache and run against the live API (default: false)'),
            },
            async ({ appId, actionId, input, bypassCache }, extra) => {
                const client = clientFactory(extra);
                const result = await client.testAppAction(appId, actionId, input, bypassCache);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • The implementation of the 'testAppAction' method in AgentledClient, which sends a POST request to the '/step/test' API endpoint to execute the tool logic.
    async testAppAction(appId: string, actionId: string, input?: Record<string, any>, bypassCache?: boolean) {
        return this.request('/step/test', {
            method: 'POST',
            body: JSON.stringify({ appId, actionId, input, bypassCache }),
        });
    }
  • The handler for 'test_app_action' calls the 'testAppAction' method on the `AgentledClient` class.
    async ({ appId, actionId, input, bypassCache }, extra) => {
        const client = clientFactory(extra);
        const result = await client.testAppAction(appId, actionId, input, bypassCache);
        return {
            content: [{
                type: 'text' as const,
                text: JSON.stringify(result, null, 2),
            }],
        };
    }
  • The 'testAppAction' method in `AgentledClient` performs an HTTP POST request to '/step/test' to execute the action.
    async testAppAction(appId: string, actionId: string, input?: Record<string, any>, bypassCache?: boolean) {
        return this.request('/step/test', {
            method: 'POST',
            body: JSON.stringify({ appId, actionId, input, bypassCache }),
        });
    }

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