GitHub · Capability

github-repos-api — README

github-repos-api — README. 2 operations. Lead operation: GitHub Get Repository Readme. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubREADME

What You Can Do

GET
Getrepositoryreadme — GitHub Get Repository Readme
/v1/repos/{owner}/{repo}/readme
GET
Getrepositoryreadmefordirectory — GitHub Get Repository Readme for Directory
/v1/repos/{owner}/{repo}/readme/{dir}

MCP Tools

github-get-repository-readme

GitHub Get Repository Readme

read-only idempotent
github-get-repository-readme-directory

GitHub Get Repository Readme for Directory

read-only idempotent

Capability Spec

repos-readme.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: github-repos-api — README
  description: 'github-repos-api — README. 2 operations. Lead operation: GitHub Get Repository Readme. Self-contained Naftiko
    capability covering one Github business surface.'
  tags:
  - Github
  - README
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: repos-readme
    baseUri: http://localhost:8080/rest/github-repos-api/1.1.4
    description: github-repos-api — README business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-readme
      path: /repos/{owner}/{repo}/readme
      operations:
      - name: getrepositoryreadme
        method: GET
        description: GitHub Get Repository Readme
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ref
          in: query
          type: string
          description: 'The name of the commit/branch/tag. Default: the repositorys default branch.'
        - 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-readme-dir
      path: /repos/{owner}/{repo}/readme/{dir}
      operations:
      - name: getrepositoryreadmefordirectory
        method: GET
        description: GitHub Get Repository Readme for Directory
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: dir
          in: path
          type: string
          description: The alternate path to look for a README file
          required: true
        - name: ref
          in: query
          type: string
          description: 'The name of the commit/branch/tag. Default: the repositorys default branch.'
        - 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: repos-readme-rest
    port: 8080
    description: REST adapter for github-repos-api — README. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/readme
      name: repos-owner-repo-readme
      description: REST surface for repos-owner-repo-readme.
      operations:
      - method: GET
        name: getrepositoryreadme
        description: GitHub Get Repository Readme
        call: repos-readme.getrepositoryreadme
        with:
          ref: rest.ref
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/readme/{dir}
      name: repos-owner-repo-readme-dir
      description: REST surface for repos-owner-repo-readme-dir.
      operations:
      - method: GET
        name: getrepositoryreadmefordirectory
        description: GitHub Get Repository Readme for Directory
        call: repos-readme.getrepositoryreadmefordirectory
        with:
          dir: rest.dir
          ref: rest.ref
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: repos-readme-mcp
    port: 9090
    transport: http
    description: MCP adapter for github-repos-api — README. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: github-get-repository-readme
      description: GitHub Get Repository Readme
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repos-readme.getrepositoryreadme
      with:
        ref: tools.ref
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-repository-readme-directory
      description: GitHub Get Repository Readme for Directory
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repos-readme.getrepositoryreadmefordirectory
      with:
        dir: tools.dir
        ref: tools.ref
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.