MCP tool reference
Every tool the pg.ddx.io MCP server offers, grouped by what you
are trying to do. Generated from the server's own tool list, so it matches what
tools/list returns.
Endpoint: https://pg.ddx.io/mcp (MCP Streamable HTTP, JSON-RPC
2.0). No key, no account. For how to connect a client and a good retrieval loop,
see the home page.
Conventions that apply to every tool
- Defaults. Omit
inboxand it ispgsql-hackers. Omitrepositoryand it ispostgres. An explicit value always wins. - Aliases.
repo,repositoryandrepo_nameare the same argument; so areinbox,listandinbox_name. - Cost. Search results carry an
excerptof each hit (the author's own words, quoted text removed), so you rarely need to open a hit to judge it.get_threadis paged; passinclude_bodies: falsefor an outline of the whole thread. - Errors. A tool that fails returns a result with
isError: trueand a message saying what to change. An unknown tool name is a JSON-RPC error.
109 tools.
Groups
- Mail: search and read (28)
- Git history (20)
- Docs, wiki and Discord (9)
- Code intelligence (20)
- Commitfest and cfbot (17)
- Buildfarm (8)
- Community and people (5)
- Sources and coverage (2)
Mail: search and read
hybrid_search
Combined keyword + semantic search using Reciprocal Rank Fusion (RRF). Merges BM25 full-text results with vector similarity results for better relevance. Requires embeddings to be generated. Each result carries an 'excerpt': the author's own words, quoted text and signatures removed.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query (supports both keywords and natural language) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
keyword_weight | number | optional | Weight for keyword results in fusion (0.0-1.0, default 0.5) |
limit | number | optional | Maximum results to return (1-50, default 20) |
semantic_search
Search messages by semantic similarity using vector embeddings. Returns messages most similar in meaning to the query text. Requires embeddings to be generated first (see embedding_status). Each result carries an 'excerpt': the author's own words, quoted text and signatures removed.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Natural language query to search for semantically similar messages |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum results to return (1-50, default 20) |
search
Full-text search across mailing list messages. Supports prefix syntax: s:subject f:from t:to d:2024-01..2025-01 b:body_text. Each result carries an 'excerpt': the author's own words, quoted text and signatures removed.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query string |
collapse_threads | boolean | optional | Deduplicate results to one per thread, keeping the highest-scoring hit (default false) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum results to return (1-200, default 50) |
offset | number | optional | Offset for pagination |
search-regex
Full-text search across mailing list messages using POSIX regex patterns. Supports edit-distance fuzzy matching via the `k` parameter (0 = exact regex, >=1 = up to k insertions/deletions/substitutions per match). Same prefix syntax as `search`: s:subject f:from t:to d:2024-01..2025-01 b:body_text
| argument | type | meaning | |
|---|---|---|---|
query | string | required | POSIX regex pattern |
collapse_threads | boolean | optional | Deduplicate results to one per thread (default false) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
k | number | optional | Edit distance for fuzzy match (0-5, default 0) |
limit | number | optional | Maximum results to return (1-200, default 50) |
offset | number | optional | Offset for pagination |
get_message
Get a message by Message-ID, including headers, body, and attachment metadata. Pass body_only=true to receive just the first text/plain MIME part as 'body' (headers, HTML alternatives, and base64 attachments stripped); use get_raw_message for the full RFC822 envelope.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID (with or without angle brackets) |
body_only | boolean | optional | Return only the first text/plain MIME part as 'body' instead of the full multipart MIME envelope (default false) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
include_body | boolean | optional | Include message body (default true) |
get_thread
Messages in a thread, found by any Message-ID in it. PAGED: returns up to 20 messages per call (limit, max 500) with has_more / next_offset; bodies are capped at 4000 characters each (max_body_chars; 0 = no cap, body_truncated marks a cut). Pass include_bodies=false for a cheap outline of the whole thread first, then fetch the messages you need with get_message.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID of any message in the thread |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
include_bodies | boolean | optional | Include message bodies (default true). false returns an outline: headers only. |
limit | number | optional | Messages per page (1-500, default 20). |
max_body_chars | number | optional | Cap each body at this many characters (default 4000; 0 = no cap). |
offset | number | optional | Skip this many messages; use next_offset from the previous page. |
get_raw_message
Get the complete raw RFC 822 email bytes for a message. Useful for agents that need to parse headers/structure themselves or forward messages.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID (with or without angle brackets) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
get_message_headers
Get email headers as structured key/value pairs. Returns all headers or a specific header by name.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID (with or without angle brackets) |
header | string | optional | Specific header name to retrieve (e.g. "X-Mailer"); omit to get all headers |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
get_message_references
Discover cross-references in a message. Returns explicit References/In-Reply-To headers plus any Message-IDs found in the body text, with archive lookup for each.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID (with or without angle brackets) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
get_thread_references
Cross-reference graph for an entire thread. Collects all Message-IDs referenced in body text across all messages in the thread and resolves which other threads they point to.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID of any message in the thread |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
get_attachment
Download the content of an attachment from a message. Identify the attachment by 1-based index or filename substring match. Text attachments are returned as text; binary attachments as base64.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID (with or without angle brackets) |
filename | string | optional | Substring to match against attachment filenames |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
index | number | optional | 1-based attachment index (from get_message attachment metadata) |
find_similar_messages
Find messages similar to a given message using its embedding vector. Useful for finding related discussions or duplicate threads.
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | Message-ID of the message to find similar messages for |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum results to return (1-50, default 10) |
history-of
One-shot historical context for CI: given content (a diff, file path, symbol, commit subject, or feature name), return the most relevant default-branch commits, the associated mailing-list discussion (message links), and the tracked people involved (community page links). Read-only; composes git history + list search.
| argument | type | meaning | |
|---|---|---|---|
content | string | required | Free text: a diff/hunk, file path(s), symbol name, commit subject, feature name, or error text. |
inbox | string | optional | Mailing list to search for discussion (default: pgsql-hackers). |
limit | number | optional | Max items per section (default 5). |
repo | string | optional | Tracked repo whose default branch to trace (default: postgres). |
browse_by_date
Browse threads within a specific date range. Useful for exploring what was discussed during a particular time period.
| argument | type | meaning | |
|---|---|---|---|
after | string | required | Start date (YYYY-MM-DD or YYYYMMDD) |
before | string | required | End date (YYYY-MM-DD or YYYYMMDD) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum threads to return (1-200, default 50) |
get_patch_series
Get patch submission history for a forge pull request URL. Returns all iterations submitted to the mailing list.
| argument | type | meaning | |
|---|---|---|---|
pr_url | string | required | Forge pull request URL |
get_patch_branches
Get the git branches created from a patch series. Shows what branches were applied from email patches for code intelligence analysis.
| argument | type | meaning | |
|---|---|---|---|
pr_url | string | required | Forge pull request URL |
get_author_messages
Find messages by a specific author, optionally filtered by date range. Uses the f: (from) search prefix.
| argument | type | meaning | |
|---|---|---|---|
author | string | required | Author name or email to search for |
after | string | optional | Only return messages after this date (YYYY-MM-DD or YYYYMMDD) |
before | string | optional | Only return messages before this date (YYYY-MM-DD or YYYYMMDD) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum results to return (1-200, default 50) |
offset | number | optional | Offset for pagination |
get_contributor_history
Show all past mailing list submissions by a contributor (matched by email address or name).
| argument | type | meaning | |
|---|---|---|---|
contributor | string | required | Contributor email address or display name |
limit | number | optional | Maximum results (1-100, default 50) |
search_patches
Find patch series by parsing [PATCH v2 3/7]-style subject prefixes. Returns structured patch metadata including version, sequence, total, and series grouping.
| argument | type | meaning | |
|---|---|---|---|
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum results to return (1-100, default 50) |
query | string | optional | Additional search query to filter patches |
list_threads
Browse recent threads (topic-level view). Returns thread summaries with message counts, date ranges, and latest message metadata.
| argument | type | meaning | |
|---|---|---|---|
before | number | optional | Unix timestamp; only return threads with last activity before this time (for pagination) |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum threads to return (1-100, default 20) |
list_recent
List recent messages from an inbox
| argument | type | meaning | |
|---|---|---|---|
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum messages to return (1-200, default 25) |
get_new_messages
Return messages newer than a given article number cursor, enabling agents to poll for new messages without re-scanning. Use after=0 for the first call, then use the returned last_article_num as the cursor for subsequent calls.
| argument | type | meaning | |
|---|---|---|---|
after | number | required | Article number cursor; returns messages with article numbers greater than this value. Use 0 for the first call. |
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
limit | number | optional | Maximum messages to return (1-1000, default 200) |
list_inboxes
List all configured agora mailboxes with name, message_count, latest_message_date, latest_import_date, listid (when known) and description. Optional min_messages filter; limit/offset are accepted for forward compatibility.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Forward-compat: max rows (default unlimited) |
min_messages | number | optional | Only return inboxes with at least this many messages |
offset | number | optional | Forward-compat: skip the first N rows |
get_inbox_info
Get metadata for an inbox (name, addresses, message count, last activity)
| argument | type | meaning | |
|---|---|---|---|
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
get_inbox_stats
Return aggregate statistics about an inbox: message counts by time period, top authors, and activity trends.
| argument | type | meaning | |
|---|---|---|---|
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
period | string | optional | Aggregation period: "day", "week", "month" (default), or "year" |
top_authors | number | optional | Number of top authors to return (1-50, default 10) |
get_inbox_summary
Per-inbox summary: total messages, top 10 posters, thread count, date range, and lifetime average messages/day (total messages divided by the days spanned by the archive).
| argument | type | meaning | |
|---|---|---|---|
name | string | required | Inbox name |
embedding_status
Get embedding coverage statistics: how many messages have embeddings, which model was used, and when embeddings were last generated.
| argument | type | meaning | |
|---|---|---|---|
inbox | string | optional | Mailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name. |
Git history
git_search
Search git commit messages or file paths by keyword (case-insensitive substring match).
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query string |
limit | number | optional | Maximum results to return (1-200, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
search_in | string | optional | What to search: "messages" (commit messages, default) or "paths" (file paths) |
commit_history
Cross-source historical overview of a git commit: the commit, the email discussion thread it links to (via its postgr.es/m/ Discussion link), the thread participants resolved to canonical people + organizations, the commitfest entry if tracked, and any Discord messages referencing it. Connects git → mailing list → commitfest → Discord → people knowledge graph for one change.
| argument | type | meaning | |
|---|---|---|---|
commit_id | string | required | The commit id (the agora ULID-style id from ag_git_commits, as returned by search/blame tools). |
discussion_links
Discussion / Closes / Fixes / Backpatch-through trailers attached to one commit. Returns the raw trailer text and any URL extracted.
| argument | type | meaning | |
|---|---|---|---|
commit_sha | string | required | ag_git_commits.id (commit SHA) |
git_log
Browse commit history with optional filters by branch, path, author, and date range. Returns commits in reverse chronological order.
| argument | type | meaning | |
|---|---|---|---|
author | string | optional | Filter by author name or email (substring match) |
branch | string | optional | Restrict the log to commits reachable from this branch (e.g. cf/5556). Default: the repository's default branch. |
limit | number | optional | Maximum commits to return (1-200, default 50) |
offset | number | optional | Offset for pagination (default 0) |
path | string | optional | Filter commits to those touching this file path |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
since | string | optional | Only commits after this date (YYYY-MM-DD or RFC3339) |
until | string | optional | Only commits before this date (YYYY-MM-DD or RFC3339) |
git_diff
Two modes: (1) commit-range mode — pass base_branch and head_branch to get the list of commits unique to head_branch (set difference base..head), optionally filtered by author/message/path; (2) content-diff mode — pass from_commit and to_commit to compute file-level unified diffs between two specific commits.
| argument | type | meaning | |
|---|---|---|---|
author | string | optional | Commit-range mode: filter by author name or email (substring match) |
base_branch | string | optional | Commit-range mode: base side of the range (excluded). Defaults to the repository's default branch when head_branch is set. |
from_commit | string | optional | Content-diff mode: base commit ID to diff from |
head_branch | string | optional | Commit-range mode: head side of the range (included). When set, switches to commit-range mode. |
limit | number | optional | Commit-range mode: maximum commits to return (1-1000, default 100) |
message_filter | string | optional | Commit-range mode: filter commits whose message matches this string (case-insensitive substring; passed to git log --grep) |
path | string | optional | Limit results to a specific file path |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
to_commit | string | optional | Content-diff mode: target commit ID to diff to (default: HEAD) |
git_blame
Show the modification history for a file: which commits changed it, with author and summary for each version.
| argument | type | meaning | |
|---|---|---|---|
path | string | required | File path within the repository |
commit | string | optional | Show history up to this commit (default: all) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
list_repositories
List all registered git repositories with name, branch, commit_count, file_count, indexed-symbol_count, latest_commit, last_fetched_at, and import_state. Optional min_commits and branch filters; limit/offset accepted for forward compatibility.
| argument | type | meaning | |
|---|---|---|---|
branch | string | optional | Filter to repositories whose default branch matches this string |
limit | number | optional | Forward-compat: max rows (default unlimited) |
min_commits | number | optional | Only return repositories with at least this many commits |
offset | number | optional | Forward-compat: skip the first N rows |
list_branches
List tracked branches for a repository, including head commit and default branch status.
| argument | type | meaning | |
|---|---|---|---|
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
repository_stats
Get detailed statistics for a git repository including commit count, file count, branch, and import state.
| argument | type | meaning | |
|---|---|---|---|
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_repository_summary
Per-repository summary: total commits, top 10 contributors, branches, language breakdown (from indexed symbols), and a sampled most-touched-paths list.
| argument | type | meaning | |
|---|---|---|---|
name | string | required | Repository name |
get_repo_sync_stats
Get commit frequency analysis and sync statistics for a repository. Returns median commit interval, recommended poll frequency, and recent fetch log.
| argument | type | meaning | |
|---|---|---|---|
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
check_upstream_status
Check whether a pull request has been merged upstream. Returns the latest patch series head commit and any merge information.
| argument | type | meaning | |
|---|---|---|---|
pr_url | string | required | Forge pull request URL |
list_projects
List bridge-configured projects linking a forge repository to a mailing list inbox.
No arguments.
git_show_file
Show the content of a file at a specific commit (or HEAD). Returns the file content as text, or indicates if binary.
| argument | type | meaning | |
|---|---|---|---|
path | string | required | File path within the repository |
commit | string | optional | Commit ID to show file at (default: HEAD) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_activity
Show commit activity over time, bucketed by period. Useful for understanding development pace and trends.
| argument | type | meaning | |
|---|---|---|---|
period | string | optional | Aggregation period: "week", "month" (default), "quarter", or "year" |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_authors
Get commit statistics per author: total commits, first and last commit dates. Ranked by commit count.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum authors to return (1-100, default 25) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_churn
Identify the most frequently modified files in the repository. High-churn files may indicate hotspots or unstable code.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum results to return (1-100, default 25) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_hotspots
Aggregate file churn by directory to find the most actively changed areas of the codebase.
| argument | type | meaning | |
|---|---|---|---|
depth | number | optional | Directory depth for aggregation (default 1) |
limit | number | optional | Maximum directories to return (1-100, default 25) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_coupling
Find files that are frequently changed together. Logical coupling can reveal hidden dependencies between components.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum pairs to return (1-100, default 25) |
min_count | number | optional | Minimum co-change count to include a pair (default 2) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
git_analyze_bus_factor
Identify files with the fewest distinct authors (bus factor risk). Files modified by only one person are knowledge silos.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum files to return (1-100, default 25) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
Docs, wiki and Discord
search_all_sources
Unified search across all document sources (docs, wiki, and email). Returns results ranked by relevance.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query (supports both keywords and natural language) |
limit | number | optional | Maximum results to return (1-50, default 20) |
search_docs
Full-text search across documentation pages. Returns matching pages ranked by relevance.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query string |
limit | number | optional | Maximum results to return (1-50, default 20) |
version | string | optional | Filter by documentation version (e.g., "current", "17", "16") |
get_doc_page
Get a specific documentation page by path and optional version.
| argument | type | meaning | |
|---|---|---|---|
path | string | required | URL path of the documentation page |
version | string | optional | Documentation version (default: latest available) |
list_doc_versions
List available documentation versions with page counts.
No arguments.
search_wiki
Full-text search across wiki pages. Returns matching pages with latest revision content.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query string |
limit | number | optional | Maximum results to return (1-50, default 20) |
get_wiki_page
Get a wiki page with its latest revision content.
| argument | type | meaning | |
|---|---|---|---|
title | string | required | Wiki page title |
get_wiki_history
Get revision history for a wiki page.
| argument | type | meaning | |
|---|---|---|---|
title | string | required | Wiki page title |
limit | number | optional | Maximum revisions to return (1-100, default 20) |
search_discord_topics
Find PostgreSQL Discord discussions semantically related to a query. Returns only the channel, approximate date range, and participants of relevant conversations — never message content or links (per the Discord community agreement).
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Natural language query to find semantically related Discord discussions |
limit | number | optional | Maximum results to return (1-25, default 10) |
list_discord_channels
List monitored Discord channels with message counts.
No arguments.
Code intelligence
search_symbols
Search code symbols by name, kind, or language. Uses multi-tier search: BM25 full-text, trigram fuzzy match, and body content search.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query (symbol name, partial name, or keyword) |
kind | string | optional | Filter by symbol kind: function, class, method, struct, enum, interface, trait, etc. |
language | string | optional | Filter by language: go, python, c, cpp, rust, java, typescript, javascript, etc. |
limit | number | optional | Maximum results (1-200, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
semantic_search_code
Search code symbols by semantic similarity using vector embeddings. Requires embeddings.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Natural language query |
limit | number | optional | Maximum results (1-50, default 20) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
hybrid_search_code
Combined keyword + semantic code search using Reciprocal Rank Fusion. Requires embeddings to be generated.
| argument | type | meaning | |
|---|---|---|---|
query | string | required | Search query (supports keywords and natural language) |
keyword_weight | number | optional | Weight for keyword results in fusion (0.0-1.0, default 0.5) |
limit | number | optional | Maximum results (1-100, default 20) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
find_pattern
Search for a regex pattern in code symbol bodies. Uses trigram indexes for acceleration.
| argument | type | meaning | |
|---|---|---|---|
pattern | string | required | Regular expression pattern |
limit | number | optional | Maximum results (1-100, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_symbol
Get full details for a code symbol by its qualified name, including source code, signature, documentation, and file location.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name (e.g. 'MyClass.myMethod', 'pkg::func_name') |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_signature
Get the function/method signature and doc comment for a symbol.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
blame_symbol
Show the commit history that modified a symbol's file, filtered to the symbol's line range.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
symbols_in_file
List all code symbols defined in a file, ordered by line number.
| argument | type | meaning | |
|---|---|---|---|
path | string | required | File path within the repository |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_callers
Find all symbols that call/reference the given symbol (reverse call graph).
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
limit | number | optional | Maximum results (1-100, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_callees
Find all symbols that the given symbol calls/references (forward call graph).
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
limit | number | optional | Maximum results (1-100, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_dependents
Get transitive dependents: all symbols in the blast radius if this symbol changes.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
limit | number | optional | Maximum results (1-200, default 50) |
max_depth | number | optional | Maximum BFS depth (1-5, default 3) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_impact
Analyze the impact of modifying a symbol: risk level, blast radius, affected communities and execution flows.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_tests_for
Find test symbols that reference the given symbol.
| argument | type | meaning | |
|---|---|---|---|
qualified_name | string | required | Fully qualified symbol name |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_execution_flows
Trace execution flow paths through the call graph from entry points.
| argument | type | meaning | |
|---|---|---|---|
max_depth | number | optional | Maximum BFS depth (1-10, default 8) |
max_flows | number | optional | Maximum flows to return (1-50, default 20) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
detect_changes
Detect which symbols changed between two commits by comparing file content hashes.
| argument | type | meaning | |
|---|---|---|---|
from_commit | string | required | Base commit ID |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
to_commit | string | optional | Target commit ID (default: HEAD) |
find_dead_code
Find functions/methods with zero incoming call graph edges (potentially unused code).
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum results (1-200, default 50) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
codebase_map
Get a directory-level overview of the codebase showing file counts and symbol counts per directory.
| argument | type | meaning | |
|---|---|---|---|
depth | number | optional | Directory depth for grouping (default 2) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_communities
List Louvain community clusters detected in the call graph. Communities group related symbols by functional area.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Maximum communities (1-100, default 20) |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
get_community
Get details and member symbols for a specific community.
| argument | type | meaning | |
|---|---|---|---|
community_id | number | required | Community ID |
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
code_index_status
Get code indexing statistics: files indexed, symbol counts by kind and language, edge count, community count.
| argument | type | meaning | |
|---|---|---|---|
repository | string | optional | Repository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name. |
Commitfest and cfbot
list_commitfests
List PostgreSQL commitfests indexed in the mentat triple store. Each commitfest carries a status (:open / :in-progress / :closed) and an entry count grouped by status.
| argument | type | meaning | |
|---|---|---|---|
status | string | optional | Filter by commitfest status: open, in-progress, or closed |
get_commitfest
Get a single commitfest with entries grouped by status and the top contributors (authors with the most entries).
| argument | type | meaning | |
|---|---|---|---|
number | number | required | Commitfest sequence number, e.g. 59 |
commitfest_stats
Overview of all indexed commitfests: count by status, top contributors (entries authored), distinct people / commitfests / entries totals.
No arguments.
list_entries
List commitfest entries (proposed patch series). Filterable by status, commitfest number, or topic; paginated.
| argument | type | meaning | |
|---|---|---|---|
commitfest_number | number | optional | Restrict to entries from this commitfest (e.g. 59) |
limit | number | optional | Max entries to return (1-500, default 100) |
offset | number | optional | Pagination offset (default 0) |
status | string | optional | Status keyword without leading colon, e.g. needs-review, ready-for-committer, waiting-on-author, committed, withdrawn, returned-with-feedback |
topic | string | optional | Restrict to entries with this :entry/topic value (substring match) |
get_entry
Full detail for a commitfest entry: title, status, authors, reviewers, committer, thread message-ids, branches, last-updated time.
| argument | type | meaning | |
|---|---|---|---|
cf_id | number | required | commitfest.postgresql.org entry id |
entry_branches
Repository branches tracked for a commitfest entry. Joins commitfest.entry_repos with ag_repositories so callers see repo name + branch_name + is_authoritative.
| argument | type | meaning | |
|---|---|---|---|
cf_id | number | required | commitfest.postgresql.org entry id |
build_status_freshness
Most recent :entry/last-build-at observation across all entries. Use to detect a stalled cfbot scraper.
No arguments.
entry_history
Status changes for a commitfest entry across commitfests. The relational table doesn't carry an audit log, so we approximate the patch's lifeline by joining on shared :entry/thread-message-id (precise) and falling back to title-prefix substring (weak).
| argument | type | meaning | |
|---|---|---|---|
cf_id | number | required | commitfest.postgresql.org entry id |
recent_commitfest_activity
Rolling window of commitfest entries updated in the last N days. Returns the entries plus a status histogram. Uses the relational commitfest.entries table for predictable latency.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Max entries (1-500, default 100) |
since | string | optional | RFC3339 cutoff (default: 7 days ago) |
find_entries_for_author
Find commitfest entries where the given person is an author. Looks up by email (exact) or by name (substring, case-sensitive).
| argument | type | meaning | |
|---|---|---|---|
email | string | optional | Exact :person/email |
limit | number | optional | Max entries to return (1-500, default 100) |
name | string | optional | :person/name substring (case-sensitive) |
find_entries_for_thread
Find commitfest entries linked to a pgsql-hackers thread by Message-ID. (Returns empty until the mailing-list cross-reference scrape lands; the index attribute :entry/thread-message-id is in the schema.)
| argument | type | meaning | |
|---|---|---|---|
message_id | string | required | RFC822 Message-ID, with or without angle brackets |
find_failing_patches
List commitfest entries whose latest cfbot.cputube.org build is failing on at least one platform. Filterable by entry status (defaults to active reviewable statuses) and platform.
| argument | type | meaning | |
|---|---|---|---|
entry_status | string | optional | Restrict to entries in this status (e.g. needs-review, ready-for-committer). Default: any active status. |
limit | number | optional | Max entries (1-500, default 100) |
platform | string | optional | Restrict to entries failing on this platform keyword (e.g. linux, macos, windows, freebsd, netbsd, openbsd). |
find_passing_long_pending
Green patches stuck in review: entries whose builds pass on every platform yet whose :entry/last-updated is older than N days. Useful for the 'why isn't this committed yet?' question.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Max entries (1-500, default 100) |
min_days | number | optional | Minimum days since last update (default 14) |
find_patches_by_platform_status
Patches that pass on some platforms but not others. Example: passing on linux but failing on macos -> portability bug.
| argument | type | meaning | |
|---|---|---|---|
failing_on | string | optional | Platform keyword the entry must be failing on (e.g. macos) |
limit | number | optional | Max entries (1-500, default 100) |
passing_on | string | optional | Platform keyword the entry must be passing on (e.g. linux) |
find_rebase_needed_patches
Entries cfbot reports as no longer applying to master tip (:entry/applies-cleanly is false). These need an author rebase.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Max entries (1-500, default 100) |
get_patch_build_history
Build matrix for one entry: per-platform/config status, log URL, observation time, applies-cleanly flag, rollup.
| argument | type | meaning | |
|---|---|---|---|
cf_id | number | required | commitfest.postgresql.org entry id |
find_entries_with_failures_on
Cross-domain feed: recent failed buildfarm runs for a named animal, plus commitfest entries with cfbot :failing rollups whose tracked branches overlap the animal's. Note: buildfarm runs commit SHAs and cfbot runs cf/<id> branches, so this verb correlates by branch overlap and time window — not by direct schema join.
| argument | type | meaning | |
|---|---|---|---|
animal_name | string | required | Buildfarm animal name (e.g. fairywren) |
limit | number | optional | Max recent failed runs (1-200, default 50) |
Buildfarm
buildfarm_overview
High-level buildfarm health: animal count, recent run counts, currently-failing animals, top owners, OS / branch breakdown, and freshness.
No arguments.
list_animals
List PostgreSQL buildfarm animals. Filterable by OS, branch tracked, last build status, or owner. Failing animals are returned first (sort key: last_status='failed' DESC, name ASC).
| argument | type | meaning | |
|---|---|---|---|
branch | string | optional | Restrict to animals tracking this PostgreSQL branch (e.g. master, REL_18_STABLE) |
limit | number | optional | Max animals (1-500, default 100) |
os | string | optional | Restrict to animals running this OS (exact match against ag_buildfarm_animals.os) |
owner | string | optional | Restrict to a single owner_name or owner_email (exact match) |
status | string | optional | Restrict to animals with this last_status: passed, failed, flapping, unknown |
get_animal
Profile of one buildfarm animal: hardware/OS/compiler/owner, branches tracked, last build status, plus the last 20 runs (any branch).
| argument | type | meaning | |
|---|---|---|---|
name | string | required | Animal name (e.g. elasmobranch, fairywren) |
animal_history
Run timeline for one animal. Filterable by branch and start cutoff; ordered newest first.
| argument | type | meaning | |
|---|---|---|---|
name | string | required | Animal name |
branch | string | optional | Restrict to a single PG branch |
limit | number | optional | Max runs (1-1000, default 100) |
since | string | optional | Only runs with started_at >= this RFC3339 timestamp |
animal_owner_contributions
Animals run by one owner: list, branches each tracks, last status, first_seen_at and elapsed days since first observation.
| argument | type | meaning | |
|---|---|---|---|
owner_email | string | optional | Owner email (exact) |
owner_name | string | optional | Owner name (exact) |
find_failing_runs
Most recent failing buildfarm runs across the entire fleet. Filterable by branch and start cutoff. Use to answer 'what is broken right now?'
| argument | type | meaning | |
|---|---|---|---|
branch | string | optional | Restrict to a single PG branch |
limit | number | optional | Max runs (1-1000, default 100) |
since | string | optional | Only runs with started_at >= this RFC3339 timestamp (default: 24h ago) |
find_breaks
Animals that failed on a branch within the time window bounded by two commit SHAs. The window is defined by the earliest started_at observed for either SHA on that branch — not by git topological order, since the buildfarm tables don't carry commit ordering.
| argument | type | meaning | |
|---|---|---|---|
branch | string | required | PG branch (e.g. master) |
end_sha | string | required | Later commit SHA (window upper bound) |
start_sha | string | required | Earlier commit SHA (window lower bound) |
commit_buildfarm_status
Per-animal status for one PostgreSQL commit: every animal that ran this commit, on which branch, with status and stage_failed. Returns a {passed,failed,flapping,unknown} rollup alongside.
| argument | type | meaning | |
|---|---|---|---|
commit_sha | string | required | Full commit SHA (40 hex) |
Community and people
get_contributor
Get a contributor's profile: canonical name, canonical email, all release-by-role counts, sample commits, owned buildfarm animals.
| argument | type | meaning | |
|---|---|---|---|
email | string | optional | Exact :person/canonical-email match |
name | string | optional | :person/canonical-name substring (case-insensitive). Used only when email is not provided. |
list_contributors
List PostgreSQL community contributors aggregated across git trailers (Reviewed-by, Tested-by, etc.), commit author/committer headers, and buildfarm animal owners. Sorted by total contributions descending. Filterable by release / role / source.
| argument | type | meaning | |
|---|---|---|---|
limit | number | optional | Max contributors to return (1-500, default 100) |
offset | number | optional | Pagination offset (default 0) |
release | string | optional | Restrict to one release tag, e.g. PG18 / PG17 / pre-9.6 |
role | string | optional | Restrict to one role: authored, reviewed, tested, reported, committed, co-authored, suggested, signed-off, buildfarm-owner, ... |
source | string | optional | Restrict to one source: git, buildfarm, email, wiki, commitfest |
release_contributors
Top contributors per role for one release. Scope: canonical authoritative repos only (ag_repositories.is_authoritative = TRUE). Returns top 20 per role across authored / reviewed / tested / reported / committed (per-role distinct-commit counts).
| argument | type | meaning | |
|---|---|---|---|
release | string | required | Release tag, e.g. PG18 / PG17 / pre-9.6 |
per_role_limit | number | optional | Top-N per role (1-100, default 20) |
contribution_summary
Summary of contribution counts per release: unique people, distinct commits, role breakdown (count(DISTINCT commit_sha) per role, canonical authoritative repos only), and revert-commit count. Powers the /community hero strip.
| argument | type | meaning | |
|---|---|---|---|
release | string | optional | Restrict to one release; empty = all releases. |
find_contributions
Find raw contribution rows for one person: git commit SHAs / buildfarm animals tagged with a role + release. Useful for drill-down on a contributor's recent work.
| argument | type | meaning | |
|---|---|---|---|
email | string | optional | Person's canonical email |
limit | number | optional | Max rows (1-500, default 50) |
name | string | optional | Person's name (substring; used when email is not given) |
release | string | optional | Restrict to one release |
role | string | optional | Restrict to one role |
Sources and coverage
list_sources
Enumerate every data source backing the MCP server (mailing-list inboxes, git repositories, doc sites, wiki, discord). Returns each source with its kind, item count, last-update timestamp, and freshness classification (fresh/stale). The universe is small (~50 inboxes, ~10 repos, a few docs/wiki sources); no pagination is required, but limit/offset are accepted for forward compatibility.
| argument | type | meaning | |
|---|---|---|---|
kind | string | optional | Filter to a single kind (inbox|repository|docs|wiki|discord) |
limit | number | optional | Forward-compat: max rows (default unlimited) |
min_items | number | optional | Only return sources with at least this many items |
offset | number | optional | Forward-compat: skip the first N rows |
get_source_info
Detail for a single source by name. Returns kind, item_count, last_update, next_sync, freshness_status, and description.
| argument | type | meaning | |
|---|---|---|---|
name | string | required | Source name (inbox name, repo name, source nick) |