GitHub · Capability

GitHub Repos API — Environments

GitHub Repos API — Environments. 14 operations. Lead operation: List Environments. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubEnvironments

What You Can Do

GET
Listenvironments — List Environments
/v1/repos/{owner}/{repo}/environments
GET
Getanenvironment — Get An Environment
/v1/repos/{owner}/{repo}/environments/{environment-name}
PUT
Createorupdateanenvironment — Create Or Update An Environment
/v1/repos/{owner}/{repo}/environments/{environment-name}
DELETE
Deleteanenvironment — Delete An Environment
/v1/repos/{owner}/{repo}/environments/{environment-name}
GET
Listenvironmentsecrets — List Environment Secrets
/v1/repos/{owner}/{repo}/environments/{environment-name}/secrets
GET
Getanenvironmentpublickey — Get An Environment Public Key
/v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/public-key
GET
Getanenvironmentsecret — Get An Environment Secret
/v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/{secret-name}
PUT
Createorupdateanenvironmentsecret — Create Or Update An Environment Secret
/v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/{secret-name}
DELETE
Deleteanenvironmentsecret — Delete An Environment Secret
/v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/{secret-name}
GET
Listenvironmentvariables — List Environment Variables
/v1/repos/{owner}/{repo}/environments/{environment-name}/variables
POST
Createanenvironmentvariable — Create An Environment Variable
/v1/repos/{owner}/{repo}/environments/{environment-name}/variables
GET
Getanenvironmentvariable — Get An Environment Variable
/v1/repos/{owner}/{repo}/environments/{environment-name}/variables/{name}
PATCH
Updateanenvironmentvariable — Update An Environment Variable
/v1/repos/{owner}/{repo}/environments/{environment-name}/variables/{name}
DELETE
Deleteanenvironmentvariable — Delete An Environment Variable
/v1/repos/{owner}/{repo}/environments/{environment-name}/variables/{name}

MCP Tools

list-environments

List Environments

read-only idempotent
get-environment

Get An Environment

read-only idempotent
create-update-environment

Create Or Update An Environment

idempotent
delete-environment

Delete An Environment

idempotent
list-environment-secrets

List Environment Secrets

read-only idempotent
get-environment-public-key

Get An Environment Public Key

read-only idempotent
get-environment-secret

Get An Environment Secret

read-only idempotent
create-update-environment-secret

Create Or Update An Environment Secret

idempotent
delete-environment-secret

Delete An Environment Secret

idempotent
list-environment-variables

List Environment Variables

read-only idempotent
create-environment-variable

Create An Environment Variable

get-environment-variable

Get An Environment Variable

read-only idempotent
update-environment-variable

Update An Environment Variable

idempotent
delete-environment-variable

Delete An Environment Variable

idempotent

Capability Spec

temp-environments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Environments
  description: 'GitHub Repos API — Environments. 14 operations. Lead operation: List Environments. Self-contained Naftiko
    capability covering one Github business surface.'
  tags:
  - Github
  - Environments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-environments
    baseUri: ''
    description: GitHub Repos API — Environments business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-environments
      path: /repos/{owner}/{repo}/environments
      operations:
      - name: listenvironments
        method: GET
        description: List Environments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-environments-environment_name
      path: /repos/{owner}/{repo}/environments/{environment_name}
      operations:
      - name: getanenvironment
        method: GET
        description: Get An Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
      - name: createorupdateanenvironment
        method: PUT
        description: Create Or Update An Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: deleteanenvironment
        method: DELETE
        description: Delete An Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-environments-environment_name-secrets
      path: /repos/{owner}/{repo}/environments/{environment_name}/secrets
      operations:
      - name: listenvironmentsecrets
        method: GET
        description: List Environment Secrets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-environments-environment_name-secrets-public-key
      path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key
      operations:
      - name: getanenvironmentpublickey
        method: GET
        description: Get An Environment Public Key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-environments-environment_name-secrets-secret_name
      path: /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
      operations:
      - name: getanenvironmentsecret
        method: GET
        description: Get An Environment Secret
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
      - name: createorupdateanenvironmentsecret
        method: PUT
        description: Create Or Update An Environment Secret
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteanenvironmentsecret
        method: DELETE
        description: Delete An Environment Secret
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-environments-environment_name-variables
      path: /repos/{owner}/{repo}/environments/{environment_name}/variables
      operations:
      - name: listenvironmentvariables
        method: GET
        description: List Environment Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
      - name: createanenvironmentvariable
        method: POST
        description: Create An Environment Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-environments-environment_name-variables-name
      path: /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
      operations:
      - name: getanenvironmentvariable
        method: GET
        description: Get An Environment Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
      - name: updateanenvironmentvariable
        method: PATCH
        description: Update An Environment Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteanenvironmentvariable
        method: DELETE
        description: Delete An Environment Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: temp-environments-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Environments. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/environments
      name: repos-owner-repo-environments
      description: REST surface for repos-owner-repo-environments.
      operations:
      - method: GET
        name: listenvironments
        description: List Environments
        call: temp-environments.listenvironments
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}
      name: repos-owner-repo-environments-environment-name
      description: REST surface for repos-owner-repo-environments-environment_name.
      operations:
      - method: GET
        name: getanenvironment
        description: Get An Environment
        call: temp-environments.getanenvironment
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: createorupdateanenvironment
        description: Create Or Update An Environment
        call: temp-environments.createorupdateanenvironment
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteanenvironment
        description: Delete An Environment
        call: temp-environments.deleteanenvironment
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/secrets
      name: repos-owner-repo-environments-environment-name-secrets
      description: REST surface for repos-owner-repo-environments-environment_name-secrets.
      operations:
      - method: GET
        name: listenvironmentsecrets
        description: List Environment Secrets
        call: temp-environments.listenvironmentsecrets
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/public-key
      name: repos-owner-repo-environments-environment-name-secrets-public-key
      description: REST surface for repos-owner-repo-environments-environment_name-secrets-public-key.
      operations:
      - method: GET
        name: getanenvironmentpublickey
        description: Get An Environment Public Key
        call: temp-environments.getanenvironmentpublickey
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/secrets/{secret-name}
      name: repos-owner-repo-environments-environment-name-secrets-secret-name
      description: REST surface for repos-owner-repo-environments-environment_name-secrets-secret_name.
      operations:
      - method: GET
        name: getanenvironmentsecret
        description: Get An Environment Secret
        call: temp-environments.getanenvironmentsecret
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: createorupdateanenvironmentsecret
        description: Create Or Update An Environment Secret
        call: temp-environments.createorupdateanenvironmentsecret
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteanenvironmentsecret
        description: Delete An Environment Secret
        call: temp-environments.deleteanenvironmentsecret
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/variables
      name: repos-owner-repo-environments-environment-name-variables
      description: REST surface for repos-owner-repo-environments-environment_name-variables.
      operations:
      - method: GET
        name: listenvironmentvariables
        description: List Environment Variables
        call: temp-environments.listenvironmentvariables
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createanenvironmentvariable
        description: Create An Environment Variable
        call: temp-environments.createanenvironmentvariable
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/variables/{name}
      name: repos-owner-repo-environments-environment-name-variables-name
      description: REST surface for repos-owner-repo-environments-environment_name-variables-name.
      operations:
      - method: GET
        name: getanenvironmentvariable
        description: Get An Environment Variable
        call: temp-environments.getanenvironmentvariable
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateanenvironmentvariable
        description: Update An Environment Variable
        call: temp-environments.updateanenvironmentvariable
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteanenvironmentvariable
        description: Delete An Environment Variable
        call: temp-environments.deleteanenvironmentvariable
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-environments-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Environments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-environments
      description: List Environments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.listenvironments
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment
      description: Get An Environment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.getanenvironment
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: create-update-environment
      description: Create Or Update An Environment
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-environments.createorupdateanenvironment
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-environment
      description: Delete An Environment
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-environments.deleteanenvironment
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: list-environment-secrets
      description: List Environment Secrets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.listenvironmentsecrets
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment-public-key
      description: Get An Environment Public Key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.getanenvironmentpublickey
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment-secret
      description: Get An Environment Secret
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.getanenvironmentsecret
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: create-update-environment-secret
      description: Create Or Update An Environment Secret
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-environments.createorupdateanenvironmentsecret
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-environment-secret
      description: Delete An Environment Secret
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-environments.deleteanenvironmentsecret
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: list-environment-variables
      description: List Environment Variables
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.listenvironmentvariables
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: create-environment-variable
      description: Create An Environment Variable
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: temp-environments.createanenvironmentvariable
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment-variable
      description: Get An Environment Variable
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-environments.getanenvironmentvariable
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: update-environment-variable
      description: Update An Environment Variable
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-environments.updateanenvironmentvariable
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-environment-variable
      description: Delete An Environment Variable
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-environments.deleteanenvironmentvariable
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.