Skip to main content
Glama

report_outcome

Report job execution outcomes to the Maiat trust oracle, providing real data on success, failure, partial completion, or expiration status.

Instructions

Report the outcome of a job after executing it. This feeds the Maiat trust oracle with real outcome data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesThe job ID to report outcome for
outcomeYesThe outcome of the job
reporterNoAddress of the reporter (optional)
noteNoFree-form note about the outcome (optional)

Implementation Reference

  • The MCP tool definition and handler for 'report_outcome' in the mcp-server package. It parses the inputs and calls the SDK's reportOutcome method.
    server.tool(
      "report_outcome",
      "Report the outcome of a job after executing it. This feeds the Maiat trust oracle with real outcome data.",
      {
        jobId: z.string().describe("The job ID to report outcome for"),
        outcome: z
          .enum(["success", "failure", "partial", "expired"])
          .describe("The outcome of the job"),
        reporter: z
          .string()
          .optional()
          .describe("Address of the reporter (optional)"),
        note: z
          .string()
          .optional()
          .describe("Free-form note about the outcome (optional)"),
      },
      async ({ jobId, outcome, reporter, note }) => {
        try {
          const data = await sdk.reportOutcome({
            jobId,
            outcome,
            reporter: reporter ?? undefined,
            note: note ?? undefined,
          });
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(data, null, 2),
              },
            ],
          };
  • The underlying SDK implementation of reportOutcome, which sends a POST request to the Maiat API.
    async reportOutcome(params: OutcomeParams): Promise<OutcomeResult> {
      return this.request<OutcomeResult>("/api/v1/outcome", {
        method: "POST",
        body: JSON.stringify(params),
      });
    }

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/JhiNResH/maiat-protocol'

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