GitHub · Capability

GitHub v3 REST API — Git

GitHub v3 REST API — Git. 13 operations. Lead operation: GitHub Create a Blob. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubGit

What You Can Do

POST
Gitcreateblob — GitHub Create a Blob
/v1/repos/{owner}/{repo}/git/blobs
GET
Gitgetblob — GitHub Get a Blob
/v1/repos/{owner}/{repo}/git/blobs/{file-sha}
POST
Gitcreatecommit — GitHub Create a Commit
/v1/repos/{owner}/{repo}/git/commits
GET
Gitgetcommit — GitHub Get a Commit Object
/v1/repos/{owner}/{repo}/git/commits/{commit-sha}
GET
Gitlistmatchingrefs — GitHub List Matching References
/v1/repos/{owner}/{repo}/git/matching-refs/{ref}
GET
Gitgetref — GitHub Get a Reference
/v1/repos/{owner}/{repo}/git/ref/{ref}
POST
Gitcreateref — GitHub Create a Reference
/v1/repos/{owner}/{repo}/git/refs
PATCH
Gitupdateref — GitHub Update a Reference
/v1/repos/{owner}/{repo}/git/refs/{ref}
DELETE
Gitdeleteref — GitHub Delete a Reference
/v1/repos/{owner}/{repo}/git/refs/{ref}
POST
Gitcreatetag — GitHub Create a Tag Object
/v1/repos/{owner}/{repo}/git/tags
GET
Gitgettag — GitHub Get a Tag
/v1/repos/{owner}/{repo}/git/tags/{tag-sha}
POST
Gitcreatetree — GitHub Create a Tree
/v1/repos/{owner}/{repo}/git/trees
GET
Gitgettree — GitHub Get a Tree
/v1/repos/{owner}/{repo}/git/trees/{tree-sha}

MCP Tools

github-create-blob

GitHub Create a Blob

github-get-blob

GitHub Get a Blob

read-only idempotent
github-create-commit

GitHub Create a Commit

github-get-commit-object

GitHub Get a Commit Object

read-only idempotent
github-list-matching-references

GitHub List Matching References

read-only idempotent
github-get-reference

GitHub Get a Reference

read-only idempotent
github-create-reference

GitHub Create a Reference

github-update-reference

GitHub Update a Reference

idempotent
github-delete-reference

GitHub Delete a Reference

idempotent
github-create-tag-object

GitHub Create a Tag Object

github-get-tag

GitHub Get a Tag

read-only idempotent
github-create-tree

GitHub Create a Tree

github-get-tree

GitHub Get a Tree

read-only idempotent

Capability Spec

github-git.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub v3 REST API — Git
  description: 'GitHub v3 REST API — Git. 13 operations. Lead operation: GitHub Create a Blob. Self-contained Naftiko capability
    covering one Github business surface.'
  tags:
  - Github
  - Git
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: github-git
    baseUri: ''
    description: GitHub v3 REST API — Git business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-git-blobs
      path: /repos/{owner}/{repo}/git/blobs
      operations:
      - name: gitcreateblob
        method: POST
        description: GitHub Create a Blob
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-git-blobs-file_sha
      path: /repos/{owner}/{repo}/git/blobs/{file_sha}
      operations:
      - name: gitgetblob
        method: GET
        description: GitHub Get a Blob
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: file_sha
          in: path
          type: string
          required: true
    - name: repos-owner-repo-git-commits
      path: /repos/{owner}/{repo}/git/commits
      operations:
      - name: gitcreatecommit
        method: POST
        description: GitHub Create a Commit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-git-commits-commit_sha
      path: /repos/{owner}/{repo}/git/commits/{commit_sha}
      operations:
      - name: gitgetcommit
        method: GET
        description: GitHub Get a Commit Object
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repos-owner-repo-git-matching-refs-ref
      path: /repos/{owner}/{repo}/git/matching-refs/{ref}
      operations:
      - name: gitlistmatchingrefs
        method: GET
        description: GitHub List Matching References
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repos-owner-repo-git-ref-ref
      path: /repos/{owner}/{repo}/git/ref/{ref}
      operations:
      - name: gitgetref
        method: GET
        description: GitHub Get a Reference
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repos-owner-repo-git-refs
      path: /repos/{owner}/{repo}/git/refs
      operations:
      - name: gitcreateref
        method: POST
        description: GitHub Create a Reference
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-git-refs-ref
      path: /repos/{owner}/{repo}/git/refs/{ref}
      operations:
      - name: gitupdateref
        method: PATCH
        description: GitHub Update a Reference
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: gitdeleteref
        method: DELETE
        description: GitHub Delete a Reference
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repos-owner-repo-git-tags
      path: /repos/{owner}/{repo}/git/tags
      operations:
      - name: gitcreatetag
        method: POST
        description: GitHub Create a Tag Object
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-git-tags-tag_sha
      path: /repos/{owner}/{repo}/git/tags/{tag_sha}
      operations:
      - name: gitgettag
        method: GET
        description: GitHub Get a Tag
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tag_sha
          in: path
          type: string
          required: true
    - name: repos-owner-repo-git-trees
      path: /repos/{owner}/{repo}/git/trees
      operations:
      - name: gitcreatetree
        method: POST
        description: GitHub Create a Tree
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-git-trees-tree_sha
      path: /repos/{owner}/{repo}/git/trees/{tree_sha}
      operations:
      - name: gitgettree
        method: GET
        description: GitHub Get a Tree
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tree_sha
          in: path
          type: string
          description: The SHA1 value or ref (branch or tag) name of the tree.
          required: true
        - name: recursive
          in: query
          type: string
          description: 'Setting this parameter to any value returns the objects or subtrees referenced by the tree specified
            in `:tree_sha`. For example, setting `recursive` to any of '
  exposes:
  - type: rest
    namespace: github-git-rest
    port: 8080
    description: REST adapter for GitHub v3 REST API — Git. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/git/blobs
      name: repos-owner-repo-git-blobs
      description: REST surface for repos-owner-repo-git-blobs.
      operations:
      - method: POST
        name: gitcreateblob
        description: GitHub Create a Blob
        call: github-git.gitcreateblob
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/blobs/{file-sha}
      name: repos-owner-repo-git-blobs-file-sha
      description: REST surface for repos-owner-repo-git-blobs-file_sha.
      operations:
      - method: GET
        name: gitgetblob
        description: GitHub Get a Blob
        call: github-git.gitgetblob
        with:
          file_sha: rest.file_sha
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/commits
      name: repos-owner-repo-git-commits
      description: REST surface for repos-owner-repo-git-commits.
      operations:
      - method: POST
        name: gitcreatecommit
        description: GitHub Create a Commit
        call: github-git.gitcreatecommit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/commits/{commit-sha}
      name: repos-owner-repo-git-commits-commit-sha
      description: REST surface for repos-owner-repo-git-commits-commit_sha.
      operations:
      - method: GET
        name: gitgetcommit
        description: GitHub Get a Commit Object
        call: github-git.gitgetcommit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/matching-refs/{ref}
      name: repos-owner-repo-git-matching-refs-ref
      description: REST surface for repos-owner-repo-git-matching-refs-ref.
      operations:
      - method: GET
        name: gitlistmatchingrefs
        description: GitHub List Matching References
        call: github-git.gitlistmatchingrefs
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/ref/{ref}
      name: repos-owner-repo-git-ref-ref
      description: REST surface for repos-owner-repo-git-ref-ref.
      operations:
      - method: GET
        name: gitgetref
        description: GitHub Get a Reference
        call: github-git.gitgetref
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/refs
      name: repos-owner-repo-git-refs
      description: REST surface for repos-owner-repo-git-refs.
      operations:
      - method: POST
        name: gitcreateref
        description: GitHub Create a Reference
        call: github-git.gitcreateref
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/refs/{ref}
      name: repos-owner-repo-git-refs-ref
      description: REST surface for repos-owner-repo-git-refs-ref.
      operations:
      - method: PATCH
        name: gitupdateref
        description: GitHub Update a Reference
        call: github-git.gitupdateref
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: gitdeleteref
        description: GitHub Delete a Reference
        call: github-git.gitdeleteref
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/tags
      name: repos-owner-repo-git-tags
      description: REST surface for repos-owner-repo-git-tags.
      operations:
      - method: POST
        name: gitcreatetag
        description: GitHub Create a Tag Object
        call: github-git.gitcreatetag
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/tags/{tag-sha}
      name: repos-owner-repo-git-tags-tag-sha
      description: REST surface for repos-owner-repo-git-tags-tag_sha.
      operations:
      - method: GET
        name: gitgettag
        description: GitHub Get a Tag
        call: github-git.gitgettag
        with:
          tag_sha: rest.tag_sha
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/trees
      name: repos-owner-repo-git-trees
      description: REST surface for repos-owner-repo-git-trees.
      operations:
      - method: POST
        name: gitcreatetree
        description: GitHub Create a Tree
        call: github-git.gitcreatetree
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/git/trees/{tree-sha}
      name: repos-owner-repo-git-trees-tree-sha
      description: REST surface for repos-owner-repo-git-trees-tree_sha.
      operations:
      - method: GET
        name: gitgettree
        description: GitHub Get a Tree
        call: github-git.gitgettree
        with:
          tree_sha: rest.tree_sha
          recursive: rest.recursive
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: github-git-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub v3 REST API — Git. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: github-create-blob
      description: GitHub Create a Blob
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: github-git.gitcreateblob
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-blob
      description: GitHub Get a Blob
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitgetblob
      with:
        file_sha: tools.file_sha
      outputParameters:
      - type: object
        mapping: $.
    - name: github-create-commit
      description: GitHub Create a Commit
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: github-git.gitcreatecommit
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-commit-object
      description: GitHub Get a Commit Object
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitgetcommit
      outputParameters:
      - type: object
        mapping: $.
    - name: github-list-matching-references
      description: GitHub List Matching References
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitlistmatchingrefs
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-reference
      description: GitHub Get a Reference
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitgetref
      outputParameters:
      - type: object
        mapping: $.
    - name: github-create-reference
      description: GitHub Create a Reference
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: github-git.gitcreateref
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-update-reference
      description: GitHub Update a Reference
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: github-git.gitupdateref
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-delete-reference
      description: GitHub Delete a Reference
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: github-git.gitdeleteref
      outputParameters:
      - type: object
        mapping: $.
    - name: github-create-tag-object
      description: GitHub Create a Tag Object
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: github-git.gitcreatetag
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-tag
      description: GitHub Get a Tag
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitgettag
      with:
        tag_sha: tools.tag_sha
      outputParameters:
      - type: object
        mapping: $.
    - name: github-create-tree
      description: GitHub Create a Tree
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: github-git.gitcreatetree
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-tree
      description: GitHub Get a Tree
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: github-git.gitgettree
      with:
        tree_sha: tools.tree_sha
        recursive: tools.recursive
      outputParameters:
      - type: object
        mapping: $.