naftiko: 1.0.0-alpha2 info: label: "Freestyle Git API \u2014 Search" description: 'Freestyle Git API search surface. 4 operations. Lead operation: Full-text Search Across Repository Files. Self-contained Naftiko capability for one Freestyle business surface.' tags: - Freestyle - Git - Search created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: FREESTYLE_API_KEY: FREESTYLE_API_KEY capability: consumes: - type: http namespace: git-search baseUri: https://api.freestyle.sh description: Freestyle Git API search business capability. resources: - name: git-v1-repo-search path: /git/v1/repo/{repo}/search operations: - name: handle-search method: GET description: Full-text Search Across Repository Files outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: query in: query type: string required: true - name: rev in: query type: string required: false - name: pathPattern in: query type: string required: false - name: excludePattern in: query type: string required: false - name: maxResults in: query type: string required: false - name: caseSensitive in: query type: string required: false - name: isRegex in: query type: string required: false - name: wholeWord in: query type: string required: false - name: offset in: query type: string required: false - name: git-v1-repo-search-commits path: /git/v1/repo/{repo}/search/commits operations: - name: handle-search-commits method: GET description: Search Commit Messages outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: query in: query type: string required: true - name: rev in: query type: string required: false - name: maxResults in: query type: string required: false - name: isRegex in: query type: string required: false - name: caseSensitive in: query type: string required: false - name: git-v1-repo-search-diffs path: /git/v1/repo/{repo}/search/diffs operations: - name: handle-search-diffs method: GET description: Search File Content Changes Across Commits outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: query in: query type: string required: true - name: rev in: query type: string required: false - name: pathPattern in: query type: string required: false - name: excludePattern in: query type: string required: false - name: maxResults in: query type: string required: false - name: caseSensitive in: query type: string required: false - name: isRegex in: query type: string required: false - name: wholeWord in: query type: string required: false - name: offset in: query type: string required: false - name: git-v1-repo-search-files path: /git/v1/repo/{repo}/search/files operations: - name: handle-search-files method: GET description: Search for Files by Name outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: repo in: path type: string required: true - name: query in: query type: string required: true - name: rev in: query type: string required: false - name: maxResults in: query type: string required: false - name: isRegex in: query type: string required: false - name: caseSensitive in: query type: string required: false authentication: type: apikey key: Authorization value: Bearer {{env.FREESTYLE_API_KEY}} placement: header exposes: - type: rest namespace: git-search-rest port: 8080 description: REST adapter for Freestyle Git API search. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/git/v1/repo/{repo}/search name: git-v1-repo-search description: REST surface for git-v1-repo-search. operations: - method: GET name: handle-search description: Full-text Search Across Repository Files call: git-search.handle-search with: repo: rest.path.repo outputParameters: - type: object mapping: $. - path: /v1/git/v1/repo/{repo}/search/commits name: git-v1-repo-search-commits description: REST surface for git-v1-repo-search-commits. operations: - method: GET name: handle-search-commits description: Search Commit Messages call: git-search.handle-search-commits with: repo: rest.path.repo outputParameters: - type: object mapping: $. - path: /v1/git/v1/repo/{repo}/search/diffs name: git-v1-repo-search-diffs description: REST surface for git-v1-repo-search-diffs. operations: - method: GET name: handle-search-diffs description: Search File Content Changes Across Commits call: git-search.handle-search-diffs with: repo: rest.path.repo outputParameters: - type: object mapping: $. - path: /v1/git/v1/repo/{repo}/search/files name: git-v1-repo-search-files description: REST surface for git-v1-repo-search-files. operations: - method: GET name: handle-search-files description: Search for Files by Name call: git-search.handle-search-files with: repo: rest.path.repo outputParameters: - type: object mapping: $. - type: mcp namespace: git-search-mcp port: 9090 transport: http description: MCP adapter for Freestyle Git API search. One tool per consumed operation. tools: - name: freestyle-handle-search description: Full-text Search Across Repository Files hints: readOnly: true destructive: false idempotent: true call: git-search.handle-search with: repo: tools.path.repo outputParameters: - type: object mapping: $. - name: freestyle-handle-search-commits description: Search Commit Messages hints: readOnly: true destructive: false idempotent: true call: git-search.handle-search-commits with: repo: tools.path.repo outputParameters: - type: object mapping: $. - name: freestyle-handle-search-diffs description: Search File Content Changes Across Commits hints: readOnly: true destructive: false idempotent: true call: git-search.handle-search-diffs with: repo: tools.path.repo outputParameters: - type: object mapping: $. - name: freestyle-handle-search-files description: Search for Files by Name hints: readOnly: true destructive: false idempotent: true call: git-search.handle-search-files with: repo: tools.path.repo outputParameters: - type: object mapping: $.