Open Context Protocol is live! 🚀 Read the launch post
actionsListSelfHostedRunnersForRepo

actionsListSelfHostedRunnersForRepo

List self-hosted runners for a repository

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/actions/runners
  • Operation ID: actions/list-self-hosted-runners-for-repo

Parameters

{
  "name": {
    "description": "The name of a self-hosted runner.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "per_page": {
    "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "page": {
    "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  }
}

Response Schema

{
  "type": "object",
  "required": [
    "total_count",
    "runners"
  ],
  "properties": {
    "total_count": {
      "type": "integer"
    },
    "runners": {
      "type": "array",
      "items": {
        "title": "Self hosted runners",
        "description": "A self hosted runner",
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID of the runner.",
            "type": "integer",
            "example": 5
          },
          "runner_group_id": {
            "description": "The ID of the runner group.",
            "type": "integer",
            "example": 1
          },
          "name": {
            "description": "The name of the runner.",
            "type": "string",
            "example": "iMac"
          },
          "os": {
            "description": "The Operating System of the runner.",
            "type": "string",
            "example": "macos"
          },
          "status": {
            "description": "The status of the runner.",
            "type": "string",
            "example": "online"
          },
          "busy": {
            "type": "boolean"
          },
          "labels": {
            "type": "array",
            "items": {
              "title": "Self hosted runner label",
              "description": "A label for a self hosted runner",
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Unique identifier of the label."
                },
                "name": {
                  "type": "string",
                  "description": "Name of the label."
                },
                "type": {
                  "type": "string",
                  "description": "The type of label. Read-only labels are applied automatically when the runner is configured.",
                  "enum": [
                    "read-only",
                    "custom"
                  ]
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "ephemeral": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "os",
          "status",
          "busy",
          "labels"
        ]
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('actionsListSelfHostedRunnersForRepo', {
    # Add required parameters here
})