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
DefaultAlways17
SetupUntil setup is done4
Work queueWith pensieve mcp --all-tools or ?tools=all2
SettingsWith pensieve mcp --all-tools or ?tools=all15

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,todo,loose_ends, query, limit = 10Your threads of the last 30 days 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 (open, todo, thoughts, loose_ends, closed, forgotten), or all. query takes words, a ticket key, a branch or a PR number.
threadid, full = falseOne thread whole: its state and why, folder, branch, uncommitted files, PRs, tickets, the sessions of the same work, the steps left, where its session stopped, its main files and the command that resumes it. id is a thread id (th_…) from threads or cluster. full adds every file and the timeline.
clusterbranchThe threads of one branch, newest first: what each session did on the branch, its share of the branch's lines, and each thread's state. It also gives two lists of steps, each with who can do each step. Ship it: commit, push, open and merge the PR, close the ticket. Discard it: drop the changes, close the PR, delete the branch, cancel the ticket.
thread_pageid or branchSaves the page of one thread, or of every thread of one branch, as one HTML file in ~/Downloads. The page also holds the threads as JSON, so an agent can read it as data. Returns the path of the file and the thread ids. Pensieve does not send the file. You approve what your agent sends.
start_todoid, repoStarts a to-do: makes a worktree from the default branch of the repo, on a branch named from the ticket key. Returns the path, the branch and the prompt for the agent. With no repo, Pensieve uses the repo that it keeps for the ticket's project. If it has none, it returns the repos to choose from.
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 two modes, 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. The last question is whether you track work in Jira, Linear or Asana: the sign-in is in the app, in Settings → Sources → Cloud connectors.
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, content, mode = session | developerFinishes setup. session is Threads mode: the agent sources only, with no index and no model. developer also indexes the repos and files. With no mode, it is developer when you chose a repo. In Developer mode, indexing starts at once. Returns the time left, the energy note and how to search.

Work queue tools

Pensieve runs no text model of its own by default. With these two tools, an agent answers Pensieve's text jobs. They are only in the ?tools=all set. In Settings → Models → Summaries and insights, you can choose an engine that answers the jobs in the background: the built-in model, a command-line agent or a model server that you run.

ToolArgumentsReturns
pending_worklimit = 5, kindJobs that wait for an answer: session summaries, topic names, insights, team summaries 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_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 you can on the Threads tab: open, todo, loose_ends, closed, forgotten, or auto. thoughts is always automatic. An agent does not need it to close a thread: Pensieve sets each state from the evidence. Use it only when you ask for it.

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.