naftiko: 1.0.0-alpha2 info: label: "Freestyle Git API \u2014 Branches" description: 'Freestyle Git API branches surface. 3 operations. Lead operation: List Branches in a Repo. Self-contained Naftiko capability for one Freestyle business surface.' tags: - Freestyle - Git - Branches created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: FREESTYLE_API_KEY: FREESTYLE_API_KEY capability: consumes: - type: http namespace: git-branches baseUri: https://api.freestyle.sh description: Freestyle Git API branches business capability. resources: - name: git-v1-repo-git-refs-heads path: /git/v1/repo/{repo}/git/refs/heads/ operations: - name: handle-list-branches method: GET description: List Branches in a Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: git-v1-repo-git-refs-heads path: /git/v1/repo/{repo}/git/refs/heads/{*branch} operations: - name: handle-create-branch method: POST description: Create a New Branch outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: branch in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: git-v1-repo-git-refs-heads path: /git/v1/repo/{repo}/git/refs/heads/{branch} operations: - name: handle-get-ref-branch method: GET description: Get a Branch Reference outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: branch in: path type: string required: true authentication: type: apikey key: Authorization value: Bearer {{env.FREESTYLE_API_KEY}} placement: header exposes: - type: rest namespace: git-branches-rest port: 8080 description: REST adapter for Freestyle Git API branches. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/git/v1/repo/{repo}/git/refs/heads/ name: git-v1-repo-git-refs-heads description: REST surface for git-v1-repo-git-refs-heads. operations: - method: GET name: handle-list-branches description: List Branches in a Repo call: git-branches.handle-list-branches with: repo: rest.path.repo outputParameters: - type: object mapping: $. - path: /v1/git/v1/repo/{repo}/git/refs/heads/{*branch} name: git-v1-repo-git-refs-heads description: REST surface for git-v1-repo-git-refs-heads. operations: - method: POST name: handle-create-branch description: Create a New Branch call: git-branches.handle-create-branch with: repo: rest.path.repo branch: rest.path.branch body: rest.body outputParameters: - type: object mapping: $. - path: /v1/git/v1/repo/{repo}/git/refs/heads/{branch} name: git-v1-repo-git-refs-heads description: REST surface for git-v1-repo-git-refs-heads. operations: - method: GET name: handle-get-ref-branch description: Get a Branch Reference call: git-branches.handle-get-ref-branch with: repo: rest.path.repo branch: rest.path.branch outputParameters: - type: object mapping: $. - type: mcp namespace: git-branches-mcp port: 9090 transport: http description: MCP adapter for Freestyle Git API branches. One tool per consumed operation. tools: - name: freestyle-handle-list-branches description: List Branches in a Repo hints: readOnly: true destructive: false idempotent: true call: git-branches.handle-list-branches with: repo: tools.path.repo outputParameters: - type: object mapping: $. - name: freestyle-handle-create-branch description: Create a New Branch hints: readOnly: false destructive: false idempotent: false call: git-branches.handle-create-branch with: repo: tools.path.repo branch: tools.path.branch body: tools.body outputParameters: - type: object mapping: $. - name: freestyle-handle-get-ref-branch description: Get a Branch Reference hints: readOnly: true destructive: false idempotent: true call: git-branches.handle-get-ref-branch with: repo: tools.path.repo branch: tools.path.branch outputParameters: - type: object mapping: $.