Reference
MCP Tools
The Driver MCP server exposes 20 tools. Your AI agent calls these tools automatically based on the tasks it's working on.
Tip: You do not call these tools directly. Ask your agent a question in natural language, and it selects the right tool. This reference helps you understand what is available and how Driver gives your agent the right context.
request_task_context
The primary Driver tool, and the entry point for deep, task-specific context. Runs a specialized context agent server-side that reads architecture docs, navigates code structure, and synthesizes high-signal context tailored to your task. Use BEFORE planning, implementing, debugging, or refactoring.
Non-blocking: this dispatches the work and returns a request_id immediately.
It does not return context directly. Call poll_task_context with that
request_id to check status and retrieve the result once it's ready.
The context agent typically takes 1-3 minutes. Because submitting is asynchronous and cheap, the effective pattern is: submit early, fire several requests in parallel (one per distinct question or area), do other useful work while they run, and poll on a schedule. Independent requests run concurrently, so there is no need to wrap calls in sub-agents.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
task_description | string | Yes | Description of the task you need context for. Include what you're trying to accomplish, relevant scope, constraints, and any context you already have. More detail produces more targeted results. |
codebases | array | Yes | List of codebase targets. Each entry has a codebase_name (from get_codebase_names) and an optional branch_name (from get_branches; omit for the default branch). Pass an empty array only if scope cannot be determined. |
Returns
A request_id, immediately. Pass it to poll_task_context to retrieve the synthesized context once the agent finishes.
When to use
Start here for any non-trivial task. Call get_codebase_names first to resolve the codebase name, then provide a rich task description. This tool replaces iterative exploration for planning and implementation tasks.
Collect task-specific deep context with Driver MCP tools →
Example prompt
"I need to add rate limiting to the API layer in my-backend. Gather context for me."
poll_task_context
Retrieves the status and result of a context request created by
request_task_context. Pass the request_id it returned.
- While the agent works (
QUEUEDorRUNNING): returns the status and the original request input, no context yet. Keep working and poll again. - When done (
COMPLETED): returns the synthesized context, plus the input. - On failure (
FAILEDorCANCELLED): returns the status and an error message.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
request_id | string | Yes | The request_id returned by request_task_context for the request you want to check. |
When to use
After submitting one or more requests with request_task_context. The agent typically takes 1-3 minutes, so a good rhythm is to first poll after about 30-45 seconds, then every 20-30 seconds, doing other work between polls. With several outstanding requests, poll each in turn and collect the ones that have finished. Polling is safe to repeat; a completed request returns the same result for a limited retention window.
Example prompt
"Check on the context requests I submitted and pull in whichever are ready."
gather_task_contextDeprecated
Deprecated: prefer request_task_context + poll_task_context, which run the same context agent without holding a connection open for the full run. This tool is retained for backward compatibility with existing workflows and may be removed in a future release.
Runs a specialized context agent server-side that reads architecture docs, navigates code structure, and synthesizes high-signal context tailored to your specific task — saving your context window. Use BEFORE planning, implementing, debugging, or refactoring.
Synchronous: blocks for the full agent run, typically 1-3 minutes, then returns the synthesized context directly. A dropped connection loses the result, which the request/poll pair avoids. To run multiple calls in parallel, wrap each in a native sub-agent.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
task_description | string | Yes | Description of the task you need context for. Include what you're trying to accomplish, relevant scope, constraints, and any context you already have. More detail produces more targeted results. |
codebases | array | Yes | List of codebase targets. Each entry has a codebase_name (from get_codebase_names) and an optional branch_name. Pass an empty array only if scope cannot be determined. |
When to use
Existing workflows that already depend on the synchronous, single-call contract. For new usage, prefer request_task_context + poll_task_context.
Collect task-specific deep context with Driver MCP tools →
Example prompt
"I need to add rate limiting to the API layer in my-backend. Gather context for me."
get_codebase_names
Returns all codebases available in your Driver organization. Most other Driver tools require a codebase name — call this first to discover valid names.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
include_metadata | boolean | No | When true, returns descriptions and type tags alongside codebase names. Useful for assessing which codebases are relevant to a task. Defaults to false. |
When to use
Call this at the start of any session before using other tools. Pass include_metadata=true when you need to identify which codebases are relevant to a multi-repo task.
Example prompt
"What codebases are available in Driver?"
get_branches
Returns all branches for a codebase that have completed documentation, with an indicator for the default branch.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
When to use
Before querying documentation for a specific branch. Use the returned branch names in the optional branch_name parameter of other tools.
Example prompt
"What branches does Driver have documentation for in my-backend?"
get_architecture_overview
Returns a comprehensive architecture document that covers system structure, key components, design patterns, and relationships.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Start of any task that requires broad codebase understanding. This is the single most valuable tool for grounding the agent in system-level context.
Example prompt
"Show me the architecture of my-backend"
get_llm_onboarding_guide
Returns a guide optimized for AI agents. It covers navigation tips, key entry points, coding conventions, and cross-references to important files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Start of a session to build broad codebase familiarity. Pairs well with get_architecture_overview for comprehensive orientation.
Example prompt
"Get oriented with my-backend"
get_changelog
Returns a high-level development timeline organized by year and month.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Understanding development history, major feature introductions, and architectural decisions over time. Use to identify a relevant month before drilling in with get_detailed_changelog.
Example prompt
"What has changed in my-backend recently?"
get_detailed_changelog
Returns detailed commit-level information for a specific month.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. |
year | string | Yes | The year to query (e.g., "2026"). |
month | string | Yes | The month to query (e.g., "01" for January). |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Deep-diving into why specific changes were made during a given month. Call get_changelog first to identify the relevant time period.
Example prompt
"What happened in my-backend in January 2026?"
get_code_map
Explores directory structure and returns every file and directory annotated with a pre-computed description of its purpose and contents. Supports adjustable depth and pagination for large trees.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. |
relative_directory_path | string | No | Directory to explore, relative to the codebase root (e.g., "src", "src/utils"). Use empty string for root. Defaults to root. |
max_depth | integer | No | How many levels deep to traverse (0 = directory only, 1 = immediate children, 2 = grandchildren). Defaults to 2. |
start_node | integer | No | Node index to start from for pagination. Use 0 for the first call. The response includes next_node and nodes_remaining for subsequent pages. |
max_nodes | integer | No | Maximum number of nodes to return. Use 0 (no limit) for the first call. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Finding relevant files, understanding directory structure, and exploring unfamiliar areas of a codebase. Use with get_file_documentation to drill into specific files.
Example prompt
"What files handle authentication in my-backend?"
get_file_documentation
Returns symbol-level documentation for a specific file: functions, classes, interfaces, imports, and their descriptions — generated from static analysis. Supports pagination for large files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. |
relative_file_path | string | Yes | Path to the file, relative to the codebase root (e.g., "src/auth/middleware.ts"). |
start_line | integer | No | Line number to start from. Use 1 for the first call. Defaults to 1. |
max_lines | integer | No | Maximum number of lines to return. Use 0 (no limit) for the first call. The response includes next_line and lines_remaining for pagination. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
Understanding the signatures, types, and purpose of symbols in a specific file. Use after get_code_map identifies the relevant file path. Prefer this over get_source_file when you need structured symbol information rather than raw implementation logic.
Example prompt
"Show me the documentation for src/auth/middleware.ts"
get_source_file
Returns the actual source code of a file with line numbers. Use when you need to see exact implementation logic, control flow, or full code context beyond what symbol-level documentation provides. Supports pagination for large files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. |
relative_file_path | string | Yes | Path to the file, relative to the codebase root (e.g., "src/auth/middleware.ts"). Do not include the codebase root directory name. |
start_line | integer | No | Line number to start from. Use 1 for the first call. Defaults to 1. |
max_lines | integer | No | Maximum number of lines to return. Use 0 (no limit) for the first call. The response includes next_line and lines_remaining for pagination. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
When to use
When you need to read the exact implementation of a file — control flow, inline logic, or precise line references. Complements get_file_documentation, which gives structured symbol-level information. If you have local access to the codebase, prefer native file reading tools instead.
Example prompt
"Show me the source code for src/auth/middleware.ts"
glob_files
Finds files in a codebase by path pattern and returns their paths, relative to the codebase root. Use it to discover where files live before reading or searching them.
Patterns use fnmatch semantics, which differ from shell globbing in one way worth knowing: * matches any characters including /. That means *.py already matches nested files, and **/*.py is equivalent to it. Matching is case-sensitive.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
pattern | string | Yes | fnmatch path pattern, for example *.py or src/**/*.ts. |
max_results | integer | No | Maximum file paths to return. Defaults to 200. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
Returns
A list of matching file paths, relative to the codebase root.
When to use
Locating files by name or extension when you know the shape of the path but not where it sits. Pair it with grep_source to search the contents of what you find, or with get_code_map when you want described structure rather than a flat path list.
Example prompt
"Find every migration file in my-backend"
grep_source
Searches a codebase's source with a regular expression and returns matching lines with the surrounding context. Use it to locate a symbol's definition or call sites, a string or config key, or any pattern across the codebase.
Patterns use RE2 syntax. Dot-path files such as .github/ are included in the search. On a very large codebase the first search may report that the source tree is being prepared; retry shortly and it will complete.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
pattern | string | Yes | Regular expression to search for, in RE2 syntax. |
path_glob | string | No | fnmatch path filter that narrows the search, for example *.py. Use it to get the rest of a truncated result set. |
case_sensitive | boolean | No | Whether the search is case-sensitive. Defaults to true. |
max_matches | integer | No | Maximum matches to return. Defaults to 50. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
Returns
Each match carries its file_path, line_number, line_content, and two lines of context on either side. Alongside the matches, the response reports total_matches and whether the result set was truncated, how many files were searched and how many held a hit, and the codebase coverage of the search as manifest_total and missing_count.
Read those coverage fields before concluding a pattern is absent. When missing_count is above zero, some files were not searched, so no matches means the pattern was not found in what was covered rather than that it does not exist. Narrowing path_glob or retrying is the way to close the gap.
When to use
Finding an exact string, identifier, or pattern, which is not a good fit for Driver's precomputed context. Reach for get_related or change_impact instead when the question is about relationships between symbols rather than literal text. If you have local access to the codebase, prefer your own search tools.
Example prompt
"Where is STRIPE_WEBHOOK_SECRET referenced in my-backend?"
get_registered_content_list
Lists all registered content documents accessible to you, including both static pages and auto-updating codebase documents. Use this to discover available content before fetching it.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | No | Filter to content associated with this codebase. |
auto_update_only | boolean | No | If true, only return auto-updating documents. If false, only return static pages. Omit to return both. |
tags | array | No | Filter to content with any of these tag names. |
org_only | boolean | No | If true, only return org-scoped documents (pages with no codebase associations). |
branch_name | string | No | Filter to content for a specific branch. If omitted, the default branch is used. |
When to use
Before calling fetch_registered_content to discover what content names are available. Also useful for auditing what documents have been registered to your organization.
Example prompt
"What registered content is available for my-backend?"
fetch_registered_content
Retrieves the full content of a registered document by name, including its markdown content and metadata.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
content_name | string | Yes | The name of the registered content document. Use get_registered_content_list to discover available names. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. |
When to use
Reading a specific registered document by name. Call get_registered_content_list first to discover available content names.
Example prompt
"Fetch the API design guidelines document"
register_content
Registers a new content document. Supports two types:
- Static content (
auto_update=false) — a markdown document stored as a page. Can be associated with zero or more codebases. Documents without codebase associations are org-scoped and visible to all members of the organization. - Auto-updating content (
auto_update=true) — a document that is automatically updated when the associated codebase changes. Requires exactly one codebase. Provide adescription_or_goalthat guides updates.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
content_name | string | Yes | A unique name for this content document. |
content | string | Yes | The markdown content of the document. For auto-updating content, this is the initial content. |
description_or_goal | string | Yes | A description of the document's purpose. For auto-updating content, this guides the generation of updated content. |
auto_update | boolean | Yes | If true, the document auto-updates when the codebase changes. Requires exactly one codebase in codebase_names. |
codebase_names | array | No | Codebases to associate with this content. Required (exactly one) for auto_update=true. For static content, omit for org-scoped content (requires org admin access). |
tags | array | No | Tags to apply to the document. Static pages only; ignored for auto-updating content. |
branch_name | string | No | Branch to associate content with. If omitted, the default branch is used. |
When to use
Adding new documentation — design decisions, runbooks, API guidelines, or any content you want your agent to access in future sessions. Use auto-updating content for documents that should stay current with codebase changes.
Example prompt
"Register our API design guidelines as a document in Driver"
remove_registered_content
Permanently deletes a registered content document by name. This action cannot be undone. The agent will ask for confirmation before proceeding.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
content_name | string | Yes | The name of the registered content document to delete. Use get_registered_content_list to confirm the exact name before deleting. |
When to use
Removing outdated or incorrect registered documents. Use get_registered_content_list first to confirm the exact content name.
Example prompt
"Remove the old API guidelines document from Driver"
change_impactEarly Access
Early access: contact us to enable it for your organization. Coverage follows Driver's static analysis and is available for Python, Java, JavaScript/TypeScript, C#, and Rust, with support for more languages coming soon.
Reports structured dependency graph and relationship information for a symbol. Provided by deterministic syntax tree computations. Useful generally and to understand the "blast radius" of changing a symbol.
The default mode='summary' answers "how big is this change" with exact counts of various kinds of relationships, and no detail rows. That is cheap enough to run speculatively, or once per changed symbol in a diff. Follow up with one of the other modes described below for rich details.
Address the symbol by name, fully-qualified name, or qualified suffix, in either separator spelling. resolve_config, httpx.Client.request, and Client::request all work. Never pass a language: every analyzed language is searched. For an enum, query the variant rather than the type, since Role.admin returns the sites that branch on the variant while Role returns only the fields declaring the type. Union across variants yourself.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
codebase_name | string | Yes | Name of the codebase. Must match a value from get_codebase_names. |
symbol | string | Yes | Symbol to analyze: name, fully-qualified name, or qualified suffix. For an enum, prefer a variant such as Role.admin over the type. |
mode | string | No | The question being asked. summary (default) is how big the change is, counts only. tests is which tests to run, grouped by file and ranked. dependents is direct callers. impact is what is transitively affected at depth 2 or more, which is beyond the reach of text search. deps is what this symbol depends on, for answering "can I move this". |
detail | string | No | files (default) returns the per-file index. rows expands each file's rows. Scope with path_prefix first: the index's n states the cost before you pay it. |
depth | integer | No | Bound on the impact walk. mode='impact' returns rows from depth 2 up to this value. Defaults to 2. Use 0 for unbounded. 1 is rejected, because that answer is mode='dependents'. |
file_hint | string | No | Path or path suffix that must contain the symbol. Use it to disambiguate when a previous call returned candidates. |
path_prefix | string | No | Limits a file-grouped section to paths under this prefix, relative to the answer's path_root. A prefix that matches nothing returns guidance listing what is available. |
branch_name | string | No | Branch to query. If omitted, the default branch is used. Use get_branches to discover available branches. |
Returns
A resolution status, the resolved entity, the path_root that section paths are relative to, and the commit_sha the answer was computed from. Depending on mode, one section of counts or grouped rows, alongside hits_in and no_hits_in listing the languages searched, and caveats where the snapshot qualifies a claim. When the symbol is ambiguous the answer lists ranked candidates instead of a section; re-run with file_hint.
Sections are grouped by file and never truncated: per-file counts sum to the section total, so the index is a complete work list. Fan out over it and check the sum to prove nothing was missed. A very large index coarsens to directories rather than dropping rows. For Python tests, the file and row id compose into a runnable pytest node id; elsewhere a row id addresses the symbol within its file, and the file is the unit a test runner takes.
The graph carries reference coupling: calls, inheritance, type references, and enum-variant reads, followed transitively. Coupling that travels through a shared literal rather than a reference produces no edge, which covers config and environment keys, feature-flag names, SQL and schema text, generated fixtures, and any contract a frontend restates as a string union. So a language listed in no_hits_in is unverified rather than unaffected, and a zero total is strong evidence rather than proof. Confirm those cases with grep_source.
Answers reflect the codebase's last analyzed commit. Uncommitted work is never included.
When to use
Before changing a symbol, to size the change and find the tests that cover it. Reach for it when the coupling is a real symbol-to-symbol reference, it runs more than one hop deep, and the count is too large to eyeball. mode='impact' is the case text search cannot reach, since everything it returns is two or more hops from the symbol you named, and mode='tests' maps a symbol to the tests that reach it through fixtures, repositories, and services, which is not reconstructible by searching text.
Example prompt
"What breaks if I change the signature of DriverValidationError?"