{
  "name": "ListCustomerSegments",
  "fully_qualified_name": "SquareupApi.ListCustomerSegments@2.0.0",
  "description": "Retrieve customer segments for a business.\n\nUse this tool to get the current list of customer segments associated with a business. Ideal for understanding customer categorization and segmentation.",
  "toolkit": {
    "name": "ArcadeSquareupApi",
    "description": null,
    "version": "2.0.0"
  },
  "input": {
    "parameters": [
      {
        "name": "pagination_cursor",
        "required": false,
        "description": "A pagination cursor for retrieving the next set of customer segment results. Use a cursor returned from a previous call to continue listing.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "cursor"
      },
      {
        "name": "max_results_per_page",
        "required": false,
        "description": "The maximum number of results to return in a single page. Value must be between 1 and 50. Default is 50.",
        "value_schema": {
          "val_type": "integer",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "limit"
      }
    ]
  },
  "output": {
    "description": "Response from the API endpoint 'ListCustomerSegments'.",
    "available_modes": [
      "value",
      "error",
      "null"
    ],
    "value_schema": {
      "val_type": "json",
      "inner_val_type": null,
      "enum": null,
      "properties": null,
      "inner_properties": null,
      "description": null
    }
  },
  "requirements": {
    "authorization": {
      "provider_id": "arcade-squareup",
      "provider_type": "oauth2",
      "id": null,
      "oauth2": {
        "scopes": [
          "CUSTOMERS_READ"
        ]
      }
    },
    "secrets": null,
    "metadata": null
  },
  "deprecation_message": null,
  "metadata": {
    "object_type": "api_wrapper_tool",
    "version": "1.1.0",
    "description": "Tools that enable LLMs to interact directly with the squareup API."
  },
  "http_endpoint": {
    "metadata": {
      "object_type": "http_endpoint",
      "version": "1.2.0",
      "description": ""
    },
    "url": "https://connect.squareup.com/v2/customers/segments",
    "http_method": "GET",
    "headers": {},
    "parameters": [
      {
        "name": "cursor",
        "tool_parameter_name": "pagination_cursor",
        "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)."
        },
        "accepted_as": "query",
        "required": false,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "limit",
        "tool_parameter_name": "max_results_per_page",
        "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).",
        "value_schema": {
          "val_type": "integer",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)."
        },
        "accepted_as": "query",
        "required": false,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      }
    ],
    "documentation_urls": [],
    "secrets": [
      {
        "arcade_key": "auth_token",
        "parameter_name": "Authorization",
        "accepted_as": "header",
        "formatted_value": "Bearer {authorization}",
        "description": "The OAuth token to use for authentication.",
        "is_auth_token": true
      }
    ],
    "request_body_spec": null,
    "use_request_body_schema_mode": false,
    "validate_request_body_schema": false
  }
}
