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

packagesRestorePackageVersionForUser

Restore package version for a user

Details

  • Method: POST
  • Path: /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
  • Operation ID: packages/restore-package-version-for-user

Parameters

{
  "package_type": {
    "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
    "required": true,
    "location": "path",
    "type": "string",
    "enum": [
      "npm",
      "maven",
      "rubygems",
      "docker",
      "nuget",
      "container"
    ]
  },
  "package_name": {
    "description": "The name of the package.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "username": {
    "description": "The handle for the GitHub user account.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "package_version_id": {
    "description": "Unique identifier of the package version.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Usage

from ocp_agent import OCPAgent

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

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