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

actionsDeleteActionsCacheByKey

Delete GitHub Actions caches for a repository (using a cache key)

Details

  • Method: DELETE
  • Path: /repos/{owner}/{repo}/actions/caches
  • Operation ID: actions/delete-actions-cache-by-key

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"
  },
  "key": {
    "description": "A key for identifying the cache.",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "ref": {
    "description": "The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "Repository actions caches",
  "description": "Repository actions caches",
  "type": "object",
  "properties": {
    "total_count": {
      "description": "Total number of caches",
      "type": "integer",
      "example": 2
    },
    "actions_caches": {
      "description": "Array of caches",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 2
          },
          "ref": {
            "type": "string",
            "example": "refs/heads/main"
          },
          "key": {
            "type": "string",
            "example": "Linux-node-958aff96db2d75d67787d1e634ae70b659de937b"
          },
          "version": {
            "type": "string",
            "example": "73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0"
          },
          "last_accessed_at": {
            "type": "string",
            "format": "date-time",
            "example": "2019-01-24T22:45:36.000Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2019-01-24T22:45:36.000Z"
          },
          "size_in_bytes": {
            "type": "integer",
            "example": 1024
          }
        }
      }
    }
  },
  "required": [
    "total_count",
    "actions_caches"
  ]
}

Usage

from ocp_agent import OCPAgent

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

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