Skip to main content
Glama

submit_job

Submit a job deliverable by posting its hash on-chain. The evaluator auto-approves or rejects, advancing the job from funded to submitted.

Instructions

Submit a deliverable for a Job (Provider side). Posts the deliverable hash on-chain; Evaluator then auto-approves or rejects. Status: funded → submitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesJob ID (job_...)
contentHashYes32-byte hex hash of the deliverable (0x... + 64 hex chars). Use keccak256 of canonical content.
contentURINoOptional: URL where the deliverable can be fetched

Implementation Reference

  • The handler function for the submit_job tool. Calls the API POST /jobs/{jobId}/submit with contentHash and optional contentURI, then returns success or error response.
    async ({ jobId, contentHash, contentURI }) => {
      try {
        const body: Record<string, unknown> = { contentHash };
        if (contentURI) body.contentURI = contentURI;
        const res = await callApi("POST", `/jobs/${jobId}/submit`, body);
        if (!res.ok) return errorResponse("Submit job failed", res);
        return successResponse(res.json);
      } catch (e) {
        return { content: [{ type: "text" as const, text: `Submit job error: ${e}` }], isError: true };
      }
    },
  • Input schema for submit_job tool: jobId (string), contentHash (32-byte hex string), and optional contentURI (URL string).
    {
      jobId: z.string().describe("Job ID (job_...)"),
      contentHash: z.string().describe("32-byte hex hash of the deliverable (0x... + 64 hex chars). Use keccak256 of canonical content."),
      contentURI: z.string().optional().describe("Optional: URL where the deliverable can be fetched"),
    },
  • src/index.ts:282-302 (registration)
    Registration of the submit_job tool via server.tool() with description indicating it submits a deliverable for a Job (Provider side), changing status from funded to submitted.
    // Tool 9: Submit Deliverable (Provider side)
    server.tool(
      "submit_job",
      "Submit a deliverable for a Job (Provider side). Posts the deliverable hash on-chain; Evaluator then auto-approves or rejects. Status: funded → submitted.",
      {
        jobId: z.string().describe("Job ID (job_...)"),
        contentHash: z.string().describe("32-byte hex hash of the deliverable (0x... + 64 hex chars). Use keccak256 of canonical content."),
        contentURI: z.string().optional().describe("Optional: URL where the deliverable can be fetched"),
      },
      async ({ jobId, contentHash, contentURI }) => {
        try {
          const body: Record<string, unknown> = { contentHash };
          if (contentURI) body.contentURI = contentURI;
          const res = await callApi("POST", `/jobs/${jobId}/submit`, body);
          if (!res.ok) return errorResponse("Submit job failed", res);
          return successResponse(res.json);
        } catch (e) {
          return { content: [{ type: "text" as const, text: `Submit job error: ${e}` }], isError: true };
        }
      },
    );
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It reveals that the deliverable hash is posted on-chain and that the evaluator auto-approves or rejects, which adds important behavioral context beyond the operation itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, with two sentences that front-load the key purpose and side. Every word adds value, no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the flow and status transition, which is helpful given no output schema. However, it lacks details on return values or error conditions, which would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All input parameters have descriptions in the schema (100% coverage), so the baseline is 3. The description does not add new meaning beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states the tool submits a deliverable for a Job on the provider side, using specific verbs and resources. It distinguishes itself from sibling tools like create_job or fund_job by focusing on submission.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage after the job is funded (Status: funded → submitted) but does not explicitly state prerequisites or when not to use it. Alternatives are not mentioned, but the context makes it clear.

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

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/mrocker/cardzero-mcp'

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