{
  "name": "UpdateListSegment",
  "fully_qualified_name": "MailchimpTransactionApi.UpdateListSegment@0.1.0",
  "description": "Batch update members in a Mailchimp list segment.\n\nUse this tool to batch add or remove members in a specified static segment of a Mailchimp list. This is useful for efficiently managing segment membership within a list.",
  "toolkit": {
    "name": "ArcadeMailchimpMarketingApi",
    "description": null,
    "version": "0.1.0"
  },
  "input": {
    "parameters": [
      {
        "name": "list_unique_id",
        "required": true,
        "description": "The unique identifier for the Mailchimp list.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The unique ID for the list."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "list_id"
      },
      {
        "name": "segment_unique_id",
        "required": true,
        "description": "The unique ID of the segment in the Mailchimp list for member updates.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The unique id for the segment."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "segment_id"
      },
      {
        "name": "emails_to_add_to_segment",
        "required": false,
        "description": "An array of email addresses to add to the specified static segment. Only existing list emails will be added. Limit of 500.",
        "value_schema": {
          "val_type": "array",
          "inner_val_type": "string",
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "members_to_add"
      },
      {
        "name": "emails_to_remove_from_segment",
        "required": false,
        "description": "An array of up to 500 emails to remove from the static segment. Emails not in the list will be ignored.",
        "value_schema": {
          "val_type": "array",
          "inner_val_type": "string",
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "members_to_remove"
      }
    ]
  },
  "output": {
    "description": "Response from the API endpoint 'postListsIdSegmentsId'.",
    "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-mailchimp",
      "provider_type": "oauth2",
      "id": null,
      "oauth2": null
    },
    "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 Mailchimp Marketing API."
  },
  "http_endpoint": {
    "metadata": {
      "object_type": "http_endpoint",
      "version": "1.2.0",
      "description": ""
    },
    "url": "/lists/{list_id}/segments/{segment_id}",
    "http_method": "POST",
    "headers": {},
    "parameters": [
      {
        "name": "list_id",
        "tool_parameter_name": "list_unique_id",
        "description": "The unique ID for the list.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The unique ID for the list."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "segment_id",
        "tool_parameter_name": "segment_unique_id",
        "description": "The unique id for the segment.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The unique id for the segment."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "members_to_add",
        "tool_parameter_name": "emails_to_add_to_segment",
        "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.",
        "value_schema": {
          "val_type": "array",
          "inner_val_type": "string",
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent."
        },
        "accepted_as": "body",
        "required": false,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "members_to_remove",
        "tool_parameter_name": "emails_to_remove_from_segment",
        "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.",
        "value_schema": {
          "val_type": "array",
          "inner_val_type": "string",
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent."
        },
        "accepted_as": "body",
        "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": "{\n  \"x-moar-converted-from-body-param\": true,\n  \"description\": \"\",\n  \"required\": true,\n  \"content\": {\n    \"application/json\": {\n      \"schema\": {\n        \"type\": \"object\",\n        \"title\": \"Members to add/remove to/from a static segment\",\n        \"description\": \"Members to add/remove to/from a static segment\",\n        \"properties\": {\n          \"members_to_add\": {\n            \"type\": \"array\",\n            \"title\": \"Members to add to the static segment\",\n            \"description\": \"An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"members_to_remove\": {\n            \"type\": \"array\",\n            \"title\": \"Members to remove from the static segment\",\n            \"description\": \"An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. A maximum of 500 members can be sent.\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      }\n    }\n  }\n}",
    "use_request_body_schema_mode": false,
    "validate_request_body_schema": false,
    "url_method_call": "await utils.get_base_url(context, HTTP_CLIENT)",
    "url_method_call_field_name": "base_url"
  }
}
