Pensieve Docs
Docs menu

Docs

MCP tools reference

This page lists each tool of the Pensieve MCP server, its arguments and what it returns.

An MCP client sends the description of each tool to the model on every turn. Thus Pensieve shows a small set by default. Other sets appear only when they are necessary. Every tool obeys the scope of the connection.

SetWhen the agent sees itTools
DefaultAlways15
SetupUntil setup is done4
Work queueWith pensieve mcp --all-tools or ?tools=all2
SettingsWith pensieve mcp --all-tools or ?tools=all16

Default tools

ToolArgumentsReturns
searchquery, limit = 8, kindOne line per hit, best first: path:line, the enclosing definition, the line that matched, and an id for read and similar. The top hits also show a few numbered lines. Query syntax: "exact", -word, ext:py, in:<path>, by:<person>, kind:code|doc|session|folder|repo|person, since:3d, until:2026-10-01, project:<name> (sessions).
readid (one id, or up to 8 ids separated by spaces), max_chars = 12000The full text of a result. For code, also the repo, branch, lines, owners from git blame, recent commits and the agent sessions that touched it.
similarid, limit = 8Items that are similar in meaning to a result, in the same line format as search. Use it before you write new code.
peopletopic, repo, nameWith name: one person, with their role, repos, recent PRs and how you work with them. With topic: who wrote the code most related to the topic (git blame), and the matching code. With only repo: the people of the repo, with their commits, main areas and recent commit subjects.
reporepo (default: the repo of the scope), part = overview | gaps | unexploredoverview: where things are in a repo. That is the size, languages, top folders two levels deep, the start of the README, dependencies, the largest files, and topics with their files and authors. gaps (with inactive_days = 180): areas mostly written by people with no recent commit, the active person who knows each one best (ask) and the bus factor. unexplored: areas next to your own work that your agent sessions did not touch, and who owns them.
projectsquery, limit = 8, projectYour projects: tickets with their branches and PRs, grouped into projects, with the people who work on them.
list_reposnoneThe indexed repos in the scope, with their size and the number of agent sessions in each.
current_scopenoneThe part of the index that this connection searches.
openid, action = open | reveal | visualizeOpens an item on your computer: code in your editor at the line, the item in Finder, or the item on the Map.
index_pathpathIndexes a folder when you ask the agent to: a git repo, a folder of repos, a folder of agent sessions, or documents. Pensieve finds out which kind it is.
staledays = 14What looks abandoned: worktrees with no commit and no session, merged local branches, and repos with no activity for 3 months. Each item has a verdict and, where it is safe, a command. The agent asks you before it runs a command.
threadsstate = open,loose_ends, query, limit = 10Your threads that are not done, the closest to done first: the fewest steps left. Each thread shows its steps left. Each step says who can do it (you, your agent or the tracker) and the PR, branch or ticket that it acts on. state takes a list of states, or all. query takes words, a ticket key, a branch or a PR number.
threadid, full = false, versionOne thread now: its state and why, folder, branch, uncommitted files, PRs, tickets, what changed since the last session, the steps left, where that session stopped, its main files and the command that resumes it. id is a thread id (th_…) or an id from threads. full adds every file and the timeline. version = n gives that saved version (0 is the first, -1 the last). version = list lists the saved versions.
share_threadid, askMakes a thread that is fit to send and saves it as one HTML page in ~/Downloads. Returns the path of the file and the thread. The agent attaches the file. You approve what it sends.
report_feedbackkind = bug | idea, summary, detailsSaves a report on your computer. You read it in Settings → Feedback before you send it.

What a search returns

The result is short on purpose. The agent reads it again on every later turn. A result looks like this:

src/billing/retry.py:42  def schedule_retry(invoice)  ▸ if decline.hard: return None  [code:1832]
    41│ def schedule_retry(invoice):
    42│     if decline.hard: return None
docs/payments.md  Card retries stop after a hard decline …  [file:77]
session "fix card retries" (2026-10-12)  … we skip the queue for hard declines …  [session:4f1c…]

Pensieve adds a note to some hits:

To see what an agent gets, run the same search from a terminal in the repo:

pensieve search "retry failed webhook delivery" --kind code

Setup tools

Until you finish setup, Pensieve indexes nothing. Every connection then also gets these tools, so the agent that installed Pensieve can do setup with you in its chat.

ToolArgumentsReturns
setup_guidenoneWhat Pensieve is, the user profiles, the source categories and the folders that each scan reads, the search models and the energy note. It reads no folder. The agent then asks you each question in order.
setup_scanprofiles or categoriesWhat can be indexed in those categories, with the size of each item and the recommended items. macOS can ask you for folder access.
setup_add_sourcekind = files | repos | agents, pathThe id of a source that the scan did not find.
setup_startsources or recommended, contentStarts indexing. Returns the time left, the energy note and how to search.

Work queue tools

A command-line agent, the built-in model or a model server that you run answers the text jobs in the background (Settings → Models → Notes and summaries). These two tools are only in the ?tools=all set: with them, an agent can answer the same jobs by hand.

ToolArgumentsReturns
pending_worklimit = 5, kindJobs that wait for an answer: thread notes, session summaries, topic names, insights and collection plans. Each job holds its instructions and its data.
submit_workid, answerSaves the answer to one job. Pensieve uses it in its next pass.

Settings tools

These tools change Pensieve itself. An agent gets them only with pensieve mcp --all-tools, or with ?tools=all over HTTP.

ToolArgumentsReturns
show_searchqueryOpens the search panel with the query.
show_visualizerviewOpens the Map window.
statusnoneThe size of the index and whether indexing runs now.
list_scopesnoneThe named scopes and the current scope.
save_scopename, sources, descriptionMakes or replaces a named scope.
delete_scopenameRemoves a named scope.
get_settingsnoneThe settings, with a description of each.
update_settingschangesChanges settings, for example {"editor": "cursor"}.
list_sourcesnoneThe sources by category, with their on and off state and item counts.
set_sourceid, enabled, mapSwitches a category or one item on or off, or on or off the Map.
file_typesnoneFor each file type: whether Pensieve reads its content, whether it shows on the Map, and how many files it has.
add_folderpathIndexes another folder.
remove_folderpathStops indexing a folder.
reindexnoneScans folders and repos now.
usage_statsdays = 7Pensieve's own MCP calls: for each tool, the number of calls, errors and the p50 and p95 time.
set_thread_stateid, state, reasonSets a thread's state by hand, as the button on the thread does: todo, open, loose_ends, complete, forgotten, or auto. An agent does not need it to close a thread: Pensieve sets each state from the evidence.

Errors

A bad argument, an unknown id or an item outside the scope comes back to the agent as a readable error. Pensieve logs each call on your computer, in usage.db. Settings → Usage shows the log.

Something wrong or missing? Tell us on GitHub.