Skip to main content
Glama

Agent402.Tools: pay-per-call web tools

Decide: execute a plan

decide.execute

[wallet-required, $0.001/call] Run a decision's plan through Agent402: first-party steps run directly, third-party steps are bought from the seller and resold to you (you pay on Base, or by credits or card) at the seller's price plus a disclosed markup. Priced at the plan's budget (or your maxBudgetUsd, whichever you set) less a valid execution credit; spend stops at that budget, fallbacks are tried in order, and any unspent amount comes back as a credit. A run where no step succeeds is not charged. Also runs a free plan sketch: pass the sketch's tool slugs as steps (no decisionId) with params for step 1, and each later step takes its one required input from the step before, at list price. Takes up to 3 minutes to answer: keep the connection open for at least 210 seconds, because a client that disconnects first loses the answer, or send the paid call with "Prefer: respond-async" to get a job link at once and collect the answer from it (payment still settles only on a delivered result). Returns { runId, decisionId, status, steps, budgetUsd, spentUsd, paidUsd, creditAppliedUsd }. This hosted connector holds no wallet: pay it here over MPP, or run npx agent402-mcp with a funded wallet (AGENT_KEY) or a prepaid credits key already issued (AGENT402_CREDITS_KEY), or any x402 client.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsNoInstead of decisionId: the tool slugs of a free plan sketch (from /api/find or /api/route), 2 to 5, in order. Pass params for step 1; a later step takes its one required input from the step before.
paramsNoPer-step params overriding the plan's exampleParams, keyed by step number
decisionIdNoFrom POST /api/decide (or pass steps instead)
creditTokenNoexecutionCredit.token from that decision (optional)
maxBudgetUsdNoSpend ceiling for the run (default: the plan's estimate via Agent402)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdNo
stepsNo
statusNo
paidUsdNo
spentUsdNo
budgetUsdNo
decisionIdNo
routingFeePctNo
leftoverCreditNo
creditAppliedUsdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / decisionId / description
      Previous value: -"From POST /api/decide"New value: +"From POST /api/decide (or pass steps instead)"
    • addedInput schema / properties / steps
      Added value: +{
      +  "description": "Instead of decisionId: the tool slugs of a free plan sketch (from /api/find or /api/route), 2 to 5, in order. Pass params for step 1; a later step takes its one required input from the step before.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "decisionId"
      -]New value: +[]
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.