GitHub · Capability

GitHub Repos API — Restrictions

GitHub Repos API — Restrictions. 11 operations. Lead operation: Get Access Restrictions. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubRestrictions

What You Can Do

GET
Getaccessrestrictions — Get Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
DELETE
Deleteaccessrestrictions — Delete Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
POST
Addappaccessrestrictions — Add App Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
PUT
Setappaccessrestrictions — Set App Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
DELETE
Removeappaccessrestrictions — Remove App Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
POST
Addteamaccessrestrictions — Add Team Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
PUT
Setteamaccessrestrictions — Set Team Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
DELETE
Removeteamaccessrestrictions — Remove Team Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
POST
Adduseraccessrestrictions — Add User Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
PUT
Setuseraccessrestrictions — Set User Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
DELETE
Removeuseraccessrestrictions — Remove User Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users

MCP Tools

get-access-restrictions

Get Access Restrictions

read-only idempotent
delete-access-restrictions

Delete Access Restrictions

idempotent
add-app-access-restrictions

Add App Access Restrictions

set-app-access-restrictions

Set App Access Restrictions

idempotent
remove-app-access-restrictions

Remove App Access Restrictions

idempotent
add-team-access-restrictions

Add Team Access Restrictions

set-team-access-restrictions

Set Team Access Restrictions

idempotent
remove-team-access-restrictions

Remove Team Access Restrictions

idempotent
add-user-access-restrictions

Add User Access Restrictions

set-user-access-restrictions

Set User Access Restrictions

idempotent
remove-user-access-restrictions

Remove User Access Restrictions

idempotent

Capability Spec

temp-restrictions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Restrictions
  description: 'GitHub Repos API — Restrictions. 11 operations. Lead operation: Get Access Restrictions. Self-contained Naftiko
    capability covering one Github business surface.'
  tags:
  - Github
  - Restrictions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-restrictions
    baseUri: ''
    description: GitHub Repos API — Restrictions business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-branches-branch-protection-restrictions
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions
      operations:
      - name: getaccessrestrictions
        method: GET
        description: Get Access Restrictions
        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: deleteaccessrestrictions
        method: DELETE
        description: Delete Access Restrictions
        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-branches-branch-protection-restrictions-apps
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
      operations:
      - name: addappaccessrestrictions
        method: POST
        description: Add App Access Restrictions
        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: setappaccessrestrictions
        method: PUT
        description: Set App Access Restrictions
        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: removeappaccessrestrictions
        method: DELETE
        description: Remove App Access Restrictions
        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: repos-owner-repo-branches-branch-protection-restrictions-teams
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
      operations:
      - name: addteamaccessrestrictions
        method: POST
        description: Add Team Access Restrictions
        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: setteamaccessrestrictions
        method: PUT
        description: Set Team Access Restrictions
        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: removeteamaccessrestrictions
        method: DELETE
        description: Remove Team Access Restrictions
        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: repos-owner-repo-branches-branch-protection-restrictions-users
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
      operations:
      - name: adduseraccessrestrictions
        method: POST
        description: Add User Access Restrictions
        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: setuseraccessrestrictions
        method: PUT
        description: Set User Access Restrictions
        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: removeuseraccessrestrictions
        method: DELETE
        description: Remove User Access Restrictions
        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
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: temp-restrictions-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Restrictions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
      name: repos-owner-repo-branches-branch-protection-restrictions
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions.
      operations:
      - method: GET
        name: getaccessrestrictions
        description: Get Access Restrictions
        call: temp-restrictions.getaccessrestrictions
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteaccessrestrictions
        description: Delete Access Restrictions
        call: temp-restrictions.deleteaccessrestrictions
        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}/branches/{branch}/protection/restrictions/apps
      name: repos-owner-repo-branches-branch-protection-restrictions-apps
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-apps.
      operations:
      - method: POST
        name: addappaccessrestrictions
        description: Add App Access Restrictions
        call: temp-restrictions.addappaccessrestrictions
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: setappaccessrestrictions
        description: Set App Access Restrictions
        call: temp-restrictions.setappaccessrestrictions
        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: removeappaccessrestrictions
        description: Remove App Access Restrictions
        call: temp-restrictions.removeappaccessrestrictions
        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}/branches/{branch}/protection/restrictions/teams
      name: repos-owner-repo-branches-branch-protection-restrictions-teams
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-teams.
      operations:
      - method: POST
        name: addteamaccessrestrictions
        description: Add Team Access Restrictions
        call: temp-restrictions.addteamaccessrestrictions
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: setteamaccessrestrictions
        description: Set Team Access Restrictions
        call: temp-restrictions.setteamaccessrestrictions
        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: removeteamaccessrestrictions
        description: Remove Team Access Restrictions
        call: temp-restrictions.removeteamaccessrestrictions
        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}/branches/{branch}/protection/restrictions/users
      name: repos-owner-repo-branches-branch-protection-restrictions-users
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-users.
      operations:
      - method: POST
        name: adduseraccessrestrictions
        description: Add User Access Restrictions
        call: temp-restrictions.adduseraccessrestrictions
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: setuseraccessrestrictions
        description: Set User Access Restrictions
        call: temp-restrictions.setuseraccessrestrictions
        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: removeuseraccessrestrictions
        description: Remove User Access Restrictions
        call: temp-restrictions.removeuseraccessrestrictions
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-restrictions-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Restrictions. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-access-restrictions
      description: Get Access Restrictions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-restrictions.getaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-access-restrictions
      description: Delete Access Restrictions
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-restrictions.deleteaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: add-app-access-restrictions
      description: Add App Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: temp-restrictions.addappaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: set-app-access-restrictions
      description: Set App Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-restrictions.setappaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-app-access-restrictions
      description: Remove App Access Restrictions
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-restrictions.removeappaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: add-team-access-restrictions
      description: Add Team Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: temp-restrictions.addteamaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: set-team-access-restrictions
      description: Set Team Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-restrictions.setteamaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-team-access-restrictions
      description: Remove Team Access Restrictions
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-restrictions.removeteamaccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: add-user-access-restrictions
      description: Add User Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: temp-restrictions.adduseraccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: set-user-access-restrictions
      description: Set User Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-restrictions.setuseraccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-user-access-restrictions
      description: Remove User Access Restrictions
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-restrictions.removeuseraccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.