Skip to Content
GitDBDocs
MCP

MCP tools

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

GitDB serves 133 MCP tools: 110 standard tools, included on every plan (except the three GitDB Action tools, which need a plan that includes hosted compute, and the two submodule tools, which need a plan that includes submodules), and 23 premium tools for the paid plans (see Tool classes). When your agent connects, GitDB sends it the list of tools it can use and a description of each, so there's nothing to set up per tool. This page is a quick reference to the standard tools and what each one does for you.

A few rules apply to every tool:

  • Tools work on the repository your connection names, or on the one a call names with its repo argument (org/repo, any repository your token can access — another is refused with forbidden). Connected without naming one, your agent can still list the repositories and organizations it can reach (gitdb_list_repos) and create a repository (gitdb_create_repo); every other tool called without repo answers repo_selection_required with the list of repositories your token can access, so pass repo naming one, or reconnect naming it. See Connect your AI agent.
  • Every tool is standard or premium — the Class column in each table below, explained under Tool classes. On a paid plan, standard tools are unmetered and each premium call counts as one premium op against your premium allowance for the current 5-hour window. On the free plan, each standard call uses one of your fast calls for the window, then standard tools run at reduced speed. The window belongs to the account that owns the repository: your personal account for your own repositories; on Enterprise, it's your own seat's. A Team organization has no included window: its agent ops draw the organization's prepaid agent-ops credits. See Connect your AI agent.
  • Every tool checks your token's scopes. Tools that read code and Git history need repo:read or git:read; tools that read platform data — gitdb_list_repos, the pull request reads, gitdb_check_status, and memory recall — need repo:read. Tools that stage, commit, or change branches and tags need git:write or repo:write. Pull request writes, gitdb_create_repo, saving or forgetting memories, and turning on a branch index need repo:write; gitdb_repo_settings needs git:write or repo:write to change the default branch and repo:write to change the description or visibility. repo:write includes repo:read and git:write includes git:read. A call your token's scopes don't cover is refused with insufficient_scope, naming the scope it needs, and your agent's tool list leaves out the tools it can't call. Changing the repository also needs an organization role that can write.

How tools answer

Tools that read — search, read, list, log, diff, status — answer plain text by default: the result itself (for example one @<path> <start>-<end>/<total_lines> header and the file's lines, or one line per match, file, or commit), then, when there's more to say, one empty line followed by lines like next: {...} or truncated: true, each a name and a JSON value. An empty result is one line in parentheses, such as (no matches). Pass view: "json" to any of these tools for the answer as one JSON object instead.

When an answer carries next, call the same tool again with the JSON after next: as its arguments, unchanged, to get the next page. Tools that change something answer JSON, and so do the pull request tools; an error is always a JSON object with error (and code when it has one). Inside gitdb_batch, a text answer comes back as a JSON string.

Besides its result, an answer can carry members that describe it — trailer lines in text, members beside the result in JSON: omitted (how many were left out), has_more and next (more may exist, and the arguments that fetch it), truncation_reason (why the answer was cut), total_relation (whether a total is exact, eq, or a lower bound, gte), code (for example truncated or unchanged), blob, diagnostics, read_at_commit, callers_verdict, test_callers_excluded (how many test callers a caller search left out; in text, stated in a note: line or in callers_verdict), staged_warning (files in the answer you have staged changes to), blob_gc_failed (the change was saved; nothing for you to do), and index (see Index freshness).

Tool classes

Every tool is standard or premium. The 110 standard tools — the Git, file, grep, staging, commit, pull request, issue, board, project, notification, and GitDB Action tools in the tables below — are included on every plan, except that the GitDB Action tools need a plan that includes hosted compute and the submodule tools need a plan that includes submodules. The 23 premium tools cover AST code intelligence, semantic search, and code-aware agent memory: they come with the paid plans, and on the free plan agent-ops credits unlock them, so your agent still sees them in its tool list.

AST call graphs follow a Go method's calls through its own receiver — s.flush() inside func (s *Store) Sync() links to Store's flush method in the same package — while a call through one of the receiver's fields, such as s.mu.Lock(), is reported as unresolved rather than guessed.

Every other tool is standard. gitdb_grep is standard, except that a call with enclosing: true counts as a premium (AST) call. gitdb_batch, which runs up to 10 independent tool calls in one request, in order, is standard and is never counted itself: each call inside it counts as its own tool. A later read, grep, or file listing in the batch sees the earlier calls' staged edits (the AST tools read committed code), and a failed call doesn't stop the rest; more than 10 calls, a nested gitdb_batch, a tool your agent's role may not call, a call your token's scopes don't cover (insufficient_scope), a call whose repo is malformed (bad_request) or names a repository your token can't access (forbidden), or — when the connection names no repository — a call without repo to anything but gitdb_list_repos or gitdb_create_repo (repo_selection_required) refuses the whole batch before anything runs. The calls in one batch can name different repositories of one organization with repo in their arguments; calls on repositories of more than one organization refuse the batch (bad_request). On the free plan, if one call inside a batch is answered with QUOTA_THROTTLED, that call's entry is an error and the rest of the batch still runs. One MCP request — a whole batch included — can carry at most 16 MiB; a larger one is refused before anything runs (length limit exceeded, with HTTP 413 or HTTP 500), so split a batch of many large writes.

A tool can also be temporarily unavailable across GitDB. While a tool is unavailable, it stays in your agent's tool list, and any call to it answers feature_disabled, with an error that names the tool; nothing is read or changed. A gitdb_grep call with enclosing: true also needs the premium tools to be available, a gitdb_batch that includes a call to an unavailable tool is refused whole, before any of its calls runs, and gitdb_disable_branch_index is always available.

Search and read code

ToolClassWhat it does
gitdb_grepStandardSearches file contents with a regular expression (fixed_strings: true for a literal), keeping files that match include_globs and dropping those that match exclude_globs. A glob without / matches the file name at any depth (*.ts is **/*.ts). Returns up to max_results matches (default 100; more than 500 is treated as 500); when there are more, the answer has has_more: true and a next to resume from. With enclosing: true, each match also names the innermost symbol it sits in, from the AST index of the last indexed commit, and the call counts as a premium (AST) call — its next keeps enclosing: true. context_lines (lines shown around each match) is at most 20; more is refused with bad_request. An unknown ref_name answers ref_unresolved.
gitdb_find_filesStandardFinds files whose paths match a glob, with gitdb_grep's glob rules. Returns up to max_results files (default 200; more than 1,000 is treated as 1,000), and total_matches counts every matching file across all pages. Past that the answer says truncated: true, how many were left out, and gives a next to call again with as is (it carries resume_after and stays on the commit the first page listed). A resume_after not passed back as is answers invalid_cursor, and an unknown ref_name answers ref_unresolved.
gitdb_ls_dirStandardLists a directory (path, default the repository root) at ref_name (default HEAD). A path that is a file answers not_a_directory when your staged changes are included, and not_found otherwise; a path that doesn't exist answers not_found, and an unknown ref_name answers ref_unresolved.
gitdb_read_linesStandardReads a range of lines from a file, up to 500 lines per call; a clipped window comes with a next for the rest. A file that doesn't exist answers not_found, and an unknown ref_name answers ref_unresolved. For several ranges or files, use gitdb_read_many.
gitdb_read_manyStandardReads up to 50 line ranges, from one file or many, in one call (ranges: a list of path, start, end), all at one branch. Up to 500 lines per range and 2,000 lines per call. A range that fails returns its own error entry while the others still answer; no ranges or more than 50 is bad_request, and an unknown branch is ref_unresolved. For one range you want to resume with next, use gitdb_read_lines.
gitdb_list_reposStandardShows details of the repository the connection is working on, plus repos — every repository your token can access, each with its org, repo_name, your role, and its visibility — and orgs, the organizations you belong to, each with its login and your role there. Connected without naming a repository, it answers just orgs and repos; pass repo naming one of repos on a call to work in it, or reconnect naming it. A repository with no completed push or commit yet has few details to show: it answers only its basic details, such as its org, repo_name, your role, and its visibility, with a note that it has no completed push or commit yet, plus repos and orgs. Needs repo:read. Refused on a public-read credential.

Repositories

ToolClassWhat it does
gitdb_create_repoStandardCreates a repository name in the organization org — your personal namespace is your own login; another organization needs your owner or admin role there. visibility is private (default) or public, and description is optional; there's no GitHub-sync mode here. Creating a public repository may not be available yet; while it isn't, the call is refused with feature_disabled, so create the repository private instead. Making an existing private repository public isn't available over MCP — where public repositories are available, an owner or admin does that in the web app's repository settings, behind a typed-name confirmation and an emailed link. It works whether or not the connection names a repository, needs a token with the repo:write scope, and is billed to your personal account. The answer gives the new repository's org, name, description, default_branch, visibility, created_at, updated_at, and a note: to work in it, pass repo naming it on a call, or reconnect naming it. default_branch is empty at first: the default branch is adopted at the first commit or push. A new repository can take up to two minutes to become usable from every connection. It's refused, with one of these codes and a message, as insufficient_scope, email_unverified (verify your email first), plan_limit (your plan's repository limit is reached), not_found (no such organization, or you aren't its owner or admin), conflict (the name is taken or reserved), bad_request (an invalid name, description, or visibility), rate_limited, or feature_disabled (a public repository while public repositories aren't available); an account with no personal namespace to bill is refused with no_personal_namespace.
gitdb_repo_settingsStandardChanges the connected repository's default branch, description, or visibility (to private only) — see Repository settings. Needs your owner or admin role in the repository's organization. The answer gives the repository's org and name, updated (the fields it changed), and each changed field's value now in force.

Repository settings

gitdb_repo_settings takes four optional fields — set at least one:

  • default_branch — the new default branch, a short branch name such as main. It must be an existing branch; otherwise the call is refused with bad_request. Changing it needs git:write or repo:write. Send expected_default_branch with it.
  • expected_default_branch — the current default branch as you last read it — "" if the repository has none yet. If the default branch has changed since, the call is refused with conflict, naming the current one, and nothing changes.
  • description — the new description, at most 1,024 characters; an empty string clears it.
  • visibility — private only. Making a repository public isn't available over MCP: an owner or admin does it in the web app's repository settings, confirmed by email.

Every change needs your owner or admin role in the repository's organization. Changing the description or visibility also needs a token with the repo:write (or repo:admin) scope — git:write is not enough for those two; such a call is refused with insufficient_scope before anything changes. A call that sets no field, or a visibility other than private, is refused with bad_request before anything changes. When you set default_branch together with another field, the default branch is changed first: if that's refused, nothing changes; if the description or visibility change is then refused, the new default branch is kept, and the refusal says so.

It's refused with bad_request (no field set, a visibility other than private, default_branch without expected_default_branch or the reverse, an invalid description, or a default_branch that isn't an existing branch), conflict (the default branch is no longer expected_default_branch — the refusal names the current one, and nothing changes), forbidden (changing the default branch needs owner or admin), not_found (no such repository, or you aren't its owner or admin, when changing the description or visibility), insufficient_scope (the token lacks repo:write), or rate_limited. If GitDB can't confirm the result, the error's message says which change was applied. Connected without naming a repository, the call answers repo_selection_required.

Index freshness

Answers built from the AST index — the AST tools, and gitdb_grep with enclosing: true — always end with an index trailer that says how fresh the index is. When the index is current, the trailer says behind: false, for example index: {"indexed_commit":"5e2b8c1f9d4a7e3b6c0f2a8d1e9b7c4a3f6d0e2b","behind":false} — positive confirmation that the answer reflects the tip, which is that same commit. When the index was built from an earlier commit and nothing it indexes has changed since, it is still current: the trailer says behind: false and names the tip as head beside indexed_commit. If the index the answer came from was built from an older commit than the tip it answers for, the trailer says behind: true, for example index: {"indexed_commit":"3eec5d0a7b9c1d2e4f6a8b0c2d4e6f8a0b2c4d6e","head":"5e2b8c1f9d4a7e3b6c0f2a8d1e9b7c4a3f6d0e2b","behind":true,"stale_files":["src/a.rs"],"omitted":3,"reindex":"running"}. indexed_commit is the commit the index was built from, head the tip, stale_files the files in this answer that changed since then (up to 8, with omitted counting the other files in the answer that may also have changed), and reindex says whether an update of the default branch's index is queued, running, or failed. When you see behind: true, confirm the listed stale_files with gitdb_grep or gitdb_read_many — they read the committed files directly — or wait a moment and ask again when reindex says running. Semantic search answers don't carry this trailer, and neither does an answer that read no index at all.

Branch index

Where per-branch indexes are available, semantic search can also cover branches other than the default branch: each one gets its own index, built in the background and kept current as the branch changes. Up to 16 branches per repository can have one, and an index nobody has updated for 30 days is turned off. Turning on a branch's index is a premium capability: it comes with the plans that include AST code intelligence, and on the free plan agent-ops credits unlock it. Turning one off is a standard tool call, so it never draws on your premium allowance. The tool below appears in your agent's tool list only where per-branch indexes are available, and it isn't counted above. It takes one parameter, branch (a branch name; one refs/heads/ prefix is accepted — another refs/ form answers BRANCH_REF_INVALID).

ToolClassWhat it does
gitdb_disable_branch_indexStandardTurns off semantic search for one branch: its index is deleted in the background. The answer gives the branch and its state (disabling); calling it again while the delete runs succeeds. A branch without an index answers BRANCH_INDEX_NOT_FOUND.

History and branches

ToolClassWhat it does
gitdb_git_logStandardShows recent commits from the branch, tag, or commit in ref_name (default HEAD), optionally filtered by author. n is 1 to 1,000 commits (default 20); more than 1,000 is refused with bad_request. An unknown ref_name answers ref_unresolved, and a stored commit whose committer date can't be read answers commit_unresolved.
gitdb_git_showStandardShows one commit — its tree, parents, author, and message — and each file it changed against its first parent, as added, modified, or deleted. It doesn't include the patch: for that, diff the parent to the commit with gitdb_git_diff. An unknown commit answers ref_unresolved.
gitdb_blameStandardShows which commit last changed each line of a file (path), at the branch, tag, or commit in ref_name (default HEAD). Pass start_line and end_line together to blame only those lines. It's refused with blame_budget_exceeded when any version of the file is over 1 MiB, or when the window is over 10,000 lines or has too deep a history — ask for a narrower range. An unknown ref_name answers ref_unresolved, and a path that doesn't exist answers not_found. Renames aren't followed: lines written before the file was renamed are attributed to the commit that renamed it.
gitdb_git_diffStandardShows the diff between two commits or refs as a unified diff, one page at a time: up to 50 files and 2,000 diff lines per call, with next for the rest. Binary files are marked rather than diffed, a file side over 1 MiB is listed without a textual diff, and a file's diff past 500 lines is cut — read the rest with gitdb_read_lines. As in git diff, the last line of a file version that has no final newline is followed by \ No newline at end of file; in the JSON view (view: "json") that line carries no_newline: true, a member no other line has. An unknown from or to answers ref_unresolved. Asking for an unpaged diff (bounded: false) is refused with GIT_DIFF_UNBOUNDED_UNSUPPORTED.
gitdb_git_statusStandardLists the files that changed between two refs, from from_ref (default HEAD) to to_ref. An unknown ref answers ref_unresolved.
gitdb_list_refsStandardLists branches and tags.
gitdb_check_statusStandardShows CI and check results for a commit (commit_sha), or for a pull request's latest commit (number, used instead of commit_sha when both are given; an unknown pull request is not_found). commit_sha is taken as given, never resolved, so an unknown SHA answers (no checks). Refused on a public-read credential.
gitdb_create_branchStandardCreates branch name at from — a branch, tag, or commit SHA (default HEAD). A name that already exists is refused with already_exists, so repeating the call doesn't succeed twice. A name that breaks git's ref-name rules (git check-ref-format) is refused with bad_request. An unknown from answers ref_unresolved. agent_model is the name of the AI model your agent runs as, recorded with the new branch: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_delete_branchStandardDeletes branch branch (a short name) right away, with no staging step. The answer gives the branch, its ref_name, and old_sha, the commit it pointed at. Changes staged on the branch aren't touched and stay staged under its name: discard yours with gitdb_discard_all, or commit them once a branch of that name exists again. expected_sha is required: the full 40-character commit SHA the branch points at (gitdb_list_refs shows it). The branch is deleted only while it still points there; otherwise it's refused with branch_changed and nothing is deleted. The repository's default branch is always refused with forbidden, and so is a branch whose protection rule forbids deleting it (an organization owner or admin can bypass the rule unless it applies to admins too) and any branch of a GitHub-synced repository — delete it on GitHub. A branch that doesn't exist answers ref_unresolved, a malformed branch or expected_sha is bad_request, and a read-only token or a role that can't write is refused with forbidden. agent_model is the name of the AI model your agent runs as, recorded with the deletion: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_create_tagStandardTags a commit; commit can be a branch, tag, or SHA. A tag name that already exists is refused with already_exists — tags never move. A name that breaks git's ref-name rules is refused with bad_request. An unknown commit answers ref_unresolved, and a repository with no commits yet answers not_found — make the first commit, then tag. A tag is permanent over MCP: no tool deletes or moves it. agent_model is the name of the AI model your agent runs as, recorded with the tag: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_merge_branchesStandardMerges source_branch into target_branch and commits right away, with no staging step. The answer's status is success (a merge commit), fast_forward, already_up_to_date, or conflicts with the conflicting files — a conflicts answer is not an error, and nothing is written. A branch that doesn't exist is refused with ref_unresolved. A protected target, or a repository that requires reviews, is refused with forbidden — use a pull request. ref_contention means retry. agent_model is the name of the AI model your agent runs as, recorded with the merge: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_create_prStandardOpens a pull request from branch into base_branch, with a title and body. base_branch is a short branch name (one leading refs/heads/ is accepted) and defaults to the repository's default branch; a base_branch that doesn't exist is refused with ref_unresolved, and a malformed base_branch, or one equal to branch, with bad_request. It's a real pull request: it gets the next pull request number and shows up on the repository's Pull requests page. The answer includes the pull request's pr_number and url, the link to its page on GitDB. In a GitHub-synced repository your commits are on your work branch gitdb/<your id> (gitdb_commit's ref_name), so open the pull request from that branch. agent_model is the name of the AI model your agent runs as, which GitDB shows on the pull request. An agent credential must send it, and a call without it is refused with bad_request; with a human credential it's optional. It's self-declared (GitDB records it and doesn't verify it) and at most 64 characters, and an empty, padded, or over-long value, or one with control or invisible characters, is refused with bad_request. A closing keyword in the body — close, closes, closed, fix, fixes, fixed, resolve, resolves, or resolved, in any case, then a space and #N — links issue N of the same repository to the pull request as closes, so merging the pull request closes that issue; a bare #N, an issue of another repository, or a number with no issue links nothing. If linking those issues fails, the pull request is still opened and the answer carries issue_link_failed (pr_number, issue_numbers, message): link them with gitdb_link_issue_pr. A branch that doesn't exist is refused with ref_unresolved, and a token without a verified identity is refused with forbidden. Where pull requests over MCP aren't available yet, it answers feature_disabled, like the pull request tools below.
gitdb_revert_commitStandardUndoes the last commit of a branch by making a new commit that restores its parent's tree; history isn't rewritten. commit must be the full 40-character SHA of the branch's tip. For a merge commit, pass mainline, the 1-based parent to restore; the merged commits stay in history, so to land that branch again, revert the revert. A branch that doesn't exist is refused with ref_unresolved. Protected branches and repositories that require reviews refuse it — use a pull request. In a GitHub-synced repository the revert goes to your work branch gitdb/<your id> (the reply's ref_name). Your staged changes aren't touched. If the call times out, check gitdb_git_log before retrying. agent_model is the name of the AI model your agent runs as, recorded with the revert: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.

Pull requests

Open a pull request with gitdb_create_pr (above); these tools read, review, edit, merge, and close it, and resolve its comments. Where pull requests over MCP aren't available yet, each of them, like gitdb_create_pr, answers feature_disabled. Every one takes the pull request's number, except gitdb_list_prs and the two comment-resolution tools, which take a comment's id, and a number below 1 is refused with bad_request.

ToolClassWhat it does
gitdb_list_prsStandardLists the repository's pull requests, highest number first, one page at a time: limit is 1 to 100 per page (default 30), and state keeps only open, closed, or merged ones. Pass the answer's next_cursor as cursor for the next page; it's null on the last page. Each pull request also shows who opened it: author_principal_type is agent or human, author_operator_id is the account behind an agent, and agent_model is the model the agent declared (self-declared, not verified); each is null when it wasn't recorded. Beside each of author_id, author_operator_id, and merged_by it also shows who that is, under the same prefix (author_, operator_, merged_by_): an account's _login, _name, and _avatar_url, or an agent token's label as _name alone. These are null when the id doesn't name a current account or token; the id itself is always shown unchanged. Another state, a limit outside 1 to 100, or a cursor that isn't a next_cursor is refused with bad_request.
gitdb_read_prStandardReads one pull request: its details and its reviews, up to 30 at a time, oldest first — pass reviews_next_cursor as reviews_cursor for more. A review shows the agent_model its agent declared, or null; its display_vote (APPROVE, REQUEST_CHANGES, or COMMENT: the token on the closing VOTE: <token> line of its body, in any letter case, or else its state), which is for display only and never counts toward merging — review_gate does; its reviewed_commit, the commit the review was submitted against, which is how a stale approval shows (review_gate still decides what counts); and who reviewer_id and reviewer_principal_id are, as reviewer_ and reviewer_principal_ members in the same form as gitdb_list_prs. With include_diff: true it also shows what the pull request changes, from its merge base to its head, in up to 2 pages of at most 50 files and 2,000 diff lines each; when more files remain, call gitdb_git_diff with the answer's diff.next, unchanged. An unknown pull request answers not_found. An open pull request also comes with review_gate, the merge gate's own numbers — use them rather than counting reviews yourself: approvals (the approvals that count: each reviewer's latest review, not the author's own, only of the pull request's latest commit), has_blocking (such a latest review requests changes), rule_matched (a branch rule covers the base branch), required_approvals (that rule's number of approvals, 0 without a rule), enforce_admins (the rule applies to owners and admins too), quorum_gate (the repository merges only through a rule that applies to admins and requires approvals), and admin_bypass (you're an owner or admin the rule doesn't bind, so you skip the approval check). A closed or merged pull request has no review_gate. While the issue tools are available, it also shows linked_issues: the repository's issues linked to the pull request, each with its number, title, state (open or closed), and kind (closes: merging the pull request closes the issue; mentions: a reference only). A role sub-agent, and a connection that reads a public repository you aren't a member of, get no linked_issues, since neither can read issues. If reading the links is refused, the whole call is refused with that code, such as rate_limited.
gitdb_submit_pr_reviewStandardReviews a pull request: state is approved, changes_requested, or commented, with an optional body. You can't approve or request changes on your own pull request (forbidden), and an approval counts toward merging only while the pull request's latest commit is still the one you reviewed. agent_model works as in gitdb_create_pr: an agent credential must send it (bad_request without it), and it's optional with a human credential.
gitdb_pr_commentStandardComments on one line of a pull request's diff: file_path, line, side (RIGHT for the line in the pull request's changes, LEFT for the line in its base), and body, all required. Comments on the pull request as a whole aren't supported. agent_model works as in gitdb_create_pr: an agent credential must send it (bad_request without it), and it's optional with a human credential.
gitdb_list_pr_commentsStandardLists a pull request's line comments, oldest first, one page at a time: limit and next_cursor work as in gitdb_list_prs. A comment whose line has changed since shows outdated: true. Each comment shows author_principal_type, author_operator_id, and agent_model as in gitdb_list_prs; they're null on comments written before GitDB recorded them. It also shows who author_id, author_operator_id, and resolved_by are, as author_, operator_, and resolved_by_ members in the same form as gitdb_list_prs.
gitdb_merge_prStandardMerges a pull request into its base branch right away. method is required — merge (a merge commit), squash, or rebase — and message replaces the default commit message. The answer's status is merged, with the merged_commit, or conflicts, with the conflicting files: a conflicts answer means nothing was merged and the pull request stays open. Nothing is merged when it's refused: an unknown pull request answers not_found, one that isn't open not_open, a method the repository doesn't allow method_not_allowed, missing approvals or a requested change merge_blocked, and a pull request with nothing to merge nothing_to_merge; a token without a verified identity, a credential whose operator is not an organization owner or admin, or a repository that requires a review quorum its base branch's rule doesn't enforce, is refused with forbidden. ref_contention means retry. pr_base_changed means the merge did happen, but the pull request was retargeted or closed at the same moment: the merge commit is already in its former base branch and the pull request isn't marked merged, so don't retry the merge, which would merge it again into the new base — read it again with gitdb_read_pr, then review it against its new base or close it. agent_model is the name of the AI model your agent runs as, recorded with the merge: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_update_prStandardEdits an open pull request: set at least one of title (not empty), body (an empty string clears it), and base_branch (retargets it to merge into another branch). Its author (for a pull request an agent opened, also the account behind that agent) or a repository owner or admin can edit it; a collaborator only its own pull requests. agent_model works as in gitdb_create_pr: an agent credential must send it (bad_request without it), and it's optional with a human credential. The answer gives the number and changed, the fields it wrote — a value that's already stored isn't written, so repeating the call answers changed: [] — plus the new base_branch after a retarget. An edited body isn't read again for closing keywords: those link issues only when the pull request is opened, so link one with gitdb_link_issue_pr. A retarget makes the diff and the merge check read the new base; approvals given against the old base no longer count toward merging, while a requested change still blocks it. Nothing changes when it's refused: an unknown pull request answers not_found, one that isn't open not_open, a base_branch that doesn't exist ref_unresolved, and someone who isn't allowed to edit it forbidden; a pull request retargeted, closed, or merged while the edit was applied answers conflict — read it again with gitdb_read_pr and retry. Nothing to change, an empty title, or a malformed base_branch or one equal to the pull request's head branch is refused with bad_request.
gitdb_close_prStandardCloses a pull request without merging it. By default only its author or a repository owner or admin can close it; anyone else is refused with forbidden. An unknown pull request answers not_found, and one that isn't open answers not_open. agent_model is the name of the AI model your agent runs as, recorded with the close: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.
gitdb_resolve_pr_commentStandardResolves the conversation of one line comment: id is the comment's id from gitdb_list_pr_comments. Any member who can write to the repository, and any of its collaborators, can resolve any of its comments; collaborators can't reopen comments, and read-only tokens can't resolve or reopen them. GitDB records you as the resolver from your token, never from an argument, and resolving a comment again records you anew. An empty id is refused with bad_request; a comment that doesn't exist answers not_found.
gitdb_unresolve_pr_commentStandardReopens a resolved conversation: id is the comment's id. Only the comment's author, whoever resolved it, or a repository owner or admin can reopen it; anyone else is refused with forbidden. A collaborator can never reopen a conversation, even one they resolved. An empty id is refused with bad_request; a comment that doesn't exist answers not_found.

Issues

Your agent can open, read, and work through the repository's issues. Where issues over MCP aren't available yet, each of these tools answers feature_disabled. Issues and pull requests are numbered separately; an issue number below 1, and any other argument outside what a tool takes, is refused with bad_request. A connection that reads a public repository you aren't a member of can't use these tools. gitdb_list_issues, gitdb_list_org_issues, gitdb_read_issue, gitdb_issue_timeline, gitdb_issue_activity, gitdb_list_sub_issues, gitdb_list_issue_criteria, gitdb_list_issue_notes, gitdb_list_labels, gitdb_list_milestones, and gitdb_list_org_members need repo:read; the other eighteen need repo:write. An issue that doesn't exist, or one you can't read or change, answers not_found.

An issue can carry only the labels registered in its repository: gitdb_list_labels lists them, and a new repository starts with nine default labels (bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix). A label you add to an issue is matched regardless of case and stored the way the repository spells it; a label that isn't registered is refused with bad_request, so register it first with gitdb_create_label. Removing a label from an issue never needs it to be registered.

An issue can also carry acceptance criteria and issue notes. Acceptance criteria are short single-line items, each marked done or not done, at most 100 per issue; gitdb_list_issue_criteria lists them with how many are done. Issue notes are the organization's own working notes on an issue, and they're distinct from the issue's comments: gitdb_read_issue doesn't show them, and only the organization's own members can read or write them — a collaborator of the repository can't. Neither appears on the issue's timeline (gitdb_issue_timeline) or in its activity (gitdb_issue_activity).

ToolClassWhat it does
gitdb_create_issueStandardOpens an issue with a title (1 to 256 characters) and an optional Markdown body, labels (registered labels, at most 20), and assignees (account ids of organization members, at most 10 — gitdb_list_org_members lists them). Any organization member who can write, or a collaborator of the repository, can open one. agent_model works as in gitdb_create_pr: an agent credential must send it (bad_request without it), and it's optional with a human credential. The answer gives the issue's id, its number, and its url.
gitdb_list_issuesStandardLists the repository's issues, highest number first, one page at a time: state keeps only open or closed ones, label (a registered label, matched regardless of case) and assignee (an account id) keep only the issues that carry them, q keeps only the issues whose title contains that text (regardless of case; 1 to 256 characters), the filters combine, and limit is 1 to 100 per page (default 30). Pass the answer's next_before as before for the next page; it's null on the last page. Each issue shows its labels and its assignees (user_id, login, name, avatar_url), and who opened it as in gitdb_list_prs: author_principal_type, author_operator_id, and the agent_model the agent declared (self-declared, not verified).
gitdb_list_org_issuesStandardLists the issues of every repository of the organization that you can read, in one state, newest first, one page at a time: state is required — open or closed; assignee (an account id — gitdb_list_org_members lists them) keeps only the issues assigned to that account, across the organization's repositories you can read; and limit is 1 to 100 per page (default 30). Pass the answer's next_cursor as cursor for the next page; it's null on the last page. Each entry gives the issue's repo (the repository's name) and the issue as gitdb_list_issues lists it. Repositories whose read access rules restrict you are left out. Only the organization's own members can list them: a connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't. Another state, an invalid assignee, a limit outside 1 to 100, or a cursor that isn't a next_cursor is refused with bad_request.
gitdb_read_issueStandardReads one issue with its conversation: the issue as gitdb_list_issues lists it, its comments, oldest first, its pull request links (kind closes: merging that pull request closes the issue; mentions: a reference only), and its url.
gitdb_issue_timelineStandardReads an issue's timeline (number): who changed what, newest first, one page at a time. Each event is one change: its kind — created, title_edited, body_edited, label_added, label_removed, assignee_added, assignee_removed, closed, reopened, pr_linked, or pr_unlinked — and who made it: actor_principal_type (agent or human), actor_principal_id, actor_operator_id (the account behind it, null when none was recorded), the agent_model the agent declared (self-declared, not verified; null when none was declared), and, when that account resolves, its operator_login, operator_name, and operator_avatar_url. payload_json holds the change's details as JSON text — such as the label, the assignee's account id, the old and new title, or the pull request number — and created_at is in Unix milliseconds. Comments aren't events: gitdb_read_issue lists them. Sub-issue and milestone changes aren't on this timeline either: gitdb_issue_activity reads them together with this timeline's changes and the comments. An issue's acceptance criteria and notes appear on neither: gitdb_list_issue_criteria and gitdb_list_issue_notes read them. limit is 1 to 100 per page (default 30); pass the answer's next_before_at and next_before_id as before_at and before_id for the next page, always both together; both are null on the last page.
gitdb_issue_activityStandardReads an issue's activity (number): its changes and its comments in one stream, newest first, one page at a time — gitdb_issue_timeline reads the changes alone. Every row has its src (event for a change, comment for a comment), id, created_at (in Unix milliseconds), and display, GitDB's own sentence for the row, without who did it: show it for a kind your agent doesn't know. A change row also has its kind — one of gitdb_issue_timeline's kinds, or sub_issue_added, sub_issue_removed, parent_set, parent_removed, milestoned, or demilestoned — who made it, shown as in gitdb_issue_timeline (actor_principal_type, actor_principal_id, actor_operator_id, agent_model, and the operator_ members), and payload, the change's details as a JSON object: a related issue as its issue_id, repo, number, title, and state, and a milestone change as the from and to milestone ids. A comment row has the comment as gitdb_read_issue lists it; a deleted comment's body is empty. A change naming an issue of a repository you can't read is left out. limit is 1 to 100 per page (default 30); pass the answer's next_before_at and next_before_id as before_at and before_id for the next page, always both together; both are null on the last page, and a page can hold fewer rows than limit and still have a next one.
gitdb_issue_commentStandardComments on an issue: body is Markdown and can't be blank. Anyone who can open issues can comment. agent_model works as in gitdb_create_issue. The answer gives the comment's id.
gitdb_update_issueStandardChanges an issue: set at least one of title, body, state (closed closes it, open reopens it), state_reason (with state: "closed" only: completed, the default, or not_planned), labels, and assignees (each {add, remove}, assignees as account ids of organization members; a label you add must be registered, one you remove needn't be). The changes apply in this order — title and body, label removals, label additions, assignee removals, assignee additions, then the state change last — and the answer's changed lists what changed, in that order. The issue's author, an organization member who can write, or an owner or admin can change it. Closing a closed issue or reopening an open one is refused with conflict. If a later change fails, the earlier ones stay applied, so read the issue again before retrying. agent_model works as in gitdb_create_issue and is shown beside each change on the issue's timeline (gitdb_issue_timeline); it isn't a change by itself. Agent tokens must now send it on this tool too: a call from an agent token without it is refused with bad_request.
gitdb_link_issue_prStandardLinks an issue (number) and a pull request of the same repository (pr_number) as kind closes (merging the pull request closes the issue) or mentions (a reference only); unlink: true removes that link instead. A pull request that doesn't exist in the repository is refused with bad_request. The answer's changed is false when there was nothing to do. Whoever can change the issue with gitdb_update_issue can change its links. agent_model works as in gitdb_create_issue and is shown beside the link change on the issue's timeline (gitdb_issue_timeline). Agent tokens must now send it on this tool too: a call from an agent token without it is refused with bad_request.
gitdb_link_sub_issueStandardMakes issue sub_issue_number a sub-issue of issue number; sub_issue_repo names another repository of the organization the sub-issue belongs to, by name (without it, the same repository), and unlink: true removes that sub-issue instead. An issue has at most one parent: linking a sub-issue that already has another parent moves it under number. A parent holds at most 100 sub-issues, and a tree of sub-issues is at most 8 levels deep, counting the top issue; a link past either limit, or one that would make a cycle, is refused with conflict, and so is a change made at the same moment — read the relations again with gitdb_list_sub_issues. An issue can't be its own sub-issue (bad_request). Closing a parent doesn't close its sub-issues. Both issues must be ones you can change with gitdb_update_issue; a collaborator can relate issues of the same repository only. The answer gives number, sub_issue_number, sub_issue_repo (only when you set it), link (true when linked, false when unlinked), and changed, which is false when there was nothing to do. agent_model works as in gitdb_create_issue and is shown beside the change in both issues' activity (gitdb_issue_activity).
gitdb_list_sub_issuesStandardReads an issue's sub-issue relations (number) in one call: its parent, its sub-issues as children, in order (at most 100), their progress, and the issue's milestone. parent and each of children give the issue's repo (the repository's name — a sub-issue can belong to another repository of the organization) and the issue as gitdb_list_issues lists it; parent is null when the issue has none. progress counts the listed sub-issues as open and closed. milestone is the issue's milestone as gitdb_list_milestones lists it, without progress, or null when it has none or its milestone was deleted. Issues of repositories you can't read are left out and aren't counted.
gitdb_set_issue_milestoneStandardPuts issue number in milestone milestone (an id from gitdb_list_milestones), or takes it out of its milestone with milestone: null; milestone is required. An issue is in at most one milestone: setting another one moves it. A milestone that isn't one of the repository's milestones, or that has been deleted, is refused with bad_request. The issue's author, an organization member who can write, or an owner or admin can change it. The answer gives the issue's number, its state, and changed: ["milestone"], or [] when the issue already had that milestone and nothing was written. If the issue's milestone or that milestone changed at the same moment, it's refused with conflict: read the issue's milestone again with gitdb_list_sub_issues. agent_model works as in gitdb_create_issue and is shown beside the change in the issue's activity (gitdb_issue_activity).
gitdb_add_issue_criterionStandardAdds an acceptance criterion to issue number: text is 1 to 256 characters on a single line, with no control characters. It goes after the issue's other criteria, not done. An issue holds at most 100 criteria: one more is refused with conflict. The issue's author, an organization member who can write, or an owner or admin can change an issue's criteria, with a token that has repo:write. agent_model works as in gitdb_create_issue — an agent credential must send it (bad_request without it) — and is recorded with the change. The answer gives the issue's number and the new criterion's id (icr_ followed by 16 lowercase hex characters).
gitdb_check_issue_criterionStandardMarks acceptance criterion criterion_id (an id from gitdb_list_issue_criteria) of issue number done with done: true, or not done with done: false. Marking it done records who marked it, when, and the agent_model the agent declared (self-declared, not verified), all shown by gitdb_list_issue_criteria; marking it not done clears them. Who can change criteria, and agent_model, work as in gitdb_add_issue_criterion. The answer gives number, criterion_id, done, and changed, which is false when the criterion already was in that state and nothing was written, so marking it again is safe. If the criterion changed at the same moment, it's refused with conflict: read it again with gitdb_list_issue_criteria.
gitdb_update_issue_criterionStandardReplaces the text of acceptance criterion criterion_id of issue number, under the rules of gitdb_add_issue_criterion; whether it's done doesn't change. Who can change criteria, and agent_model, work as in gitdb_add_issue_criterion. The answer gives number, criterion_id, and changed, which is false when the criterion already had that text and nothing was written. If the criterion changed at the same moment, it's refused with conflict: read it again with gitdb_list_issue_criteria.
gitdb_delete_issue_criterionStandardDeletes acceptance criterion criterion_id of issue number permanently: a deleted criterion can't be restored. Who can change criteria, and agent_model, work as in gitdb_add_issue_criterion. A criterion that doesn't exist, an already deleted one included, answers not_found. The answer gives number, the criterion's id, and deleted: true.
gitdb_list_issue_criteriaStandardLists the acceptance criteria of issue number in the order they were added, every one in one answer, with their progress: how many are done of the total. Each criterion gives its id (the criterion_id the other criteria tools take), text, done, who added it (created_by, created_by_principal_type) and created_at, and who marked it done (done_by, done_by_principal_type), done_at, and done_agent_model, the AI model the agent that marked it done declared (self-declared, not verified; null when none was declared) — those four are null while it isn't done. Each *_principal_type is agent or human; created_by_login, created_by_name, and created_by_avatar_url, and the same done_by_ members, appear when the id is an account's; times are in Unix milliseconds. Anyone who can read the repository's issues can list them.
gitdb_issue_noteStandardAdds a note to issue number, or redacts one: pass exactly one of text, to add a note (not blank, at most 64 KiB, no NUL characters), and delete_id, to redact the note with that id (isn_ followed by 16 lowercase hex characters, from gitdb_list_issue_notes); neither or both is refused with bad_request. Redacting a note removes its text from every answer: the note stays listed, with an empty text and its deleted_at, so who wrote it and when stays. Adding a note takes a member of the organization who can write — not a read-only one. Redacting one takes that too, and being the note's author, the account behind the agent that wrote it, or an owner or admin of the organization. An enterprise owner or admin who isn't a member of the organization itself, a collaborator, and anyone the repository's read access rules restrict are refused with not_found; the token needs repo:write. agent_model goes with text only (beside delete_id it's refused with bad_request), works as in gitdb_create_issue — an agent credential must send it when adding a note — and is recorded on the note. The answer gives number and the note's id; a redaction also gives changed, which is false when the note already was redacted and nothing was written.
gitdb_list_issue_notesStandardReads the notes of issue number, newest first, one page at a time. Each note gives its id, text, who wrote it (created_by and created_by_principal_type, agent or human; created_by_login, created_by_name, and created_by_avatar_url appear when created_by is an account), the agent_model the agent declared (self-declared, not verified; null when none was declared), and created_at; a redacted note's text is empty and it also gives deleted_at. Times are in Unix milliseconds. Every member of the organization, a read-only one included, can read them; an enterprise owner or admin who isn't a member of the organization itself, a collaborator, and anyone the repository's read access rules restrict are refused with not_found. limit is 1 to 100 per page (default 30); pass the answer's next_before_at and next_before_id as before_at and before_id for the next page, always both together; both are null on the last page.
gitdb_list_labelsStandardLists the labels registered in the repository, sorted by name, each with its id, name (the way the repository spells it), color (# and 6 lowercase hex digits), description (empty when none), created_by, created_at, and updated_at. Anyone who can read the repository's issues can list them.
gitdb_create_labelStandardRegisters a label: name (1 to 50 characters, no leading or trailing spaces, no control characters), color (# and 6 lowercase hex digits, such as #d73a4a; an uppercase color is refused, never lowercased), and an optional description (at most 100 characters). The name is stored exactly as you give it and must be unique in the repository regardless of case: a name the repository already has, in any case, is refused with conflict. Only an owner, admin, or member of the organization can register, change, or delete labels — not a read-only member, and not a collaborator, who can still add registered labels to issues; the token needs repo:write. The answer gives the new label.
gitdb_update_labelStandardChanges a registered label (id, lbl_ followed by 16 lowercase hex characters, from gitdb_list_labels): set at least one of name, color, and description (an empty description clears it), under the rules of gitdb_create_label. Renaming a label renames it on every issue of the repository that carries it, in the same change; a rename may change only the case of the label's own name. A name another label has, in any case, or a label changed by someone else meanwhile, is refused with conflict. The answer's changed is false when nothing was different.
gitdb_delete_labelStandardDeletes a registered label (id). A label that's still on any issue of the repository is refused with conflict, naming how many issues carry it: remove it from them first with gitdb_update_issue (gitdb_list_issues with label finds them).
gitdb_list_milestonesStandardLists the repository's milestones — release targets that group its issues — sorted by title, each with its id (mst_ followed by 16 lowercase hex characters: what the other milestone tools and gitdb_set_issue_milestone take), title, description (empty when none), due_at and closed_at (null when unset), state (open or closed), created_by, created_at, updated_at, and progress, how many of its issues are open and closed; times are in Unix milliseconds. With deleted: true it lists the repository's deleted milestones instead, each also with deleted_at — restore one with gitdb_restore_milestone. Anyone who can read the repository's issues can list them.
gitdb_create_milestoneStandardCreates a milestone: title (1 to 256 characters, no control characters), an optional Markdown description (at most 64 KiB), and an optional due_at (in Unix milliseconds). The title must be unique among the repository's milestones regardless of case: a title another milestone has, in any case, is refused with conflict, while a deleted milestone's title is free again. A new milestone is open; gitdb_set_issue_milestone puts issues in it. Only an owner, admin, or member of the organization can create, change, delete, or restore milestones — not a read-only member, and not a collaborator; the token needs repo:write. The answer gives the new milestone, as gitdb_list_milestones lists it without progress.
gitdb_update_milestoneStandardChanges a milestone (id, from gitdb_list_milestones): set at least one of title, description (an empty description clears it), due_at (null clears it), and state (closed closes it, open reopens it), under the rules of gitdb_create_milestone. Closing a milestone doesn't close its issues. It's refused with conflict for a title another milestone has, in any case, for closing a closed milestone or reopening an open one, and for a change made at the same moment — read the milestone again with gitdb_list_milestones. The answer gives the milestone and changed, which is false when nothing was different.
gitdb_delete_milestoneStandardDeletes a milestone (id). The delete is soft: the milestone leaves the list and its title is free again, but it's kept — gitdb_list_milestones with deleted: true shows it, and gitdb_restore_milestone brings it back. Its issues aren't touched. A milestone that's already deleted answers not_found, and one deleted or changed at the same moment is refused with conflict.
gitdb_restore_milestoneStandardBrings a deleted milestone back (id, from gitdb_list_milestones with deleted: true), with its issues. It's refused with conflict when the milestone isn't deleted, when another milestone now has its title, in any case (rename or delete that one first), or when it changed at the same moment (try again).
gitdb_list_org_membersStandardLists the organization's members who can be assigned issues, one page at a time, by account id: each with its user_id (what gitdb_create_issue and gitdb_update_issue take in assignees), login, name, and avatar_url — never an email. limit is 1 to 100 per page (default 30); pass the answer's next_after as after for the next page, and it's null on the last page. Only the organization's own members can list them: a connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't.

Boards

Boards belong to the connected repository's organization, not to one repository. A board holds columns, left to right, and each column holds cards, top to bottom; each card is one issue of any repository of the organization. Only the organization's own members can use boards: a connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't. Where boards over MCP aren't available yet, each of these tools answers feature_disabled; they also need the issue tools to be available. A board id is brd_, a column id brc_, and a card id bri_, each followed by 16 lowercase hex characters; any other is refused with bad_request before anything runs. gitdb_board_list and gitdb_board_read need repo:read; every other board tool needs repo:write. Every member can read boards; changing them takes a member who can write — a read-only member can't. A board, column, or card that doesn't exist, or that you can't read or change, answers not_found.

ToolClassWhat it does
gitdb_board_listStandardLists the organization's boards, each with its id, name, created_at, updated_at, and url (its web page), and your own role in the organization as viewer_role (owner, admin, member, or readonly). Deleted boards are left out; pass deleted: true to list only the deleted ones instead, for gitdb_board_restore.
gitdb_board_readStandardReads one board: its columns, left to right, each with its cards, top to bottom, plus viewer_role and the board's url. A column shows its wip_limit (the most cards it may hold) only when it has one. A card shows its issue (repo, number, title, its current state and state_reason, its labels with their color — null for a label without one — its assignees, its comment_count of comments that aren't deleted, and its linked_prs, each with the pull request's number, current state (open, closed, or merged), and link kind), who added, claimed, and last moved it — each *_principal_type is agent or human, and a person also shows a _login, _name, and _avatar_url, which an agent token doesn't — the claimed_agent_model the claiming agent declared, and its priority (urgent, high, medium, or low) when it has one. A card's issue also shows its milestone (id, title, state — open or closed — and due_at, null when it has no due date), its parent — the issue it's a sub-issue of, with its own repo, number, title, state, and state_reason — and its criteria, how many of its acceptance criteria are done out of their total; each of these is null when the issue has none, and a parent in a deleted repository shows as null too. Cards of a deleted repository aren't shown.
gitdb_board_createStandardCreates a board named name (1 to 255 characters; names don't have to be unique), with its first columns if you pass them (names, left to right, at most 50). You become the board's creator. The answer gives the board's id and name, its columns with their ids, and its url.
gitdb_board_updateStandardRenames a board to name. Only the board's creator or an owner or admin of the organization can rename it. The answer's changed is false when the board already had that name.
gitdb_board_deleteStandardDeletes a board. The delete is soft: the board leaves the list, but its columns and cards are kept, gitdb_board_list with deleted: true shows it, and gitdb_board_restore brings it back. Its issues aren't touched. Only the board's creator or an owner or admin of the organization can delete it.
gitdb_board_restoreStandardBrings a deleted board back, with its columns and cards. Only the board's creator or an owner or admin of the organization can restore it. A board that isn't deleted is refused with conflict.
gitdb_board_create_columnStandardAdds a column named name at the right end of a board; move it with gitdb_board_update_column. A board holds at most 50 columns: one more is refused with conflict. wip_limit (1 to 500; without it, the column has no limit) caps the cards the column holds: adding or moving a card into a column already holding its limit is refused with conflict. The answer's column shows wip_limit only when you set one.
gitdb_board_update_columnStandardRenames, moves, and limits a column: set at least one of name, position, and wip_limit. position takes after_id, to land the column just right of that column, and before_id, just left of it — adjacent columns, neither of them the column itself — and {} moves it to the right end. wip_limit (1 to 500) sets the column's WIP limit, null clears it, and leaving it out keeps it; a limit below the cards the column already holds is allowed — only new cards are refused. The answer's column shows wip_limit only when this call set one — it's absent after a clear and when this call didn't touch it, so read the board for the stored limit — and its changed lists name, position, and wip_limit as they applied. If the columns around the target moved meanwhile, it's refused with conflict: read the board again and retry.
gitdb_board_delete_columnStandardDeletes an empty column. A column that still holds cards, counting cards of a deleted repository, is refused with conflict: move or remove them first.
gitdb_board_add_cardStandardPuts issue number of repository issue_repo (a repository of the organization, by name) on a board as a card in column_id; the answer's card leaves out the issue's labels, assignees, comment count, and linked pull requests — read the board for those. after_id lands it just below that card and before_id just above it — adjacent cards of that column; with neither, it goes to the bottom. An issue can be on several boards, but once per board, and a board holds at most 500 cards; either limit is refused with conflict, and so is a card for a column that already holds its WIP limit of cards. A closed issue's card is allowed.
gitdb_board_move_cardStandardMoves a card into column_id — its own column, to reorder it — placed with after_id and before_id as in gitdb_board_add_card; neither can be the card itself. Any member who can write can move any card: a claim doesn't stop it, and a move never releases it. A move into another column that already holds its WIP limit of cards is refused with conflict; reordering a card within its own column never is. If the card or the cards around the target moved meanwhile, it's refused with conflict: read the board again and retry.
gitdb_board_remove_cardStandardTakes a card off its board, with its claim and move history; the issue itself isn't touched. Any member who can write can remove any card, claimed or not.
gitdb_board_claim_cardStandardClaims an unclaimed card of an open issue as the work you're taking, shown on the card; release: true releases a claim — your own, or anyone's if you're an owner or admin. A claim records who took the card; it isn't a lock. agent_model works as in gitdb_create_issue and is refused with release: true. A card someone else has claimed, or a closed issue's card, is refused with conflict. The answer's changed is false when there was nothing to do.
gitdb_board_claim_nextStandardTakes the next card of column column_id as the work you're taking — a work queue: each worker calls it to pull its next card. If you already hold a claim on a card of that column whose issue is open, that card is answered again with resumed: true and nothing changes; otherwise the first unclaimed card of an open issue is claimed for you, by priority (urgent, high, medium, low, then cards without one) and top to bottom within a priority. The card is claimed where it is, not moved, and as with gitdb_board_claim_card a claim isn't a lock. agent_model works as in gitdb_create_issue; a resumed card keeps the model declared when it was first claimed. Give each worker its own token: workers sharing one are one claimant, and resuming hands them all the same card. The answer gives item_id, claimed: true, resumed, and the card as item (without its issue's labels, assignees, comment count, and linked pull requests — read the board for those); when the column holds no card you can claim, it answers claimed: false and resumed: false. Every call counts as a standard tool call, the empty answer included, so after claimed: false wait before calling again and lengthen the wait after each further empty answer. When other workers claimed the cards first or the board changed meanwhile, it's refused with conflict: call again. Retrying after an unknown outcome is safe — the retry resumes the card already claimed for you.
gitdb_board_set_priorityStandardSets a card's priority: priority is required — urgent, high, medium, or low sets it, and null clears it. The answer's changed is false when the card already had that priority, and it leaves out priority when the card has none.

Projects

A GitDB project groups repositories of your organization, each with an optional branch, and can also hold issues of any of the organization's repositories, at most 500. A connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't use these tools. gitdb_project_items and gitdb_project_link_issue also need the issue tools to be available — where issues over MCP aren't available yet, both answer feature_disabled — and only the organization's own members can use them: an enterprise owner or admin who isn't a member of the organization itself is refused with not_found. A project's issues aren't part of its revision history: gitdb_project_revert doesn't change them.

ToolClassWhat it does
gitdb_project_listStandardLists the organization's projects, most recently changed first, each as gitdb_project_get reads it; the answer also names the org. A project's id is the project_id the other project tools and the memory tools take. With deleted: true it lists the organization's deleted projects instead of its live ones, each also with deleted_at (when it was deleted, in Unix milliseconds) — restore one with gitdb_project_revert. Any member of the organization can list, with a token that has repo:read.
gitdb_project_getStandardReads one project of the organization by its project_id (prj_ followed by 16 lowercase hex characters; any other is refused with bad_request): its id, name, the repositories bound to it (repos, each with its id, name, and branch), created_by, created_at, and updated_at. Any member of the organization can read it, with a token that has repo:read. A deleted project, or one you can't read, answers not_found.
gitdb_project_createStandardCreates a project named name (names don't have to be unique); with bind_repo: true it also binds the connected repository to it. Any member of the organization except a read-only one can create projects, with a token that has repo:write (git:write isn't enough). The answer gives the new project, as gitdb_project_get reads it. Every change to a project is recorded as a revision (see gitdb_project_revisions), except adding or removing its issues.
gitdb_project_updateStandardChanges a project (project_id): set at least one of unbind_repo_name (unbinds that repository), bind_repo_name with an optional branch (binds a repository of the organization; branch without bind_repo_name is refused with bad_request), and name (renames it). They're applied in that order, each as its own revision, so unbinding and binding the same repository re-binds it with the new branch; a repository that's already bound is refused with conflict. The answer's updated lists the changes applied, and project shows the project after the last bind or rename (it's absent when the call only unbinds). If one change is refused, the ones before it are kept and the refusal says which. Any member of the organization except a read-only one can change projects, with a token that has repo:write.
gitdb_project_deleteStandardDeletes a project (project_id). The delete is soft: the project leaves every list, but it and its repository bindings stay in its history, and gitdb_project_revert to a revision before the delete brings it back. Its memories aren't touched. Only the project's creator or an owner or admin of the organization can delete it, with a token that has repo:write. A project that's already deleted, or one you can't delete, answers not_found.
gitdb_project_revisionsStandardLists a project's history (project_id), newest first: every change — creating it, renaming it, binding or unbinding a repository, deleting it, reverting it — is one revision, with its rev, op (created, renamed, repo_added, repo_removed, deleted, restored, or reverted), actor, created_at, and state, the project after that change (its name, whether it was deleted, and its repos, each with its repo_id and branch). A deleted project's history is listed too. Any member of the organization can read it, with a token that has repo:read.
gitdb_project_revertStandardReturns a project (project_id) to revision rev (1 is the project as it was created; gitdb_project_revisions lists them): that revision's name, deleted state, and repository bindings become the project's own, recorded as a new revision, so history is never rewritten and a revert can itself be reverted. Reverting a deleted project to a revision before its delete restores it. A binding whose repository has been permanently deleted isn't brought back. Only the project's creator or an owner or admin of the organization can revert it, with a token that has repo:write. A rev the project doesn't have answers not_found; a change made at the same moment answers conflict — try again. The answer gives the new revision.
gitdb_project_itemsStandardLists the issues in a project (project_id), every one in one answer, oldest added first; gitdb_project_link_issue adds and removes them. Each item gives its id, its issue (repo, the repository's name, number, title, its current state, open or closed, and state_reason, null while it's open), and who added it: added_by, added_by_principal_type (agent or human), the added_agent_model the adding agent declared (self-declared, not verified; null when none was declared), and added_at (in Unix milliseconds) — a person also shows an added_by_login, added_by_name, and added_by_avatar_url, which an agent token doesn't. The answer also gives the project_id and your own role in the organization as viewer_role (owner, admin, member, or readonly). Issues of repositories whose read access rules restrict you, and of deleted repositories, are left out. Every member of the organization, a read-only one included, can list them, with a token that has repo:read. A deleted project, or one you can't read, answers not_found.
gitdb_project_link_issueStandardAdds issue number of repository issue_repo (a repository of the organization, by name) to a project (project_id) with link: true, or removes it from the project with link: false. An issue can be in several projects; a project that already holds 500 issues refuses one more with conflict. An issue_repo that isn't a repository of the organization, or an issue it doesn't have, is refused with bad_request. Changing a project's issues takes a member of the organization who can write — not a read-only one — with a token that has repo:write; adding an issue of a repository whose read access rules restrict you answers not_found. agent_model is the AI model you run as, recorded on the item a link adds; unlike gitdb_link_sub_issue, it's optional for every credential, an agent credential included. It's self-declared (GitDB records it and doesn't verify it) and at most 64 characters, and an empty, padded, or over-long value, or one with control or invisible characters, is refused with bad_request. The answer gives project_id, issue_repo, number, link (true when linked, false when unlinked), and changed, which is false when the issue already was in the project (linking) or wasn't (unlinking) and nothing was written.

Notifications

ToolClassWhat it does
gitdb_list_notificationsStandardLists your own in-app GitDB notifications, newest first — the feed of the account your token belongs to (for an agent credential, the account behind the agent), across every organization. unread: true keeps only the unread ones; limit is 1 to 200 (default 50), and there's no further page. The answer gives unread_count, your total number of unread notifications (never cut by limit or unread), and notifications, each with its id, user_id, kind (the event it's about), category, severity, title, body, link (the page it concerns), org_id, ent_id, created_at, and read_at — times are Unix milliseconds, and read_at is 0 while it's unread. It only reads: notifications are marked read in the GitDB web app, never by a token. A limit outside 1 to 200 is refused with bad_request, a token that was revoked or has expired with unauthorized, and a source address your token's IP allowlist doesn't admit with ip_not_allowed. A connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't use it.

GitDB Action

GitDB Action runs one command at a commit of your repository on a GitDB compute machine, paid from your organization's credits — see GitDB Action for how a job runs, what it costs, the plan limits, and what has to be switched on first. These three tools need a plan that includes hosted compute: on any other plan your agent's tool list leaves them out, and a call is refused with tier_feature_required. A connection that reads a public repository you aren't a member of, or one through which you're a collaborator, can't use them. Every argument is checked before anything is sent; a malformed one is refused with bad_request. A refusal can also be insufficient_scope, rate_limited, unauthorized (a revoked or expired token), or ip_not_allowed (a source address your token's IP allowlist doesn't admit); an answer too large to read is refused with reply_too_large. A failure on GitDB's side is refused with internal_error or service_unavailable: before trying a start again, check your organization's compute jobs (one may have started), and before trying a cancel again, check the job with gitdb_action_status; a status read can simply be tried again.

ToolClassWhat it does
gitdb_action_startStandardStarts a job in the connected repository (or the one repo names): it runs command (one command) in the image image_ref (one of GitDB's job images) at commit commit_sha (40 or 64 lowercase hex characters), which the machine fetches through git_ref (for example refs/heads/main); vcpu, memory_gb, and max_seconds size it, each 1 or more. All seven are required. The job holds credits from the organization's prepaid balance until it ends and is charged for the time it ran. Needs a member of the organization who can write to the repository, hosted compute switched on for the organization with its disclosure accepted by an owner or admin, credit spending on, and a token with repo:write. The answer gives job_id and state (queued). Refused with bad_request (a malformed argument, or an image not on GitDB's list, or a size no GitDB compute machine can run), plan_limit (over the plan's limit on units, seconds, or jobs open at once, or too few credits for the hold), conflict (hosted compute or credit spending switched off, the disclosure not accepted, no GitDB compute machine taking jobs right now, or a change at the same moment — try again), feature_disabled (hosted compute is switched off on GitDB), or not_found (no such repository, or you can't start jobs in it); nothing is started. Each call starts a new job: a start that times out may or may not have started one.
gitdb_action_statusStandardReads one job by its job_id (job_ followed by 16 lowercase hex characters, as gitdb_action_start answered it). The answer gives job_id, org, repo, commit_sha, git_ref, image_ref, command, vcpu, memory_gb, units, max_seconds, state (queued, assigned, running, cancelling, finished, failed, or cancelled), hold_micro and charged_micro (thousandths of a credit), price_micro_per_1000_unit_hours (the price the job was given, in thousandths of a credit per 1,000 unit-hours), start_ms and finish_ms (Unix milliseconds, 0 = not yet), observed_last_seen_ms (when GitDB last saw the job's machine, for a job that ended without a finish report; 0 = not recorded), host_reported_ms (how long the job's machine measured it ran, in milliseconds; 0 = no finish report — together with start_ms, finish_ms and max_seconds it gives the exact time the job was charged), exit_code, failure_reason, output_bytes, and created_at. Anyone who can read the job's repository can read it, with a token that has repo:read. Refused with bad_request (a malformed job_id), not_found (no such job, or you can't read its repository), or conflict (the job's repository was renamed while it was read — try again).
gitdb_action_cancelStandardCancels one job by its job_id. A queued or assigned job is cancelled at once and charged nothing; a running job moves to cancelling — its machine stops it at its next check-in, and it's charged for the time it ran. Anyone who can start jobs in the job's repository, or an owner or admin of the organization, can cancel it, with a token that has repo:write. The answer gives job_id, move (queued_or_assigned_to_cancelled or running_to_cancelling), and state, the job's state after the cancel. Refused with bad_request (a malformed job_id), not_found (no such job, or you can't cancel it), or conflict (the job is already cancelling or has ended, or it moved while being cancelled — check it with gitdb_action_status).

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, and they're kept per token (and per session and thread, when your client names them). An agent linked to your account (signed in with OAuth, or one you created as an agent) keeps them per agent instead, so they also survive its token rotations — see Connect your AI agent.

ToolClassWhat it does
gitdb_create_fileStandardStages a new file. It never overwrites: a path that already exists, or that's already staged, is refused — to create or replace a whole file, use gitdb_write_file. An unknown branch answers ref_unresolved.
gitdb_write_fileStandardStages a whole file: creates path if it doesn't exist, or replaces its entire content if it does. content is the complete new file, up to 1 MiB of UTF-8 text. It replaces any earlier staged change to that path, keeps the file's mode (executable bit, symlink) at commit, and refuses a path that is a directory or a submodule. An unknown branch answers ref_unresolved.
gitdb_delete_fileStandardStages a file deletion. A file that exists only in your staged changes (a staged new file, say) is dropped from staging instead, answered as dropped_staged. A directory is refused with is_a_directory — use gitdb_delete_dir; a missing file is not_found.
gitdb_mkdirStandardCreates a directory by staging an empty <path>/.gitkeep file (Git doesn't store empty directories). Refused if path already exists. An unknown branch answers ref_unresolved.
gitdb_rmdirStandardStages the removal of an empty directory — one that holds nothing but its .gitkeep. Refused if the directory holds other files — use gitdb_delete_dir for that.
gitdb_delete_dirStandardStages the deletion of a directory and everything under it in one step. Files that exist only in your staged changes are unstaged. Nothing is staged if it's refused; a directory with too many paths is refused with too_many_paths, so delete narrower directories.
gitdb_list_stagedStandardLists the changes staged on a branch (default the repository's default branch). Listing doesn't check branch against the repository's branches: changes staged on a branch that has since been deleted are still listed under its name. Each change carries an updated_ns_str stamp; pass it to gitdb_commit paths to commit only the changes you pick.
gitdb_unstageStandardDrops one staged change without committing it; if nothing is staged at that path, it still succeeds. The two halves of a staged move go together: unstaging one half alone is refused, and gitdb_discard_all removes both.
gitdb_discard_allStandardDrops every staged change on a branch without committing.
gitdb_stashStandardSets staged changes aside and brings them back later. op is push (moves all staged changes on branch into a new stash, optionally labelled with name), list, apply (restores a stash and keeps it), pop (restores it and deletes it), or drop (deletes it); apply, pop, and drop take the stash_id from push or list. A stash applies only to the branch it was pushed from. If a path in the stash is already staged, apply and pop are refused with stash_conflict and the stash is kept. If a push times out, check op: "list" before retrying.
gitdb_scan_secretsStandardChecks the content you pass for leaked secrets before you commit it; nothing stored in the repository is read, and file_path only labels the findings. Each finding is block or warn severity, and blocked is true when any finding is block. Refused on a public-read credential.
gitdb_commitStandardCommits the staged changes to branch, the default branch unless you name another. To commit only some of them, pass paths: a list of path and expected_updated_ns_str, the stamp gitdb_list_staged shows — a stale stamp is refused with staging_changed, so list again. If the changes were staged under a different branch, name it in staging_branch; a file's content can only be committed to the branch it was staged on (provenance_mismatch otherwise). In a GitHub-synced repository, commits go to your work branch gitdb/<your id> (the reply's ref_name). Over 10,000 changes or 64 MiB is refused with commit_too_large — split it with paths. A branch that doesn't exist is refused with not_found — a commit never creates one. A role sub-agent's token (a GitDB Code role sub-agent; it's listed in your personal access tokens as swarm:<role>) can't commit to the default branch: it's refused with forbidden; commit to your role branch and open a pull request. A refusal commits nothing; staging_clear_failed is the exception that did commit, with some changes still staged. If the call times out, check gitdb_git_log and gitdb_list_staged before retrying. agent_model is the name of the AI model your agent runs as, recorded with the commit: an agent credential must send it, and with a human credential it's optional. It's checked like gitdb_create_pr's — a malformed value is refused with bad_request.

On this page