Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tools Reference

All tools are available when bobbin runs as an MCP server (bobbin serve). Each tool accepts JSON parameters and returns JSON results.

Search for code using natural language. Finds functions, classes, and other code elements that match the semantic meaning of your query.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringyesNatural language search query
typestringnoallFilter by chunk type: function, method, class, struct, enum, interface, module, impl, trait
limitintegerno10Maximum number of results
modestringnohybridSearch mode: hybrid, semantic, or keyword
repostringnoallFilter to a specific repository

Response fields: query, mode, count, results[] (each with file_path, name, chunk_type, start_line, end_line, score, match_type, language, content_preview)

grep

Search for code using exact keywords or regex patterns.

Parameters:

ParameterTypeRequiredDefaultDescription
patternstringyesPattern to search for
ignore_casebooleannofalseCase-insensitive search
regexbooleannofalseEnable regex matching (post-filters FTS results)
typestringnoallFilter by chunk type
limitintegerno10Maximum number of results
repostringnoallFilter to a specific repository

Response fields: pattern, count, results[] (each with file_path, name, chunk_type, start_line, end_line, score, language, content_preview, matching_lines[])

context

Assemble a comprehensive context bundle for a task. Combines semantic search results with temporally coupled files from git history.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringyesNatural language task description
budgetintegerno500Maximum lines of content
depthintegerno1Coupling expansion depth (0 = no coupling)
max_coupledintegerno3Max coupled files per seed file
limitintegerno20Max initial search results
coupling_thresholdfloatno0.1Minimum coupling score
repostringnoallFilter to a specific repository

Response fields: query, budget (max_lines, used_lines), files[] (each with path, language, relevance, score, coupled_to[], chunks[]), summary (total_files, total_chunks, direct_hits, coupled_additions)

Find files related to a given file based on git commit history (temporal coupling).

Parameters:

ParameterTypeRequiredDefaultDescription
filestringyesFile path relative to repo root
limitintegerno10Maximum number of results
thresholdfloatno0.0Minimum coupling score (0.0–1.0)

Response fields: file, related[] (each with path, score, co_changes)

find_refs

Find the definition and all usages of a symbol by name.

Parameters:

ParameterTypeRequiredDefaultDescription
symbolstringyesExact symbol name (e.g., parse_config)
typestringnoallFilter by symbol type
limitintegerno20Maximum number of usage results
repostringnoallFilter to a specific repository

Response fields: symbol, definition (name, chunk_type, file_path, start_line, end_line, signature), usage_count, usages[] (each with file_path, line, context)

list_symbols

List all symbols (functions, structs, traits, etc.) defined in a file.

Parameters:

ParameterTypeRequiredDefaultDescription
filestringyesFile path relative to repo root
repostringnoallFilter to a specific repository

Response fields: file, count, symbols[] (each with name, chunk_type, start_line, end_line, signature)

read_chunk

Read a specific section of code from a file by line range.

Parameters:

ParameterTypeRequiredDefaultDescription
filestringyesFile path relative to repo root
start_lineintegeryesStarting line number
end_lineintegeryesEnding line number
contextintegerno0Context lines to include before and after

Response fields: file, start_line, end_line, actual_start_line, actual_end_line, content, language

hotspots

Identify code hotspots — files with both high churn and high complexity.

Parameters:

ParameterTypeRequiredDefaultDescription
sincestringno1 year agoTime window (e.g., 6 months ago, 3 months ago)
limitintegerno20Maximum number of hotspots
thresholdfloatno0.0Minimum hotspot score (0.0–1.0)

Response fields: count, since, hotspots[] (each with file, score, churn, complexity, language)

prime

Get an LLM-friendly overview of the bobbin project with live index statistics.

Parameters:

ParameterTypeRequiredDefaultDescription
sectionstringnoallSpecific section: what bobbin does, architecture, supported languages, key commands, mcp tools, quick start, configuration
briefbooleannofalseCompact overview (title and first section only)

Response fields: primer (markdown text), section, initialized, stats (total_files, total_chunks, total_embeddings, languages[], last_indexed)

impact

Predict which files are affected by a change to a target file or function. Combines git co-change coupling and semantic similarity signals.

Parameters:

ParameterTypeRequiredDefaultDescription
targetstringyesFile path or file:symbol reference
depthintegerno1Transitive expansion depth (0–3)
modestringnocombinedSignal mode: combined, coupling, semantic, deps
thresholdfloatno0.1Minimum impact score
limitintegerno20Maximum number of results

review

Assemble review context from a git diff. Finds indexed chunks overlapping changed lines and expands via temporal coupling.

Parameters:

ParameterTypeRequiredDefaultDescription
diffstringnounstagedDiff spec: unstaged, staged, branch:<name>, commit:<range>
budgetintegerno500Maximum lines of context
depthintegerno1Coupling expansion depth

similar

Find code chunks semantically similar to a target, or scan for duplicate clusters.

Parameters:

ParameterTypeRequiredDefaultDescription
targetstringnoChunk reference (file.rs:function_name) or free text
scanbooleannofalseScan entire codebase for near-duplicate clusters
thresholdfloatno0.85Minimum similarity score
limitintegerno10Maximum results
cross_repobooleannofalseInclude cross-repo matches

search_beads

Search for beads (issues/tasks) using natural language. Requires beads to be indexed via bobbin index --include-beads.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringyesNatural language query
priorityintegernoallFilter by priority (1–4)
statusstringnoallFilter by status
assigneestringnoallFilter by assignee
limitintegerno10Maximum results
enrichbooleannotrueEnrich with live Dolt metadata

dependencies

Show import dependencies for a file. Returns forward and/or reverse dependencies.

Parameters:

ParameterTypeRequiredDefaultDescription
filestringyesFile path relative to repo root
reversebooleannofalseShow reverse dependencies (what imports this file)
bothbooleannofalseShow both forward and reverse
repostringnoallFilter to a specific repository

file_history

Show git commit history for a specific file, with author breakdown and churn rate.

Parameters:

ParameterTypeRequiredDefaultDescription
filestringyesFile path relative to repo root
limitintegerno20Maximum commits to return

status

Show current index status and statistics.

Parameters:

ParameterTypeRequiredDefaultDescription
languagesbooleannofalseInclude per-language breakdown

Search git commit history using natural language.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringyesNatural language query
authorstringnoallFilter by author
filestringnoallFilter by file path
limitintegerno10Maximum results

feedback_submit

Submit feedback on a bobbin context injection. Rate injections as useful, noise, or harmful.

Parameters:

ParameterTypeRequiredDefaultDescription
injection_idstringyesInjection ID from [injection_id: inj-xxx]
ratingstringyesuseful, noise, or harmful
agentstringnoautoAgent identity (auto-detected from env)
reasonstringnoExplanation (max 1000 chars)

feedback_list

List recent feedback records with optional filters.

Parameters:

ParameterTypeRequiredDefaultDescription
ratingstringnoallFilter by rating
agentstringnoallFilter by agent
limitintegerno20Maximum results (max 50)

feedback_stats

Get aggregated feedback statistics — total injections, coverage rate, rating breakdown, and lineage counts.

Parameters: None.

feedback_lineage_store

Record a lineage action that ties feedback to a concrete fix. Links feedback records to commits, beads, or config changes.

Parameters:

ParameterTypeRequiredDefaultDescription
feedback_idsinteger[]yesFeedback record IDs to link
action_typestringyescode_fix, config_change, tag_effect, access_rule, or exclusion_rule
beadstringnoAssociated bead ID
commit_hashstringnoGit commit hash
descriptionstringyesWhat was done
agentstringnoautoAgent identity

feedback_lineage_list

List lineage records showing how feedback was acted on.

Parameters:

ParameterTypeRequiredDefaultDescription
feedback_idintegernoallFilter by feedback ID
beadstringnoallFilter by bead ID
commit_hashstringnoallFilter by commit hash
limitintegerno20Maximum results (max 50)

Search archive records (HLA chat logs, Pensieve agent memory) using natural language.

Parameters:

ParameterTypeRequiredDefaultDescription
querystringyesNatural language query
sourcestringnoallFilter: hla or pensieve
filterstringnoallFilter by name/channel
afterstringnoOnly records after date (YYYY-MM-DD)
beforestringnoOnly records before date (YYYY-MM-DD)
limitintegerno10Maximum results
modestringnohybridhybrid, semantic, or keyword

archive_recent

List recent archive records by date.

Parameters:

ParameterTypeRequiredDefaultDescription
afterstringyesOnly records after date (YYYY-MM-DD)
sourcestringnoallFilter: hla or pensieve
limitintegerno20Maximum results