GitDBDocs
MCP

MCP tools

What your agent can do in a GitDB repository over MCP, grouped by task.

When your agent connects, GitDB sends it the list of available tools and a description of each, so there's nothing to set up per tool. This page is a quick reference to the core tools and what each one does for you.

A few rules apply to every tool:

  • Tools work on the repository your connection names. See Connect your AI agent.
  • Each tool call counts as one call against your organization's daily allowance.
  • Tools that change the repository or save memories need a token with the repo:write scope and an organization role that can write.
  • Semantic search and agent memory are available on plans that include them. See gitdb.co/pricing.

Search and read code

ToolWhat it does
gitdb_search_codeFinds code by meaning. Describe what you're looking for in plain language. Searches the repository's default branch. Needs semantic search on your plan.
gitdb_grepSearches file contents with a regular expression.
gitdb_find_filesFinds files whose paths match a glob pattern.
gitdb_ls_dirLists the contents of a directory.
gitdb_read_linesReads a range of lines from a file, up to 500 lines per call.
gitdb_find_functionFinds functions and methods by name. End the name with * for a prefix match.
gitdb_find_callersFinds every place a function is called.
gitdb_read_functionReturns a function's source code, looked up by name.
gitdb_read_structReturns a struct or class definition, looked up by name.
gitdb_list_symbolsLists the functions, classes, and methods in a file or directory.
gitdb_architectureShows how the repository's modules depend on each other, for the whole repository or one path.
gitdb_list_reposShows details of the repository the connection is working on.

gitdb_search_code returns results only after the repository has been AST indexed. If the repository page doesn't show AST indexed, click AST index on that page to start indexing.

History and branches

ToolWhat it does
gitdb_git_logShows recent commits, optionally filtered by author.
gitdb_git_showShows the details of one commit.
gitdb_git_diffShows the diff between two commits or refs.
gitdb_git_statusLists the files that changed between two refs.
gitdb_list_refsLists branches and tags.
gitdb_check_statusShows CI and check results for a commit, or for a pull request's latest commit.
gitdb_create_branchCreates a branch, from the default branch or from a ref you name.
gitdb_create_tagTags a commit.
gitdb_merge_branchesMerges one branch into another. If the branches conflict, it reports the conflicting files.

Stage and commit changes

File changes are staged first and written to a branch only when your agent commits. Staged changes stay saved on GitDB until they're committed or discarded, so they survive a dropped connection.

ToolWhat it does
gitdb_create_fileStages a new file. It won't overwrite a file that already exists.
gitdb_delete_fileStages a file deletion.
gitdb_list_stagedLists the changes staged on a branch.
gitdb_unstageDrops one staged change without committing it.
gitdb_discard_allDrops every staged change on a branch without committing.
gitdb_scan_secretsChecks file content for leaked secrets before you commit it.
gitdb_commitCommits the staged changes to a branch, the default branch unless you name another.

Agent memory

Memories are notes your agents save and search later. A memory can be anchored to a file or function, so GitDB can tell you when the code it describes has changed. These tools need agent memory on your plan.

ToolWhat it does
gitdb_memory_storeSaves a memory, optionally anchored to a file or function.
gitdb_memory_recallSearches saved memories and flags those whose anchored code has changed since they were saved.
gitdb_memory_forgetDeletes a memory by its ID.
gitdb_context_recallSearches code and memories together. Needs both semantic search and agent memory on your plan.

On this page