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

reposListAutolinks

Get all autolinks of a repository

Details

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

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

{
  "type": "array",
  "items": {
    "title": "Autolink reference",
    "description": "An autolink reference.",
    "type": "object",
    "properties": {
      "id": {
        "type": "integer",
        "example": 3
      },
      "key_prefix": {
        "description": "The prefix of a key that is linkified.",
        "example": "TICKET-",
        "type": "string"
      },
      "url_template": {
        "description": "A template for the target URL that is generated if a key was found.",
        "example": "https://example.com/TICKET?query=<num>",
        "type": "string"
      },
      "is_alphanumeric": {
        "description": "Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters.",
        "example": true,
        "type": "boolean"
      },
      "updated_at": {
        "type": "string",
        "nullable": true,
        "format": "date-time"
      }
    },
    "required": [
      "id",
      "key_prefix",
      "url_template",
      "is_alphanumeric"
    ]
  }
}

Usage

from ocp_agent import OCPAgent

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

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