Skip to content

Your first useful query

Use this walkthrough after the local quickstart or after joining a team.

Pick a repository that is already indexed in Repositories, and a function in it that you know well and that has at least one caller. Open that repository’s checkout in your coding agent. The examples below use OWNER/REPO for the repository name as it appears in Repositories, and SYMBOL for your function. Replace both.

In your checkout, record the revision you are reading:

Terminal window
git rev-parse HEAD

Copy this prompt, replacing OWNER/REPO and SYMBOL:

Using ontlgy in OWNER/REPO, find SYMBOL.
Report the indexed commit and whether it matches my checkout.
Read the source file at the returned location and explain what SYMBOL does
and where it is called from. Do not change any files.

The agent can use these tool calls (shown as tool arguments, not shell commands):

{"repo":"OWNER/REPO","query":"SYMBOL","limit":5}

Pass these arguments to search, then use symbol with a returned reference:

{"repo":"OWNER/REPO","ref":"SYMBOL"}

A successful response points to the file and line where you know SYMBOL is defined. After reading that file, the agent should describe the function in terms that match the code, and name callers you can confirm by searching your checkout.

These calls are illustrative; the exact fields returned depend on the indexed repository and the ontlgy revision you run.

Confirm that the answer includes a file location and indexed commit. If the revision differs from git rev-parse HEAD, inspect the matching source revision or re-index the intended repository version. Passing a commit to a code tool checks freshness; it does not switch the indexed version.

  • No ontlgy tools: reload the agent and check its MCP connection.
  • No repository: confirm the repository is selected, indexing completed, and your agent uses the correct installation.
  • No symbol: inspect the indexed commit, spelling and repository name. Use Re-index now if appropriate.
  • Several candidates: choose the returned path or symbol ID. Do not guess between same-name functions.

Next, inspect the impact of changing this function or investigate a symptom.