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

actionsGetSelfHostedRunnerForRepo

Get a self-hosted runner for a repository

Details

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

Parameters

{
  "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"
  },
  "runner_id": {
    "description": "Unique identifier of the self-hosted runner.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Response Schema

{
  "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('actionsGetSelfHostedRunnerForRepo', {
    # Add required parameters here
})