{
  "name": "SetBranchAppAccessRestrictions",
  "fully_qualified_name": "GithubApi.SetBranchAppAccessRestrictions@0.1.0",
  "description": "Replace apps with push access on a protected branch.\n\nUse this tool to specify which GitHub Apps have push access to a protected branch, replacing any previous app list. It is applicable to public repositories with various GitHub plans and private repositories with higher-tier plans. Only GitHub Apps with write access to the contents permission can be authorized.",
  "toolkit": {
    "name": "ArcadeGithubApi",
    "description": null,
    "version": "0.1.0"
  },
  "input": {
    "parameters": [
      {
        "name": "repository_owner",
        "required": true,
        "description": "The account owner of the repository. The name is not case sensitive.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The account owner of the repository. The name is not case sensitive."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "owner"
      },
      {
        "name": "repository_name",
        "required": true,
        "description": "The name of the repository. It is not case sensitive.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The name of the repository. The name is not case sensitive."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "repo"
      },
      {
        "name": "branch_name",
        "required": true,
        "description": "The exact name of the branch to update app access restrictions for. Wildcard characters are not allowed.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.8/graphql)."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "branch"
      },
      {
        "name": "apps_with_push_access",
        "required": false,
        "description": "A JSON array of GitHub Apps to grant push access to the branch. Each app must have `write` access to the `contents` permission.",
        "value_schema": {
          "val_type": "json",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": ""
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "requestBody"
      }
    ]
  },
  "output": {
    "description": "Response from the API endpoint 'repos/set-app-access-restrictions'.",
    "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-github",
      "provider_type": "oauth2",
      "id": null,
      "oauth2": null
    },
    "secrets": [
      {
        "key": "GIT_SERVER_URL"
      }
    ],
    "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 GitHub API."
  },
  "http_endpoint": {
    "metadata": {
      "object_type": "http_endpoint",
      "version": "1.2.0",
      "description": ""
    },
    "url": "{git_server_url}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
    "http_method": "PUT",
    "headers": {},
    "parameters": [
      {
        "name": "owner",
        "tool_parameter_name": "repository_owner",
        "description": "The account owner of the repository. The name is not case sensitive.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The account owner of the repository. The name is not case sensitive."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "repo",
        "tool_parameter_name": "repository_name",
        "description": "The name of the repository. The name is not case sensitive.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The name of the repository. The name is not case sensitive."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "branch",
        "tool_parameter_name": "branch_name",
        "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.8/graphql).",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.8/graphql)."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "requestBody",
        "tool_parameter_name": "apps_with_push_access",
        "description": "",
        "value_schema": {
          "val_type": "json",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": ""
        },
        "accepted_as": "body",
        "required": false,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      }
    ],
    "documentation_urls": [],
    "secrets": [
      {
        "arcade_key": "GIT_SERVER_URL",
        "parameter_name": "git_server_url",
        "accepted_as": "path",
        "formatted_value": null,
        "description": "",
        "is_auth_token": false
      },
      {
        "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  \"content\": {\n    \"application/json\": {\n      \"examples\": {\n        \"default\": {\n          \"value\": {\n            \"apps\": [\n              \"octoapp\"\n            ]\n          }\n        }\n      },\n      \"schema\": {\n        \"oneOf\": [\n          {\n            \"example\": {\n              \"apps\": [\n                \"my-app\"\n              ]\n            },\n            \"properties\": {\n              \"apps\": {\n                \"description\": \"The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items.\",\n                \"items\": {\n                  \"type\": \"string\"\n                },\n                \"type\": \"array\"\n              }\n            },\n            \"required\": [\n              \"apps\"\n            ],\n            \"type\": \"object\"\n          },\n          {\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"type\": \"array\"\n          }\n        ]\n      }\n    }\n  },\n  \"required\": false\n}",
    "use_request_body_schema_mode": true,
    "validate_request_body_schema": true
  }
}
