Skip to main content
Glama

submit_delegated_job

Submit a job paid from your existing spl-approve USDC delegation: the provider does the work FIRST, then pulls from your delegated allowance - no per-job payment transaction from you.

Instructions

Submit a job paid from your existing spl-approve USDC delegation: the provider does the work FIRST, then pulls from your delegated allowance - no per-job payment transaction from you. On an ordinary capability it pulls the advertised price. On a METERED one (the card carries a metered block) the advertised price is a CEILING and the pull is what the job actually consumed, never more than that ceiling - so a metered card is usually cheaper here than its listed price suggests. Requires an ACTIVE delegation to the delegate key this capability advertises (check with get_delegation). Within the approved cap the delegate can pull without your signature, so treat the cap as the max loss. Your per-session spend limit also applies: the job is refused if its ceiling does not fit the remaining session budget. An input too large to ride inline is sent via iroh automatically (needs a persistent agent); for a file on disk use submit_delegated_job_from_file. If max_price_lamports is not set, returns the price - or the range, when metered - for confirmation without publishing anything.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input": "<input>",
      "provider_npub": "<provider_npub>"
    },
    "name": "submit_delegated_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes
capabilityNogeneral
kind_offsetNo
timeout_secsNo
provider_npubYes
max_price_lamportsNoConfirmation cap in the card asset subunits (USDC has 6 decimals). The advertised price must not exceed it. Omit to get a price confirmation without publishing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.60
    • addedInput schema / properties / max_price_lamports / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_price_lamports / minimum
      Added value: +-9007199254740991
  2. Addedv0.1.43

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the pull-after-work payment order, that metered cards bill actual consumption against the advertised ceiling, that the approved cap equals max loss without a per-job signature, that the session budget can cause refusal, and that oversized inputs are routed over iroh requiring a persistent agent. It also discloses that omitting max_price_lamports returns a price/range without publishing anything — a genuine side-effect distinction an agent could not infer.

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

Conciseness4/5

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

The core mechanism and the price-ceiling caveat are front-loaded, and nearly every clause adds decision-relevant information. It is a dense single paragraph with a couple of stacked parentheticals (metered explanation, iroh note) that slow scanning, but little is genuinely redundant.

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?

For a 6-parameter, no-annotation, no-output-schema mutation tool, this covers payment semantics, prerequisites, failure conditions, and the quote-only path thoroughly. What is missing is the return shape on the actual submission path — whether it returns a job id, a result handle, or a pending state — which the agent needs to continue the workflow.

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

Parameters4/5

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

Schema coverage is only 17%, so the description must compensate, and it does for the two highest-risk parameters: max_price_lamports is explained as a confirmation cap in asset subunits whose omission switches to quote-only, and input is explained as possibly being sent out-of-band via iroh when too large. capability, kind_offset, and timeout_secs are left to the schema, which is a real but limited gap given the coverage deficit.

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?

States a specific verb+resource ('Submit a job paid from your existing spl-approve USDC delegation') and immediately explains the defining mechanism: the provider works first and pulls from the delegated allowance, with no per-job payment transaction. That mechanism also implicitly separates it from the submit_and_pay_job family, and it names submit_delegated_job_from_file for the file-on-disk case.

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?

Gives a concrete prerequisite (an ACTIVE delegation to the provider's advertised delegate key) and points to get_delegation to verify it, plus an explicit routing rule to submit_delegated_job_from_file for files on disk. It also documents the no-cap 'quote only' mode. It never explicitly contrasts with submit_and_pay_job, so the alternative-selection guidance is strong but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.