New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceTool IntegrationsDeveloper Tools
Tool

Greptile Tools

Query, search, and index code repositories with natural language using Greptile.

Greptile indexes your code repositories and lets you ask natural-language questions, run semantic searches, and submit new repositories for indexing through the Greptile API. Use these tools in a workflow when you need an agent to reason over a codebase, find relevant files, or onboard a repository before querying it.

Overview

PropertyValue
Providergreptile
Categorytools
AuthBearer Token (Greptile API key) plus a GitHub access token in the X-GitHub-Token header

Operations

OperationTool IDDescription
Querygreptile_queryAsk a natural-language question about indexed repositories and get an answer
Searchgreptile_searchSearch indexed repositories for relevant files and code references
Index repositorygreptile_index_repositorySubmit a repository to Greptile for indexing so it can be queried and searched

Configuration

greptile_query

Ask a natural-language question about one or more indexed repositories.

ParameterTypeRequiredDescription
apiKeystringYesGreptile API key. Secret — sent as the Authorization: Bearer token.
githubTokenstringYesGitHub access token with read access to the repositories. Secret — sent in the X-GitHub-Token header.
querystringYesThe natural-language question to ask.
repositoriesjsonYesArray of repository objects to query (e.g. [{ remote, repository, branch }]).

Search indexed repositories for relevant files and code references.

ParameterTypeRequiredDescription
apiKeystringYesGreptile API key. Secret — sent as the Authorization: Bearer token.
githubTokenstringYesGitHub access token with read access to the repositories. Secret — sent in the X-GitHub-Token header.
querystringYesThe search query.
repositoriesjsonYesArray of repository objects to search (e.g. [{ remote, repository, branch }]).

greptile_index_repository

Submit a repository to Greptile for indexing so it can later be queried and searched.

ParameterTypeRequiredDescription
apiKeystringYesGreptile API key. Secret — sent as the Authorization: Bearer token.
githubTokenstringYesGitHub access token with read access to the repository. Secret — sent in the X-GitHub-Token header.
remotestringYesSource host of the repository (e.g. github).
repositorystringYesRepository identifier (e.g. owner/repo).
branchstringNoBranch to index (defaults to the repository's default branch).

Outputs

greptile_query

  • data (json) — The Greptile query answer and sources.
  • metadata (json) — Response metadata. Contains status (string) — query status (returned as completed).

greptile_search

  • data (json) — The Greptile search results.
  • metadata (json) — Response metadata. Contains status (string) — search status (returned as completed).

greptile_index_repository

  • data (json) — The Greptile indexing job response.
  • metadata (json) — Response metadata. Contains status (string) — the indexing job status returned by Greptile.

YAML Example

greptile_1:
  type: greptile
  name: "Greptile"
  inputs:
    operation: "greptile_query"
    query: "How does authentication work?"
    repositories: '[{ "remote": "github", "repository": "owner/repo", "branch": "main" }]'
    githubToken: "{{GITHUB_TOKEN}}"
    apiKey: "{{GREPTILE_API_KEY}}"
  connections:
    outgoing:
      - target: next-block-id

Tips

  • This provider needs two secrets: a Greptile API key (sent as Authorization: Bearer <apiKey>) and a GitHub access token (sent in the X-GitHub-Token header). Store both as environment variables and reference them with {{GREPTILE_API_KEY}} and {{GITHUB_TOKEN}} rather than hardcoding them.
  • A repository must be indexed before you can query or search it. Run greptile_index_repository first, then use greptile_query or greptile_search once the indexing job has completed.
  • The repositories parameter is a JSON array of objects, each shaped like { "remote": "github", "repository": "owner/repo", "branch": "main" }. You can pass multiple repositories in one query or search.
  • For greptile_index_repository, branch is optional — omit it to index the repository's default branch.
  • All three tools call https://api.greptile.com/v2/... over HTTPS POST. The downstream data output is the raw Greptile JSON, so reference fields from it as {{greptile_1.data.<field>}} in later blocks.