{
  "service": "uniswap_api",
  "displayName": "Uniswap API",
  "categories": [
    "Finance",
    "Developer Tools"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "UNISWAP_API_KEY",
      "description": "Uniswap Trading API key sent with the x-api-key header. Create or manage it from the official Uniswap developer portal for the Trading API.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://uniswap.org",
  "actions": [
    {
      "id": "uniswap_api.check_approval",
      "service": "uniswap_api",
      "name": "check_approval",
      "description": "Check whether the swapper wallet needs an ERC-20 approval transaction before swapping.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "walletAddress": {
            "type": "string",
            "minLength": 1,
            "description": "The wallet address that would send the token.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "token": {
            "type": "string",
            "minLength": 1,
            "description": "The token contract address to approve.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "amount": {
            "type": "string",
            "minLength": 1,
            "description": "The token amount that must be spendable.",
            "pattern": "^[0-9]+$"
          },
          "chainId": {
            "oneOf": [
              {
                "const": 1,
                "type": "number",
                "description": "The chain ID 1."
              },
              {
                "const": 10,
                "type": "number",
                "description": "The chain ID 10."
              },
              {
                "const": 56,
                "type": "number",
                "description": "The chain ID 56."
              },
              {
                "const": 130,
                "type": "number",
                "description": "The chain ID 130."
              },
              {
                "const": 137,
                "type": "number",
                "description": "The chain ID 137."
              },
              {
                "const": 143,
                "type": "number",
                "description": "The chain ID 143."
              },
              {
                "const": 196,
                "type": "number",
                "description": "The chain ID 196."
              },
              {
                "const": 324,
                "type": "number",
                "description": "The chain ID 324."
              },
              {
                "const": 480,
                "type": "number",
                "description": "The chain ID 480."
              },
              {
                "const": 1301,
                "type": "number",
                "description": "The chain ID 1301."
              },
              {
                "const": 1868,
                "type": "number",
                "description": "The chain ID 1868."
              },
              {
                "const": 4217,
                "type": "number",
                "description": "The chain ID 4217."
              },
              {
                "const": 4326,
                "type": "number",
                "description": "The chain ID 4326."
              },
              {
                "const": 8453,
                "type": "number",
                "description": "The chain ID 8453."
              },
              {
                "const": 84532,
                "type": "number",
                "description": "The chain ID 84532."
              },
              {
                "const": 10143,
                "type": "number",
                "description": "The chain ID 10143."
              },
              {
                "const": 42161,
                "type": "number",
                "description": "The chain ID 42161."
              },
              {
                "const": 42220,
                "type": "number",
                "description": "The chain ID 42220."
              },
              {
                "const": 43114,
                "type": "number",
                "description": "The chain ID 43114."
              },
              {
                "const": 59144,
                "type": "number",
                "description": "The chain ID 59144."
              },
              {
                "const": 81457,
                "type": "number",
                "description": "The chain ID 81457."
              },
              {
                "const": 7777777,
                "type": "number",
                "description": "The chain ID 7777777."
              },
              {
                "const": 11155111,
                "type": "number",
                "description": "The chain ID 11155111."
              }
            ],
            "description": "The blockchain chain ID supported by the Uniswap Trading API."
          },
          "urgency": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "normal",
                  "fast",
                  "urgent"
                ],
                "description": "One simple urgency level."
              },
              {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "fast",
                      "urgent"
                    ],
                    "description": "The urgency level."
                  },
                  "overrides": {
                    "type": "object",
                    "properties": {
                      "maxPriorityFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum priority fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "maxFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum total fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "gasLimit": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The replacement gas limit cap in gas units.",
                        "pattern": "^[0-9]+$"
                      }
                    },
                    "additionalProperties": false,
                    "description": "Optional gas caps applied on top of the selected urgency tier."
                  }
                },
                "additionalProperties": false,
                "description": "An urgency level with optional gas caps."
              }
            ],
            "description": "The urgency mode used for approval or swap pricing."
          },
          "includeGasInfo": {
            "type": "boolean",
            "description": "Whether the gas-fee fields should be requested from Uniswap."
          },
          "tokenOut": {
            "type": "string",
            "minLength": 1,
            "description": "The output token address when provided for routing context.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "tokenOutChainId": {
            "oneOf": [
              {
                "const": 1,
                "type": "number",
                "description": "The chain ID 1."
              },
              {
                "const": 10,
                "type": "number",
                "description": "The chain ID 10."
              },
              {
                "const": 56,
                "type": "number",
                "description": "The chain ID 56."
              },
              {
                "const": 130,
                "type": "number",
                "description": "The chain ID 130."
              },
              {
                "const": 137,
                "type": "number",
                "description": "The chain ID 137."
              },
              {
                "const": 143,
                "type": "number",
                "description": "The chain ID 143."
              },
              {
                "const": 196,
                "type": "number",
                "description": "The chain ID 196."
              },
              {
                "const": 324,
                "type": "number",
                "description": "The chain ID 324."
              },
              {
                "const": 480,
                "type": "number",
                "description": "The chain ID 480."
              },
              {
                "const": 1301,
                "type": "number",
                "description": "The chain ID 1301."
              },
              {
                "const": 1868,
                "type": "number",
                "description": "The chain ID 1868."
              },
              {
                "const": 4217,
                "type": "number",
                "description": "The chain ID 4217."
              },
              {
                "const": 4326,
                "type": "number",
                "description": "The chain ID 4326."
              },
              {
                "const": 8453,
                "type": "number",
                "description": "The chain ID 8453."
              },
              {
                "const": 84532,
                "type": "number",
                "description": "The chain ID 84532."
              },
              {
                "const": 10143,
                "type": "number",
                "description": "The chain ID 10143."
              },
              {
                "const": 42161,
                "type": "number",
                "description": "The chain ID 42161."
              },
              {
                "const": 42220,
                "type": "number",
                "description": "The chain ID 42220."
              },
              {
                "const": 43114,
                "type": "number",
                "description": "The chain ID 43114."
              },
              {
                "const": 59144,
                "type": "number",
                "description": "The chain ID 59144."
              },
              {
                "const": 81457,
                "type": "number",
                "description": "The chain ID 81457."
              },
              {
                "const": 7777777,
                "type": "number",
                "description": "The chain ID 7777777."
              },
              {
                "const": 11155111,
                "type": "number",
                "description": "The chain ID 11155111."
              }
            ],
            "description": "The blockchain chain ID supported by the Uniswap Trading API."
          },
          "enablePermit2": {
            "type": "boolean",
            "description": "Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true."
          }
        },
        "additionalProperties": false,
        "required": [
          "walletAddress",
          "token",
          "amount",
          "chainId"
        ],
        "description": "Input parameters for checking whether a wallet approval transaction is required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "minLength": 1,
            "description": "The upstream Uniswap request identifier."
          },
          "approval": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction recipient address.",
                    "pattern": "^(0x)?[0-9a-fA-F]{40}$"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction sender address.",
                    "pattern": "^(0x)?[0-9a-fA-F]{40}$"
                  },
                  "data": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction calldata."
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction value in wei.",
                    "pattern": "^[0-9]+$"
                  },
                  "chainId": {
                    "oneOf": [
                      {
                        "const": 1,
                        "type": "number",
                        "description": "The chain ID 1."
                      },
                      {
                        "const": 10,
                        "type": "number",
                        "description": "The chain ID 10."
                      },
                      {
                        "const": 56,
                        "type": "number",
                        "description": "The chain ID 56."
                      },
                      {
                        "const": 130,
                        "type": "number",
                        "description": "The chain ID 130."
                      },
                      {
                        "const": 137,
                        "type": "number",
                        "description": "The chain ID 137."
                      },
                      {
                        "const": 143,
                        "type": "number",
                        "description": "The chain ID 143."
                      },
                      {
                        "const": 196,
                        "type": "number",
                        "description": "The chain ID 196."
                      },
                      {
                        "const": 324,
                        "type": "number",
                        "description": "The chain ID 324."
                      },
                      {
                        "const": 480,
                        "type": "number",
                        "description": "The chain ID 480."
                      },
                      {
                        "const": 1301,
                        "type": "number",
                        "description": "The chain ID 1301."
                      },
                      {
                        "const": 1868,
                        "type": "number",
                        "description": "The chain ID 1868."
                      },
                      {
                        "const": 4217,
                        "type": "number",
                        "description": "The chain ID 4217."
                      },
                      {
                        "const": 4326,
                        "type": "number",
                        "description": "The chain ID 4326."
                      },
                      {
                        "const": 8453,
                        "type": "number",
                        "description": "The chain ID 8453."
                      },
                      {
                        "const": 84532,
                        "type": "number",
                        "description": "The chain ID 84532."
                      },
                      {
                        "const": 10143,
                        "type": "number",
                        "description": "The chain ID 10143."
                      },
                      {
                        "const": 42161,
                        "type": "number",
                        "description": "The chain ID 42161."
                      },
                      {
                        "const": 42220,
                        "type": "number",
                        "description": "The chain ID 42220."
                      },
                      {
                        "const": 43114,
                        "type": "number",
                        "description": "The chain ID 43114."
                      },
                      {
                        "const": 59144,
                        "type": "number",
                        "description": "The chain ID 59144."
                      },
                      {
                        "const": 81457,
                        "type": "number",
                        "description": "The chain ID 81457."
                      },
                      {
                        "const": 7777777,
                        "type": "number",
                        "description": "The chain ID 7777777."
                      },
                      {
                        "const": 11155111,
                        "type": "number",
                        "description": "The chain ID 11155111."
                      }
                    ],
                    "description": "The blockchain chain ID supported by the Uniswap Trading API."
                  },
                  "gasLimit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The gas limit returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxFeePerGas": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The max fee per gas returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxPriorityFeePerGas": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The max priority fee per gas returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "gasPrice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The gas price returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "One transaction request returned by Uniswap."
              },
              {
                "type": "null"
              }
            ]
          },
          "cancel": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction recipient address.",
                    "pattern": "^(0x)?[0-9a-fA-F]{40}$"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction sender address.",
                    "pattern": "^(0x)?[0-9a-fA-F]{40}$"
                  },
                  "data": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction calldata."
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The transaction value in wei.",
                    "pattern": "^[0-9]+$"
                  },
                  "chainId": {
                    "oneOf": [
                      {
                        "const": 1,
                        "type": "number",
                        "description": "The chain ID 1."
                      },
                      {
                        "const": 10,
                        "type": "number",
                        "description": "The chain ID 10."
                      },
                      {
                        "const": 56,
                        "type": "number",
                        "description": "The chain ID 56."
                      },
                      {
                        "const": 130,
                        "type": "number",
                        "description": "The chain ID 130."
                      },
                      {
                        "const": 137,
                        "type": "number",
                        "description": "The chain ID 137."
                      },
                      {
                        "const": 143,
                        "type": "number",
                        "description": "The chain ID 143."
                      },
                      {
                        "const": 196,
                        "type": "number",
                        "description": "The chain ID 196."
                      },
                      {
                        "const": 324,
                        "type": "number",
                        "description": "The chain ID 324."
                      },
                      {
                        "const": 480,
                        "type": "number",
                        "description": "The chain ID 480."
                      },
                      {
                        "const": 1301,
                        "type": "number",
                        "description": "The chain ID 1301."
                      },
                      {
                        "const": 1868,
                        "type": "number",
                        "description": "The chain ID 1868."
                      },
                      {
                        "const": 4217,
                        "type": "number",
                        "description": "The chain ID 4217."
                      },
                      {
                        "const": 4326,
                        "type": "number",
                        "description": "The chain ID 4326."
                      },
                      {
                        "const": 8453,
                        "type": "number",
                        "description": "The chain ID 8453."
                      },
                      {
                        "const": 84532,
                        "type": "number",
                        "description": "The chain ID 84532."
                      },
                      {
                        "const": 10143,
                        "type": "number",
                        "description": "The chain ID 10143."
                      },
                      {
                        "const": 42161,
                        "type": "number",
                        "description": "The chain ID 42161."
                      },
                      {
                        "const": 42220,
                        "type": "number",
                        "description": "The chain ID 42220."
                      },
                      {
                        "const": 43114,
                        "type": "number",
                        "description": "The chain ID 43114."
                      },
                      {
                        "const": 59144,
                        "type": "number",
                        "description": "The chain ID 59144."
                      },
                      {
                        "const": 81457,
                        "type": "number",
                        "description": "The chain ID 81457."
                      },
                      {
                        "const": 7777777,
                        "type": "number",
                        "description": "The chain ID 7777777."
                      },
                      {
                        "const": 11155111,
                        "type": "number",
                        "description": "The chain ID 11155111."
                      }
                    ],
                    "description": "The blockchain chain ID supported by the Uniswap Trading API."
                  },
                  "gasLimit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The gas limit returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxFeePerGas": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The max fee per gas returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxPriorityFeePerGas": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The max priority fee per gas returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "gasPrice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "The gas price returned by Uniswap when present.",
                        "pattern": "^[0-9]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "One transaction request returned by Uniswap."
              },
              {
                "type": "null"
              }
            ]
          },
          "gasFee": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The estimated gas cost for the approval transaction.",
                "pattern": "^[0-9]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelGasFee": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The estimated gas cost for the approval-reset transaction.",
                "pattern": "^[0-9]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "approval",
          "cancel",
          "gasFee",
          "cancelGasFee"
        ],
        "description": "The normalized Uniswap approval-check response."
      }
    },
    {
      "id": "uniswap_api.create_swap",
      "service": "uniswap_api",
      "name": "create_swap",
      "description": "Create the transaction calldata for a Uniswap swap from a prior quote and optional permit signature.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "quote": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The prior Uniswap quote object to convert into swap calldata."
          },
          "signature": {
            "type": "string",
            "minLength": 1,
            "description": "The signed Permit2 signature when one is required."
          },
          "permitData": {
            "type": "object",
            "properties": {
              "domain": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The EIP-712 domain object returned by Uniswap."
              },
              "values": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The permit values object returned by Uniswap."
              },
              "types": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The permit type map returned by Uniswap."
              }
            },
            "additionalProperties": false,
            "description": "The Permit2 payload returned by Uniswap when applicable."
          },
          "refreshGasPrice": {
            "type": "boolean",
            "description": "Whether Uniswap should refresh gas pricing."
          },
          "simulateTransaction": {
            "type": "boolean",
            "description": "Whether Uniswap should simulate the transaction."
          },
          "safetyMode": {
            "type": "string",
            "enum": [
              "SAFE",
              "FAST"
            ],
            "description": "The swap safety mode accepted by the /swap endpoint."
          },
          "deadline": {
            "type": "string",
            "minLength": 1,
            "description": "The swap deadline timestamp in seconds.",
            "pattern": "^[0-9]+$"
          },
          "urgency": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "normal",
                  "fast",
                  "urgent"
                ],
                "description": "One simple urgency level."
              },
              {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "fast",
                      "urgent"
                    ],
                    "description": "The urgency level."
                  },
                  "overrides": {
                    "type": "object",
                    "properties": {
                      "maxPriorityFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum priority fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "maxFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum total fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "gasLimit": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The replacement gas limit cap in gas units.",
                        "pattern": "^[0-9]+$"
                      }
                    },
                    "additionalProperties": false,
                    "description": "Optional gas caps applied on top of the selected urgency tier."
                  }
                },
                "additionalProperties": false,
                "description": "An urgency level with optional gas caps."
              }
            ],
            "description": "The urgency mode used for approval or swap pricing."
          },
          "enableUniversalRouter": {
            "type": "boolean",
            "description": "Whether to send the public x-universal-router-version header as version 2.0."
          },
          "enablePermit2": {
            "type": "boolean",
            "description": "Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true."
          }
        },
        "additionalProperties": false,
        "required": [
          "quote"
        ],
        "description": "Input parameters for creating swap calldata."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "minLength": 1,
            "description": "The upstream Uniswap request identifier."
          },
          "swap": {
            "type": "object",
            "properties": {
              "to": {
                "type": "string",
                "minLength": 1,
                "description": "The transaction recipient address.",
                "pattern": "^(0x)?[0-9a-fA-F]{40}$"
              },
              "from": {
                "type": "string",
                "minLength": 1,
                "description": "The transaction sender address.",
                "pattern": "^(0x)?[0-9a-fA-F]{40}$"
              },
              "data": {
                "type": "string",
                "minLength": 1,
                "description": "The transaction calldata."
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "description": "The transaction value in wei.",
                "pattern": "^[0-9]+$"
              },
              "chainId": {
                "oneOf": [
                  {
                    "const": 1,
                    "type": "number",
                    "description": "The chain ID 1."
                  },
                  {
                    "const": 10,
                    "type": "number",
                    "description": "The chain ID 10."
                  },
                  {
                    "const": 56,
                    "type": "number",
                    "description": "The chain ID 56."
                  },
                  {
                    "const": 130,
                    "type": "number",
                    "description": "The chain ID 130."
                  },
                  {
                    "const": 137,
                    "type": "number",
                    "description": "The chain ID 137."
                  },
                  {
                    "const": 143,
                    "type": "number",
                    "description": "The chain ID 143."
                  },
                  {
                    "const": 196,
                    "type": "number",
                    "description": "The chain ID 196."
                  },
                  {
                    "const": 324,
                    "type": "number",
                    "description": "The chain ID 324."
                  },
                  {
                    "const": 480,
                    "type": "number",
                    "description": "The chain ID 480."
                  },
                  {
                    "const": 1301,
                    "type": "number",
                    "description": "The chain ID 1301."
                  },
                  {
                    "const": 1868,
                    "type": "number",
                    "description": "The chain ID 1868."
                  },
                  {
                    "const": 4217,
                    "type": "number",
                    "description": "The chain ID 4217."
                  },
                  {
                    "const": 4326,
                    "type": "number",
                    "description": "The chain ID 4326."
                  },
                  {
                    "const": 8453,
                    "type": "number",
                    "description": "The chain ID 8453."
                  },
                  {
                    "const": 84532,
                    "type": "number",
                    "description": "The chain ID 84532."
                  },
                  {
                    "const": 10143,
                    "type": "number",
                    "description": "The chain ID 10143."
                  },
                  {
                    "const": 42161,
                    "type": "number",
                    "description": "The chain ID 42161."
                  },
                  {
                    "const": 42220,
                    "type": "number",
                    "description": "The chain ID 42220."
                  },
                  {
                    "const": 43114,
                    "type": "number",
                    "description": "The chain ID 43114."
                  },
                  {
                    "const": 59144,
                    "type": "number",
                    "description": "The chain ID 59144."
                  },
                  {
                    "const": 81457,
                    "type": "number",
                    "description": "The chain ID 81457."
                  },
                  {
                    "const": 7777777,
                    "type": "number",
                    "description": "The chain ID 7777777."
                  },
                  {
                    "const": 11155111,
                    "type": "number",
                    "description": "The chain ID 11155111."
                  }
                ],
                "description": "The blockchain chain ID supported by the Uniswap Trading API."
              },
              "gasLimit": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "description": "The gas limit returned by Uniswap when present.",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maxFeePerGas": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "description": "The max fee per gas returned by Uniswap when present.",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maxPriorityFeePerGas": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "description": "The max priority fee per gas returned by Uniswap when present.",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "gasPrice": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "description": "The gas price returned by Uniswap when present.",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "One transaction request returned by Uniswap."
          },
          "gasFee": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The estimated gas cost for the swap transaction.",
                "pattern": "^[0-9]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "swap"
        ],
        "description": "The normalized Uniswap swap-calldata response."
      }
    },
    {
      "id": "uniswap_api.get_quote",
      "service": "uniswap_api",
      "name": "get_quote",
      "description": "Request a Uniswap trade quote for one wallet, token pair, and amount.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EXACT_INPUT",
              "EXACT_OUTPUT"
            ],
            "description": "How Uniswap interprets the requested amount."
          },
          "amount": {
            "type": "string",
            "minLength": 1,
            "description": "The input or output amount in token base units.",
            "pattern": "^[0-9]+$"
          },
          "tokenInChainId": {
            "oneOf": [
              {
                "const": 1,
                "type": "number",
                "description": "The chain ID 1."
              },
              {
                "const": 10,
                "type": "number",
                "description": "The chain ID 10."
              },
              {
                "const": 56,
                "type": "number",
                "description": "The chain ID 56."
              },
              {
                "const": 130,
                "type": "number",
                "description": "The chain ID 130."
              },
              {
                "const": 137,
                "type": "number",
                "description": "The chain ID 137."
              },
              {
                "const": 143,
                "type": "number",
                "description": "The chain ID 143."
              },
              {
                "const": 196,
                "type": "number",
                "description": "The chain ID 196."
              },
              {
                "const": 324,
                "type": "number",
                "description": "The chain ID 324."
              },
              {
                "const": 480,
                "type": "number",
                "description": "The chain ID 480."
              },
              {
                "const": 1301,
                "type": "number",
                "description": "The chain ID 1301."
              },
              {
                "const": 1868,
                "type": "number",
                "description": "The chain ID 1868."
              },
              {
                "const": 4217,
                "type": "number",
                "description": "The chain ID 4217."
              },
              {
                "const": 4326,
                "type": "number",
                "description": "The chain ID 4326."
              },
              {
                "const": 8453,
                "type": "number",
                "description": "The chain ID 8453."
              },
              {
                "const": 84532,
                "type": "number",
                "description": "The chain ID 84532."
              },
              {
                "const": 10143,
                "type": "number",
                "description": "The chain ID 10143."
              },
              {
                "const": 42161,
                "type": "number",
                "description": "The chain ID 42161."
              },
              {
                "const": 42220,
                "type": "number",
                "description": "The chain ID 42220."
              },
              {
                "const": 43114,
                "type": "number",
                "description": "The chain ID 43114."
              },
              {
                "const": 59144,
                "type": "number",
                "description": "The chain ID 59144."
              },
              {
                "const": 81457,
                "type": "number",
                "description": "The chain ID 81457."
              },
              {
                "const": 7777777,
                "type": "number",
                "description": "The chain ID 7777777."
              },
              {
                "const": 11155111,
                "type": "number",
                "description": "The chain ID 11155111."
              }
            ],
            "description": "The blockchain chain ID supported by the Uniswap Trading API."
          },
          "tokenOutChainId": {
            "oneOf": [
              {
                "const": 1,
                "type": "number",
                "description": "The chain ID 1."
              },
              {
                "const": 10,
                "type": "number",
                "description": "The chain ID 10."
              },
              {
                "const": 56,
                "type": "number",
                "description": "The chain ID 56."
              },
              {
                "const": 130,
                "type": "number",
                "description": "The chain ID 130."
              },
              {
                "const": 137,
                "type": "number",
                "description": "The chain ID 137."
              },
              {
                "const": 143,
                "type": "number",
                "description": "The chain ID 143."
              },
              {
                "const": 196,
                "type": "number",
                "description": "The chain ID 196."
              },
              {
                "const": 324,
                "type": "number",
                "description": "The chain ID 324."
              },
              {
                "const": 480,
                "type": "number",
                "description": "The chain ID 480."
              },
              {
                "const": 1301,
                "type": "number",
                "description": "The chain ID 1301."
              },
              {
                "const": 1868,
                "type": "number",
                "description": "The chain ID 1868."
              },
              {
                "const": 4217,
                "type": "number",
                "description": "The chain ID 4217."
              },
              {
                "const": 4326,
                "type": "number",
                "description": "The chain ID 4326."
              },
              {
                "const": 8453,
                "type": "number",
                "description": "The chain ID 8453."
              },
              {
                "const": 84532,
                "type": "number",
                "description": "The chain ID 84532."
              },
              {
                "const": 10143,
                "type": "number",
                "description": "The chain ID 10143."
              },
              {
                "const": 42161,
                "type": "number",
                "description": "The chain ID 42161."
              },
              {
                "const": 42220,
                "type": "number",
                "description": "The chain ID 42220."
              },
              {
                "const": 43114,
                "type": "number",
                "description": "The chain ID 43114."
              },
              {
                "const": 59144,
                "type": "number",
                "description": "The chain ID 59144."
              },
              {
                "const": 81457,
                "type": "number",
                "description": "The chain ID 81457."
              },
              {
                "const": 7777777,
                "type": "number",
                "description": "The chain ID 7777777."
              },
              {
                "const": 11155111,
                "type": "number",
                "description": "The chain ID 11155111."
              }
            ],
            "description": "The blockchain chain ID supported by the Uniswap Trading API."
          },
          "tokenIn": {
            "type": "string",
            "minLength": 1,
            "description": "The input token contract address.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "tokenOut": {
            "type": "string",
            "minLength": 1,
            "description": "The output token contract address.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "swapper": {
            "type": "string",
            "minLength": 1,
            "description": "The wallet address that will submit the transaction.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "recipient": {
            "type": "string",
            "minLength": 1,
            "description": "The wallet address that should receive the output token.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "slippageTolerance": {
            "type": "number",
            "minimum": 0,
            "description": "The manual slippage tolerance percentage."
          },
          "autoSlippage": {
            "type": "string",
            "enum": [
              "DEFAULT"
            ],
            "description": "The automatic slippage strategy supported by the public Uniswap API."
          },
          "routingPreference": {
            "type": "string",
            "enum": [
              "BEST_PRICE",
              "FASTEST"
            ],
            "description": "The quote routing preference for Uniswap route selection."
          },
          "protocols": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "V2",
                "V3",
                "V4",
                "UNISWAPX",
                "UNISWAPX_V2",
                "UNISWAPX_V3"
              ],
              "description": "One Uniswap routing protocol identifier."
            },
            "description": "The protocols Uniswap may use for routing.",
            "minItems": 1
          },
          "urgency": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "normal",
                  "fast",
                  "urgent"
                ],
                "description": "One simple urgency level."
              },
              {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "fast",
                      "urgent"
                    ],
                    "description": "The urgency level."
                  },
                  "overrides": {
                    "type": "object",
                    "properties": {
                      "maxPriorityFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum priority fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "maxFeePerGas": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The maximum total fee per gas in wei.",
                        "pattern": "^[0-9]+$"
                      },
                      "gasLimit": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The replacement gas limit cap in gas units.",
                        "pattern": "^[0-9]+$"
                      }
                    },
                    "additionalProperties": false,
                    "description": "Optional gas caps applied on top of the selected urgency tier."
                  }
                },
                "additionalProperties": false,
                "description": "An urgency level with optional gas caps."
              }
            ],
            "description": "The urgency mode used for approval or swap pricing."
          },
          "permitAmount": {
            "type": "string",
            "enum": [
              "FULL",
              "EXACT"
            ],
            "description": "The permit allowance mode included in a quote response when Permit2 is enabled."
          },
          "spreadOptimization": {
            "type": "string",
            "enum": [
              "EXECUTION",
              "PRICE"
            ],
            "description": "The UniswapX spread optimization strategy when applicable."
          },
          "generatePermitAsTransaction": {
            "type": "boolean",
            "description": "Whether Permit2 should be generated as an onchain transaction instead of a signature."
          },
          "enableUniversalRouter": {
            "type": "boolean",
            "description": "Whether to send the public x-universal-router-version header as version 2.0."
          },
          "enablePermit2": {
            "type": "boolean",
            "description": "Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true."
          }
        },
        "additionalProperties": false,
        "required": [
          "type",
          "amount",
          "tokenInChainId",
          "tokenOutChainId",
          "tokenIn",
          "tokenOut",
          "swapper"
        ],
        "description": "Input parameters for requesting a Uniswap trade quote."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "minLength": 1,
            "description": "The upstream Uniswap request identifier."
          },
          "routing": {
            "type": "string",
            "description": "The routing family returned by Uniswap."
          },
          "quoteId": {
            "type": "string",
            "minLength": 1,
            "description": "The quote identifier returned by Uniswap."
          },
          "chainId": {
            "oneOf": [
              {
                "const": 1,
                "type": "number",
                "description": "The chain ID 1."
              },
              {
                "const": 10,
                "type": "number",
                "description": "The chain ID 10."
              },
              {
                "const": 56,
                "type": "number",
                "description": "The chain ID 56."
              },
              {
                "const": 130,
                "type": "number",
                "description": "The chain ID 130."
              },
              {
                "const": 137,
                "type": "number",
                "description": "The chain ID 137."
              },
              {
                "const": 143,
                "type": "number",
                "description": "The chain ID 143."
              },
              {
                "const": 196,
                "type": "number",
                "description": "The chain ID 196."
              },
              {
                "const": 324,
                "type": "number",
                "description": "The chain ID 324."
              },
              {
                "const": 480,
                "type": "number",
                "description": "The chain ID 480."
              },
              {
                "const": 1301,
                "type": "number",
                "description": "The chain ID 1301."
              },
              {
                "const": 1868,
                "type": "number",
                "description": "The chain ID 1868."
              },
              {
                "const": 4217,
                "type": "number",
                "description": "The chain ID 4217."
              },
              {
                "const": 4326,
                "type": "number",
                "description": "The chain ID 4326."
              },
              {
                "const": 8453,
                "type": "number",
                "description": "The chain ID 8453."
              },
              {
                "const": 84532,
                "type": "number",
                "description": "The chain ID 84532."
              },
              {
                "const": 10143,
                "type": "number",
                "description": "The chain ID 10143."
              },
              {
                "const": 42161,
                "type": "number",
                "description": "The chain ID 42161."
              },
              {
                "const": 42220,
                "type": "number",
                "description": "The chain ID 42220."
              },
              {
                "const": 43114,
                "type": "number",
                "description": "The chain ID 43114."
              },
              {
                "const": 59144,
                "type": "number",
                "description": "The chain ID 59144."
              },
              {
                "const": 81457,
                "type": "number",
                "description": "The chain ID 81457."
              },
              {
                "const": 7777777,
                "type": "number",
                "description": "The chain ID 7777777."
              },
              {
                "const": 11155111,
                "type": "number",
                "description": "The chain ID 11155111."
              }
            ],
            "description": "The blockchain chain ID supported by the Uniswap Trading API."
          },
          "swapper": {
            "type": "string",
            "minLength": 1,
            "description": "The wallet address tied to this quote.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "tradeType": {
            "type": "string",
            "enum": [
              "EXACT_INPUT",
              "EXACT_OUTPUT"
            ],
            "description": "How Uniswap interprets the requested amount."
          },
          "inputToken": {
            "type": "string",
            "minLength": 1,
            "description": "The quoted input token address.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "inputAmount": {
            "type": "string",
            "minLength": 1,
            "description": "The quoted input amount in base units.",
            "pattern": "^[0-9]+$"
          },
          "outputToken": {
            "type": "string",
            "minLength": 1,
            "description": "The quoted output token address.",
            "pattern": "^(0x)?[0-9a-fA-F]{40}$"
          },
          "outputAmount": {
            "type": "string",
            "minLength": 1,
            "description": "The quoted output amount in base units.",
            "pattern": "^[0-9]+$"
          },
          "recipient": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The output recipient when Uniswap returns one.",
                "pattern": "^(0x)?[0-9a-fA-F]{40}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "slippage": {
            "anyOf": [
              {
                "type": "number",
                "description": "The quoted slippage tolerance percentage when returned."
              },
              {
                "type": "null"
              }
            ]
          },
          "gasFee": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The total estimated gas cost in wei when returned.",
                "pattern": "^[0-9]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "gasFeeUsd": {
            "anyOf": [
              {
                "type": "string",
                "description": "The total estimated gas cost denominated in USDC."
              },
              {
                "type": "null"
              }
            ]
          },
          "gasUseEstimate": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "The gas use estimate when returned.",
                "pattern": "^[0-9]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "txFailureReasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "SIMULATION_ERROR",
                "UNSUPPORTED_SIMULATION",
                "SIMULATION_UNAVAILABLE",
                "SLIPPAGE_TOO_LOW",
                "TRANSFER_FROM_FAILED"
              ],
              "description": "One transaction simulation failure reason returned by Uniswap."
            },
            "description": "Transaction simulation failure reasons returned by Uniswap."
          },
          "permitData": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "The EIP-712 domain object returned by Uniswap."
                  },
                  "values": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "The permit values object returned by Uniswap."
                  },
                  "types": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "The permit type map returned by Uniswap."
                  }
                },
                "additionalProperties": false,
                "description": "The Permit2 payload returned by Uniswap when applicable."
              },
              {
                "type": "null"
              }
            ]
          },
          "route": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "One raw route segment object."
              },
              "description": "One route segment list."
            },
            "description": "The route legs returned by Uniswap as a nested list of raw route segments."
          },
          "rawQuote": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw quote object returned by Uniswap."
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "quoteId",
          "chainId",
          "swapper",
          "tradeType",
          "inputToken",
          "inputAmount",
          "outputToken",
          "outputAmount",
          "txFailureReasons",
          "route",
          "rawQuote"
        ],
        "description": "The normalized Uniswap quote response."
      },
      "followUpActions": [
        "uniswap_api.create_swap"
      ]
    }
  ]
}
