Open Context Protocol is live! 🚀 Read the launch post

reposGetPages

Get a GitHub Pages site

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/pages
  • Operation ID: repos/get-pages

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"
  }
}

Response Schema

{
  "title": "GitHub Pages",
  "description": "The configuration for GitHub Pages for a repository.",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The API address for accessing this Page resource.",
      "format": "uri",
      "example": "https://api.github.com/repos/github/hello-world/pages"
    },
    "status": {
      "type": "string",
      "description": "The status of the most recent build of the Page.",
      "example": "built",
      "enum": [
        "built",
        "building",
        "errored"
      ],
      "nullable": true
    },
    "cname": {
      "description": "The Pages site's custom domain",
      "example": "example.com",
      "type": "string",
      "nullable": true
    },
    "protected_domain_state": {
      "type": "string",
      "description": "The state if the domain is verified",
      "example": "pending",
      "nullable": true,
      "enum": [
        "pending",
        "verified",
        "unverified"
      ]
    },
    "pending_domain_unverified_at": {
      "type": "string",
      "description": "The timestamp when a pending domain becomes unverified.",
      "nullable": true,
      "format": "date-time"
    },
    "custom_404": {
      "type": "boolean",
      "description": "Whether the Page has a custom 404 page.",
      "example": false,
      "default": false
    },
    "html_url": {
      "type": "string",
      "description": "The web address the Page can be accessed from.",
      "format": "uri",
      "example": "https://example.com"
    },
    "build_type": {
      "type": "string",
      "description": "The process in which the Page will be built.",
      "example": "legacy",
      "nullable": true,
      "enum": [
        "legacy",
        "workflow"
      ]
    },
    "source": {
      "title": "Pages Source Hash",
      "type": "object",
      "properties": {
        "branch": {
          "type": "string"
        },
        "path": {
          "type": "string"
        }
      },
      "required": [
        "branch",
        "path"
      ]
    },
    "public": {
      "type": "boolean",
      "description": "Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site.",
      "example": true
    },
    "https_certificate": {
      "title": "Pages Https Certificate",
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "new",
            "authorization_created",
            "authorization_pending",
            "authorized",
            "authorization_revoked",
            "issued",
            "uploaded",
            "approved",
            "errored",
            "bad_authz",
            "destroy_pending",
            "dns_changed"
          ],
          "example": "approved"
        },
        "description": {
          "type": "string",
          "example": "Certificate is approved"
        },
        "domains": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of the domain set and its alternate name (if it is configured)",
          "example": [
            "example.com",
            "www.example.com"
          ]
        },
        "expires_at": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "state",
        "description",
        "domains"
      ]
    },
    "https_enforced": {
      "type": "boolean",
      "description": "Whether https is enabled on the domain",
      "example": true
    }
  },
  "required": [
    "url",
    "status",
    "cname",
    "custom_404",
    "public"
  ]
}

Usage

from ocp_agent import OCPAgent

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

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