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

reposListContributors

List repository contributors

Details

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

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"
  },
  "anon": {
    "description": "Set to `1` or `true` to include anonymous contributors in results.",
    "required": false,
    "location": "query",
    "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": "Contributor",
    "description": "Contributor",
    "type": "object",
    "properties": {
      "login": {
        "type": "string"
      },
      "id": {
        "type": "integer"
      },
      "node_id": {
        "type": "string"
      },
      "avatar_url": {
        "type": "string",
        "format": "uri"
      },
      "gravatar_id": {
        "type": "string",
        "nullable": true
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "html_url": {
        "type": "string",
        "format": "uri"
      },
      "followers_url": {
        "type": "string",
        "format": "uri"
      },
      "following_url": {
        "type": "string"
      },
      "gists_url": {
        "type": "string"
      },
      "starred_url": {
        "type": "string"
      },
      "subscriptions_url": {
        "type": "string",
        "format": "uri"
      },
      "organizations_url": {
        "type": "string",
        "format": "uri"
      },
      "repos_url": {
        "type": "string",
        "format": "uri"
      },
      "events_url": {
        "type": "string"
      },
      "received_events_url": {
        "type": "string",
        "format": "uri"
      },
      "type": {
        "type": "string"
      },
      "site_admin": {
        "type": "boolean"
      },
      "contributions": {
        "type": "integer"
      },
      "email": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "user_view_type": {
        "type": "string"
      }
    },
    "required": [
      "contributions",
      "type"
    ]
  }
}

Usage

from ocp_agent import OCPAgent

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

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