{
  "name": "xdc-taskman",
  "version": "0.1.0",
  "description": "Pay for x402 services on XDC with USDC via a custodial wallet. The agent never pays gas (EIP-3009).",
  "bin": "xdc-taskman",
  "tools": [
    {
      "name": "login",
      "description": "Authenticate with email + OTP; creates or loads the user's XDC wallet.",
      "command": "xdc-taskman login --email {email} --code {code}",
      "parameters": {
        "type": "object",
        "properties": {
          "email": { "type": "string", "description": "User email for the OTP login." },
          "code": { "type": "string", "description": "The one-time code (omit to be prompted)." }
        },
        "required": ["email"]
      }
    },
    {
      "name": "wallet_address",
      "description": "Print the user's XDC wallet address (to fund with USDC).",
      "command": "xdc-taskman wallet address",
      "parameters": { "type": "object", "properties": {} }
    },
    {
      "name": "wallet_balance",
      "description": "Show the wallet's USDC and native XDC balance.",
      "command": "xdc-taskman wallet balance",
      "parameters": { "type": "object", "properties": {} }
    },
    {
      "name": "wallet_transfer",
      "description": "Gaslessly transfer a token (USDC) to another EVM address; a relayer pays the XDC gas. Returns the explorer link and success/failure.",
      "command": "xdc-taskman wallet transfer {amount} {token} {to}",
      "parameters": {
        "type": "object",
        "properties": {
          "amount": { "type": "string", "description": "Amount as a decimal string, e.g. \"0.5\"." },
          "token": { "type": "string", "description": "Token symbol or address. Currently USDC." },
          "to": { "type": "string", "description": "Recipient EVM address (0x...)." }
        },
        "required": ["amount", "token", "to"]
      }
    },
    {
      "name": "marketplace_list",
      "description": "List/search curated x402 services on the live catalog. Use search (comma-separated keywords) to rank by tags + capability and find the most relevant API for a task.",
      "command": "xdc-taskman marketplace list --search {search} --capability {capability} --max-price {maxPrice}",
      "parameters": {
        "type": "object",
        "properties": {
          "search": { "type": "string", "description": "Comma-separated keywords, e.g. \"email,domains\" — ranked, best match first." },
          "capability": { "type": "string" },
          "maxPrice": { "type": "string", "description": "Max price in USDC, e.g. \"0.05\"." }
        }
      }
    },
    {
      "name": "call",
      "description": "Call an x402 URL; auto-pays on HTTP 402 and returns the result. No gas paid by the user.",
      "command": "xdc-taskman call {url} --method {method} --data {data}",
      "parameters": {
        "type": "object",
        "properties": {
          "url": { "type": "string", "description": "The x402 service URL." },
          "method": { "type": "string", "enum": ["GET", "POST"], "default": "GET" },
          "data": { "type": "string", "description": "JSON body for POST requests." }
        },
        "required": ["url"]
      }
    }
  ]
}
