Skip to main content
Glama

submit_and_pay_job

Submit a job to an elisym provider, pay the listed price upfront, and wait for the result. Handles free and paid providers, validates payment recipients, and returns a still-processing notice if the result is delayed.

Instructions

Full customer flow: submit job -> auto-pay -> wait for result. Validates that the payment recipient matches the provider card. If payment succeeded but no result arrives within the wait window, this returns a non-error "still processing" notice with the event ID (NOT a failure) - re-poll get_job_result later (results persist on the relays; for long jobs, poll periodically, e.g. from a subagent). Handles both free and paid providers automatically. If max_price_lamports is not set and the capability is paid, this returns the advertised price for confirmation WITHOUT submitting a job - re-call with max_price_lamports set to approve payments up to that limit (this is a confirmation, not an error). COST: input is sent inline in the tool call, so a large input pays output tokens on the calling LLM. For files or git diffs, prefer submit_and_pay_job_from_file or submit_diff_review respectively. This pays the listed price up front; when the capability advertises delegation, submit_delegated_job bills a metered card for actual usage instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes
capabilityNogeneral
session_idNoConversation control. Omit for automatic session management (providers advertising context support get a conversation auto-started on first contact; an ongoing conversation triggers a continue/new/one-off question before anything is published). Pass "new" to force a fresh conversation, "none" to force a stateless one-off, or a session_id from a previous result to continue that conversation. The provider answers with the conversation context of prior exchanges under the same id.
kind_offsetNo
timeout_secsNo
provider_npubYes
max_price_lamportsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.42
    • addedInput schema / properties / session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": "new",
      +      "type": "string"
      +    },
      +    {
      +      "const": "none",
      +      "type": "string"
      +    },
      +    {
      +      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Conversation control. Omit for automatic session management (providers advertising context support get a conversation auto-started on first contact; an ongoing conversation triggers a continue/new/one-off question before anything is published). Pass \"new\" to force a fresh conversation, \"none\" to force a stateless one-off, or a session_id from a previous result to continue that conversation. The provider answers with the conversation context of prior exchanges under the same id."
      +}
  2. Addedv0.1.37
  3. Removedv0.1.36
  4. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that payment is made up front, that a 'still processing' notice is returned (not an error), and that the tool validates payment recipient against provider card. It also warns about token costs for large inline inputs, which is valuable behavioral context. Slight gap: doesn't mention what happens on payment failure or network errors, but covers major non-obvious behaviors.

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

Conciseness3/5

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

The description is quite long, covering many edge cases. It is front-loaded with the main flow, but the extensive list of scenarios makes it dense. Each sentence adds value, but it could be more scannable by using bullets or shorter sentences. Still, for a complex tool, the length is justified.

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?

Given the complexity (7 parameters, 2 required, no output schema, no annotations), the description covers the most critical aspects: how payments work, confirmation flow, polling, and alternatives. It doesn't describe the return structure in detail, but that might be in the output schema (not provided). The description is sufficient for an agent to call it correctly in most situations.

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?

Schema description coverage is only 14%, so the description must compensate. It explains the max_price_lamports parameter's confirmation behavior and the input size cost implication, but does not explain other parameters like capability, kind_offset, or timeout_secs beyond what the schema already provides. The session_id parameter is well-documented in the schema, so the description adding only some param context is adequate.

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's core function: a full customer flow that submits a job, auto-pays, and waits for results. It distinguishes itself from siblings by naming alternatives for files and diffs (submit_and_pay_job_from_file, submit_diff_review) and delegation (submit_delegated_job), making its purpose unambiguous.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use this tool vs alternatives: prefer file-based tools for large inputs, use delegation for metered billing. Also explains the confirmation flow when max_price_lamports is unset, and the re-polling behavior for long jobs, giving clear decision criteria for the agent.

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