Skip to main content
Glama
Moenamatics

Opus MCP Server

by Moenamatics

execute_job

Run a workflow job by providing the execution ID and populated input values structured according to the workflow schema.

Instructions

Execute a job with populated input values. Use jobPayloadSchema from get_workflow_details to structure inputs correctly

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobExecutionIdYesThe job execution ID from initiate_job response
jobPayloadSchemaInstanceYesJob payload with all inputs populated according to workflow schema

Implementation Reference

  • The primary handler function for the 'execute_job' tool. It extracts jobExecutionId and jobPayloadSchemaInstance from args, sends a POST request to the '/job/execute' API endpoint, and returns the response data as formatted JSON text.
    private async executeJob(args: any) {
      const { jobExecutionId, jobPayloadSchemaInstance } = args;
      const response = await this.axiosInstance.post("/job/execute", {
        jobExecutionId,
        jobPayloadSchemaInstance,
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • The tool schema definition for 'execute_job', including input schema specifying jobExecutionId and jobPayloadSchemaInstance as required parameters.
    {
      name: "execute_job",
      description:
        "Execute a job with populated input values. Use jobPayloadSchema from get_workflow_details to structure inputs correctly",
      inputSchema: {
        type: "object",
        properties: {
          jobExecutionId: {
            type: "string",
            description:
              "The job execution ID from initiate_job response",
          },
          jobPayloadSchemaInstance: {
            type: "object",
            description:
              "Job payload with all inputs populated according to workflow schema",
          },
        },
        required: ["jobExecutionId", "jobPayloadSchemaInstance"],
      },
    },
  • src/index.ts:86-87 (registration)
    Registration of the 'execute_job' handler in the tool dispatcher switch statement within the CallToolRequestSchema handler.
    case "execute_job":
      return await this.executeJob(args);

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/Moenamatics/Opus-MCP'

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