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

actionsGetEnvironmentVariable

Get an environment variable

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
  • Operation ID: actions/get-environment-variable

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"
  },
  "environment_name": {
    "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "name": {
    "description": "The name of the variable.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "title": "Actions Variable",
  "type": "object",
  "properties": {
    "name": {
      "description": "The name of the variable.",
      "example": "USERNAME",
      "type": "string"
    },
    "value": {
      "description": "The value of the variable.",
      "example": "octocat",
      "type": "string"
    },
    "created_at": {
      "description": "The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.",
      "type": "string",
      "format": "date-time",
      "example": "2019-01-24T22:45:36.000Z"
    },
    "updated_at": {
      "description": "The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.",
      "type": "string",
      "format": "date-time",
      "example": "2019-01-24T22:45:36.000Z"
    }
  },
  "required": [
    "name",
    "value",
    "created_at",
    "updated_at"
  ]
}

Usage

from ocp_agent import OCPAgent

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

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