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

reposListDeployKeys

List deploy keys

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/keys
  • Operation ID: repos/list-deploy-keys

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"
  },
  "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": "array",
  "items": {
    "title": "Deploy Key",
    "description": "An SSH key granting access to a single repository.",
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "key": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "verified": {
        "type": "boolean"
      },
      "created_at": {
        "type": "string"
      },
      "read_only": {
        "type": "boolean"
      },
      "added_by": {
        "type": "string",
        "nullable": true
      },
      "last_used": {
        "nullable": true,
        "type": "string",
        "format": "date-time"
      },
      "enabled": {
        "type": "boolean"
      }
    },
    "required": [
      "id",
      "key",
      "url",
      "title",
      "verified",
      "created_at",
      "read_only"
    ]
  }
}

Usage

from ocp_agent import OCPAgent

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

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