Open Context Protocol is live! 🚀 Read the launch post

reposGetAutolink

Get an autolink reference of a repository

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/autolinks/{autolink_id}
  • Operation ID: repos/get-autolink

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"
  },
  "autolink_id": {
    "description": "The unique identifier of the autolink.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Response Schema

{
  "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('reposGetAutolink', {
    # Add required parameters here
})