Open Context Protocol is live! 🚀 Read the launch post

reposGetClones

Get repository clones

Details

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

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": {
    "description": "The time frame to display results for.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "day",
      "week"
    ]
  }
}

Response Schema

{
  "title": "Clone Traffic",
  "description": "Clone Traffic",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "example": 173
    },
    "uniques": {
      "type": "integer",
      "example": 128
    },
    "clones": {
      "type": "array",
      "items": {
        "title": "Traffic",
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "uniques": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "timestamp",
          "uniques",
          "count"
        ]
      }
    }
  },
  "required": [
    "uniques",
    "count",
    "clones"
  ]
}

Usage

from ocp_agent import OCPAgent

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

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