pg.ddx.io MCP tools

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 and the how-to. The tools below are reached here with any MCP client; the JSON API is also described as plain HTTP tools in the UTCP manual at /utcp.

Conventions that apply to every tool

Mail: search and read (30) index

retrieve_context

START HERE for a question about PostgreSQL. Searches every mailing list (inbox narrows it) with hybrid keyword + semantic ranking and returns cited passages that fit token_budget (default 4000, max 32000): one passage per thread, each the author's own words (quotes, signature and patch removed, cut at ~1200 chars) with url, inbox, message_id, from and date. found=false with a reason when the archive does not appear to discuss the question, instead of weak matches. Retrieval only: write the answer yourself. Cite each claim with its passage url or https://postgr.es/m/<message_id>; open a thread with get_thread. author, since and until restrict it to what one person wrote in a date window (filter echoes them). The question may carry search operators (after:2020, site:<list>); operators, warnings and skipped report what they did. complete=false when the search ran out of budget_ms.

argumenttypemeaning
questionstringrequiredThe question, in plain language.
authorstringoptionalOnly messages this person sent: a name, an e-mail address or hash:<8 hex> (a person page). Resolved to every address they post from; an ambiguous name returns the candidates to choose from.
budget_msnumberoptionalTime budget in ms for the keyword search (100-15000; default 4500, the engine's own limits). complete=false in the reply when it ran out or a total is a lower bound.
inboxstringoptionalLists to search: omit (or "all") for every list, the default; one name such as pgsql-bugs; or several, comma-separated ("pgsql-hackers,pgsql-bugs"). Names from list_inboxes. Aliases: list, inbox_name.
sincestringoptionalOnly messages sent on or after this date (UTC): YYYY, YYYY-MM, YYYY-MM-DD, an ISO date-time, or 2w / 6m / 1y ago.
token_budgetnumberoptionalMaximum tokens of evidence to return (default 4000, max 32000).
untilstringoptionalOnly messages sent before this date (exclusive), same forms as since. With author: what that person had said by then.

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

argumenttypemeaning
querystringrequiredPOSIX regex pattern
collapse_threadsbooleanoptionalDeduplicate results to one per thread (default false)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
knumberoptionalEdit distance for fuzzy match (0-5, default 0)
limitnumberoptionalMaximum results to return (1-200, default 50)
offsetnumberoptionalOffset for pagination

get_message

One mail message by Message-ID: headers, in_reply_to/references, decoded body text (by default the author's own words: quoted replies and their attributions, forwarded or Outlook-quoted mail, inline patches, diffstats and the signature removed; full_text=true for everything, quotes included), attachments [{index, filename, content_type, size}] and has_patch. quotes checks citations: each comes back with own_words (in the author's own text, whitespace-normalized) and in_message (anywhere, quoted text included); with include_body=false only the verdicts return. Never raw MIME: get_attachment returns an attachment's content, get_raw_message the RFC 822 source. Finds the list itself unless inbox is given. Cite as https://postgr.es/m/<message_id>.

argumenttypemeaning
message_idstringrequiredMessage-ID (with or without angle brackets), or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
body_onlybooleanoptionalOlder spelling of full_text=true: the whole decoded text (default false).
full_textbooleanoptionalReturn the whole decoded text, quoted replies and signature included (default false: the author's own words only).
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
include_bodybooleanoptionalInclude message body (default true)
quotesarrayoptionalUp to 20 quotes to verify against this message: is each the author's own words (not text they quoted)? Under 12 characters is too_short.

get_thread

A mail thread, found by any Message-ID in it, oldest first. Each message: from, to, cc, date, message_id, decoded body text (by default the author's own words: quoted replies, signature and inline patch removed; full_text=true for the whole decoded text; never raw MIME), attachments [{index, filename, content_type, size}] and has_patch. Paged: 20 messages per call (limit max 500; offset/next_offset/has_more); bodies capped at max_body_chars (default 4000; 0 = no cap; body_truncated marks a cut). include_bodies=false gives a cheap outline. Finds the list itself unless inbox is given. Cite as https://postgr.es/m/<message_id>.

argumenttypemeaning
message_idstringrequiredMessage-ID of any message in the thread, or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
full_textbooleanoptionalWhole decoded text of each message, quotes included (default false: own words only).
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
include_bodiesbooleanoptionalInclude message bodies (default true). false returns an outline: headers only.
limitnumberoptionalMessages per page (1-500, default 20).
max_body_charsnumberoptionalCap each body at this many characters (default 4000; 0 = no cap).
offsetnumberoptionalSkip 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.

argumenttypemeaning
message_idstringrequiredMessage-ID (with or without angle brackets), or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
inboxstringoptionalMailing 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.

argumenttypemeaning
message_idstringrequiredMessage-ID (with or without angle brackets), or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
headerstringoptionalSpecific header name to retrieve (e.g. "X-Mailer"); omit to get all headers
inboxstringoptionalMailing 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.

argumenttypemeaning
message_idstringrequiredMessage-ID (with or without angle brackets), or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
inboxstringoptionalMailing 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.

argumenttypemeaning
message_idstringrequiredMessage-ID of any message in the thread, or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.

get_attachment

The content of one attachment of a mail message (a patch, a log, a test case), chosen by 1-based index or a filename substring, as listed in get_message/get_thread attachments. Text attachments come back as decoded text (a .patch is ready to read or `git apply`), binary ones as base64 with encoding=base64; size is the decoded byte count. Cite the message as https://postgr.es/m/<message_id>.

argumenttypemeaning
message_idstringrequiredMessage-ID (with or without angle brackets), or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
filenamestringoptionalSubstring to match against attachment filenames
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
indexnumberoptional1-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.

argumenttypemeaning
message_idstringrequiredMessage-ID of the message to find similar messages for, or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum 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.

argumenttypemeaning
contentstringrequiredFree text: a diff/hunk, file path(s), symbol name, commit subject, feature name, or error text.
inboxstringoptionalMailing list to search for discussion (default: pgsql-hackers).
limitnumberoptionalMax items per section (default 5).
repostringoptionalTracked 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.

argumenttypemeaning
afterstringrequiredStart date (YYYY-MM-DD or YYYYMMDD)
beforestringrequiredEnd date (YYYY-MM-DD or YYYYMMDD)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum 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.

argumenttypemeaning
pr_urlstringrequiredForge 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.

argumenttypemeaning
pr_urlstringrequiredForge pull request URL

get_author_messages

Find messages by a specific author, optionally filtered by date range. Uses the f: (from) search prefix.

argumenttypemeaning
authorstringrequiredAuthor name or email to search for
afterstringoptionalOnly return messages after this date (YYYY-MM-DD or YYYYMMDD)
beforestringoptionalOnly return messages before this date (YYYY-MM-DD or YYYYMMDD)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum results to return (1-200, default 50)
offsetnumberoptionalOffset for pagination

get_contributor_history

Show all past mailing list submissions by a contributor (matched by email address or name).

argumenttypemeaning
contributorstringrequiredContributor email address or display name
limitnumberoptionalMaximum 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. complete=false when it ran out of budget_ms.

argumenttypemeaning
budget_msnumberoptionalTime budget in ms (100-15000, default 10000). complete=false when it ran out.
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum results to return (1-100, default 50)
querystringoptionalAdditional 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.

argumenttypemeaning
beforenumberoptionalUnix timestamp; only return threads with last activity before this time (for pagination)
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum threads to return (1-100, default 20)

list_recent

List recent messages from an inbox

argumenttypemeaning
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum 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.

argumenttypemeaning
afternumberrequiredArticle number cursor; returns messages with article numbers greater than this value. Use 0 for the first call.
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
limitnumberoptionalMaximum 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.

argumenttypemeaning
limitnumberoptionalForward-compat: max rows (default unlimited)
min_messagesnumberoptionalOnly return inboxes with at least this many messages
offsetnumberoptionalForward-compat: skip the first N rows

get_inbox_info

Get metadata for an inbox (name, addresses, message count, last activity)

argumenttypemeaning
inboxstringoptionalMailing 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.

argumenttypemeaning
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.
periodstringoptionalAggregation period: "day", "week", "month" (default), or "year"
top_authorsnumberoptionalNumber 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).

argumenttypemeaning
namestringrequiredInbox name

embedding_status

Get embedding coverage statistics: how many messages have embeddings, which model was used, and when embeddings were last generated.

argumenttypemeaning
inboxstringoptionalMailing list name, e.g. pgsql-general. Defaults to pgsql-hackers when omitted. Aliases: list, inbox_name.

cross_reference

What relates to one stored item, and what happened to it. ref: a Message-ID or message URL, a commit SHA or URL, a docs URL or page.html, a wiki URL or title, a commitfest URL, CVE-YYYY-NNNNN, or feature:<words> (matched to commitfest titles and to the subjects of the postgres commits that introduce it; ref.entries_used and ref.commits_used say which; a name nothing matches gives empty results, not an error). Returns related threads, commits (with releases and reverted_by), docs, wiki pages, commitfest entries and people, each with why, strongest first: explicit links, shared identifiers, then similar topic. For a postgres commit, thread, entry or feature, timeline says which release shipped it and whether it was reverted or back-patched: status plus dated events (first post, commitfest listings, commits with branch and first release, reverts), each with its source url. kinds narrows; limit_per_kind (default 5, max 25). ~3 s budget: late parts go in timed_out. For feature:<words> and commitfest entries, graph lists the stored design-history features (status, the one release it shipped in, decisions, positions), each fact with confidence, source and evidence; "probably" below 0.8, facts below 0.5 left out. Same as GET /api/v2/related.

argumenttypemeaning
refstringrequiredThe item: e.g. 19705-548fda77321e062d@postgresql.org, https://www.postgresql.org/docs/current/brin.html, Don't Do This, b536d5a0bd7a, CVE-2024-10979, feature:incremental backup
kindsarrayoptionalResult kinds to return (default all)
limit_per_kindnumberoptionalItems per kind (1-25, default 5)
timelinebooleanoptionalInclude the timeline (default true)
versionstringoptionalDocs version for a page given without one (default current), e.g. 17

Git history (21) index

commit_history

Everything linked to one commit: subject, author and date with its sha, the mail thread its Discussion: link names (participants resolved to people and organizations), the commitfest entry if tracked, and Discord mentions. For postgres also first_releases (per branch the change landed on: branch, sha, release e.g. 14.23 or null when unreleased, first_version incl. betas, shipped=false when it was reverted before that release), reverted_by (the commits that revert it, each with its own reverted_by) and reverts, read from git tags and commit messages, never guessed. commit_id takes a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N or a commit_id from another tool; repository defaults to postgres. The diff itself is not included (git_diff, or git_show_file for one file). Cite the sha and the thread's https://postgr.es/m/<message_id>.

argumenttypemeaning
commit_idstringrequiredThe commit: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io).

git_log

Commit history like `git log`, newest first, filtered by path (commits touching a file), author (substring), since/until (YYYY-MM-DD or RFC 3339) and branch (any branch, tag or major version such as 17 or 9.6; default the indexed default branch). Each commit: sha (40-hex, cite it), commit_id, message (subject for a branch log), author and dates. limit default 50, max 200; offset pages; has_more. repository defaults to postgres.

argumenttypemeaning
authorstringoptionalFilter by author name or email (substring match)
branchstringoptionalRestrict the log to commits reachable from this branch (e.g. cf/5556). Default: the repository's default branch.
limitnumberoptionalMaximum commits to return (1-200, default 50)
offsetnumberoptionalOffset for pagination (default 0)
pathstringoptionalFilter commits to those touching this file path
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.
sincestringoptionalOnly commits after this date (YYYY-MM-DD or RFC3339)
untilstringoptionalOnly 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.

argumenttypemeaning
authorstringoptionalCommit-range mode: filter by author name or email (substring match)
base_branchstringoptionalCommit-range mode: base side of the range (excluded). Defaults to the repository's default branch when head_branch is set.
from_commitstringoptionalContent-diff mode: commit to diff from: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io).
head_branchstringoptionalCommit-range mode: head side of the range (included). When set, switches to commit-range mode.
limitnumberoptionalCommit-range mode: maximum commits to return (1-1000, default 100)
message_filterstringoptionalCommit-range mode: filter commits whose message matches this string (case-insensitive substring; passed to git log --grep)
pathstringoptionalLimit results to a specific file path
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.
to_commitstringoptionalContent-diff mode: commit to diff to: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io). Default HEAD.

git_blame

File version history, not a per-line blame: the commits that changed a file on the history of a commit (like `git log <rev> -- <path>`), newest first, each with sha, commit_id, author, date, summary and status (added/modified/deleted). Renames are not followed. Up to `limit` commits (default 100, max 1000); has_more says there are older ones.

argumenttypemeaning
pathstringrequiredFile path within the repository
commitstringoptionalList the commits on the history of this commit: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io). Default HEAD.
limitnumberoptionalMaximum commits to return (1-1000, default 100).
repositorystringoptionalRepository 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.

argumenttypemeaning
branchstringoptionalFilter to repositories whose default branch matches this string
limitnumberoptionalForward-compat: max rows (default unlimited)
min_commitsnumberoptionalOnly return repositories with at least this many commits
offsetnumberoptionalForward-compat: skip the first N rows

list_branches

List tracked branches for a repository, including head commit and default branch status.

argumenttypemeaning
repositorystringoptionalRepository 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.

argumenttypemeaning
repositorystringoptionalRepository 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.

argumenttypemeaning
namestringrequiredRepository 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.

argumenttypemeaning
repositorystringoptionalRepository 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.

argumenttypemeaning
pr_urlstringrequiredForge pull request URL

list_projects

List bridge-configured projects linking a forge repository to a mailing list inbox.

No arguments.

git_show_file

Read a file at any commit, branch, tag or major version (like `git show <rev>:<path>`), from the git clone. commit takes a SHA (>= 7 hex), branch, tag, 17 or 9.6, <ref>~N or a commit_id; default HEAD; an unknown name or path is an error, never a silent HEAD. Returns at most 2000 lines per call: start_line/end_line pick the range, total_lines gives the length and cut=true says more follow. Lines are numbered with a tab (numbered=false gives the exact bytes). Each result has sha (cite it with the path and lines) and ref. Binary files return a note instead of content.

argumenttypemeaning
pathstringrequiredFile path within the repository
commitstringoptionalCommit to read the file at: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io). Default HEAD. An unknown name is an error, never a silent HEAD.
end_linenumberoptionalLast line to return (1-based, inclusive). Default: the end of the file, capped at start_line + 1999.
numberedbooleanoptionalPrefix each line with its line number and a tab (default true). false returns the exact file bytes.
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.
start_linenumberoptionalFirst line to return (1-based). Default 1.

git_analyze_activity

Show commit activity over time, bucketed by period. Useful for understanding development pace and trends.

argumenttypemeaning
periodstringoptionalAggregation period: "week", "month" (default), "quarter", or "year"
repositorystringoptionalRepository 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.

argumenttypemeaning
limitnumberoptionalMaximum authors to return (1-100, default 25)
repositorystringoptionalRepository 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.

argumenttypemeaning
limitnumberoptionalMaximum results to return (1-100, default 25)
repositorystringoptionalRepository 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.

argumenttypemeaning
depthnumberoptionalDirectory depth for aggregation (default 1)
limitnumberoptionalMaximum directories to return (1-100, default 25)
repositorystringoptionalRepository 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.

argumenttypemeaning
limitnumberoptionalMaximum pairs to return (1-100, default 25)
min_countnumberoptionalMinimum co-change count to include a pair (default 2)
repositorystringoptionalRepository 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.

argumenttypemeaning
limitnumberoptionalMaximum files to return (1-100, default 25)
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

grep_repository

Literal-text search of the CURRENT source only (HEAD of master for postgres, the default branch elsewhere), like `git grep -F` (regex characters are escaped; case_insensitive=true for -i). Returns up to max_results files (default 50, max 500), each with repo_name, file_path, line_no and snippet (its first matching line). For any other commit, branch, tag, major version or date, for every match with context, or to search history, use code_search (version=, history=). Read a hit with read_file or git_show_file; cite path:line with the sha.

argumenttypemeaning
textstringrequiredLiteral substring to search for. Regex metachars are escaped before searching.
case_insensitivebooleanoptionalMatch case-insensitively (default false).
max_resultsnumberoptionalMax matches to return (1-500, default 50).
repositorystringoptionalRestrict results to this repository name.

Docs, wiki and Discord (9) index

search_all_sources

Unified search across all document sources (docs, wiki, and email). Returns results ranked by relevance. Search operators (site:, after:, before:, from:, link:, /regex/ ...) are applied per source; operators and warnings say what the query used, and skipped names each source the query left out and why. With define:<term> it also returns definition, the same card search_docs returns.

argumenttypemeaning
querystringrequiredSearch query (supports both keywords and natural language). Operators apply to every source they fit: after:/before:, site:docs|wiki|mail|commits, intitle:, from:, link:<url glob>, /regex/ (see GET /api/v2/links and the /search page's syntax help).
limitnumberoptionalMaximum results to return (1-50, default 20)

search_docs

Full-text search of the PostgreSQL documentation (websearch syntax: "phrase", -term, or), title matches first. Searches the current release unless version (one, e.g. "17") or versions (several) is given; a page matching in several selected versions is one result listing each version and its URL. Returns title, path, url, the versions it matched and a snippet. With define:<term> in query (define:MVCC, define:"write-ahead log", define:T611, define:LATERAL) it also returns definition: the PostgreSQL glossary entry, SQL standard feature or SQL key word for the term, as paragraphs of text segments whose links point at other terms, docs sections and features. Read a page with get_doc_page; cite its postgresql.org/docs url. Search operators apply (intitle:, inurl:, after:/before: pick the versions current then); operators, warnings and skipped report them.

argumenttypemeaning
querystringrequiredSearch query string
limitnumberoptionalMaximum results to return (1-50, default 20)
versionstringoptionalOne documentation version (e.g. "18", "17"; "current" = the current release). Ignored when versions is given.
versionsarrayoptionalDocumentation versions to search, e.g. ["18", "17"] (default: the current release; see list_doc_versions)

get_doc_page

One PostgreSQL documentation page as text: path (e.g. "brin.html" or "sql-createtable.html") and optional version ("17", "current"; default the latest). Returns its url, path and stored text (body) with fetched_at. Use search_docs to find the path. Cite the returned url.

argumenttypemeaning
pathstringrequiredURL path of the documentation page
versionstringoptionalDocumentation version (default: latest available)

list_doc_versions

List available documentation versions with page counts.

No arguments.

search_wiki

Full-text search (websearch syntax) of wiki.postgresql.org. By default searches each page's current text; history=true searches every revision and returns, per page, the latest matching revision (rev_id, revision_url, author, comment, timestamp, is_current) and how many matched; since/until bound the revision dates. Read a page with get_wiki_page; cite its wiki url. Search operators apply (intitle:, from:, after:/before:, link:, /regex/); operators, warnings and skipped report them.

argumenttypemeaning
querystringrequiredSearch query string
historybooleanoptionalSearch every revision, not only the current text (default false)
limitnumberoptionalMaximum results to return (1-50, default 20)
sincestringoptionalWith history: only revisions at or after this date (YYYY-MM-DD or ISO-8601)
untilstringoptionalWith history: only revisions before the end of this date (YYYY-MM-DD or ISO-8601)

get_wiki_page

One wiki.postgresql.org page by title: its latest revision content with author and date. Titles are as on the wiki ("Don't Do This", "Todo"). Use search_wiki to find a title, get_wiki_history for older revisions. Cite https://wiki.postgresql.org/wiki/<title>.

argumenttypemeaning
titlestringrequiredWiki page title

get_wiki_history

Get revision history for a wiki page.

argumenttypemeaning
titlestringrequiredWiki page title
limitnumberoptionalMaximum 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).

argumenttypemeaning
querystringrequiredNatural language query to find semantically related Discord discussions
limitnumberoptionalMaximum results to return (1-25, default 10)

list_discord_channels

List monitored Discord channels with message counts.

No arguments.

Code at any version (6) index

read_file

Read a file of the postgres source at any commit, branch, tag or date from the code-history index: numbered lines, at most 2000 per call (page with start_line/end_line), byte-exact to git. Says total_lines and complete; binary files return their metadata only.

argumenttypemeaning
pathstringrequiredPath from the repository root, e.g. src/backend/access/transam/xlog.c
end_linenumberoptionalLast line (default start_line + 1999)
repositorystringoptionalRepository; only postgres is in the code-history index for now (the default).
start_linenumberoptionalFirst line (default 1)
versionstringoptionalCommit to read: a SHA or 7+ hex prefix, a branch (master, REL_17_STABLE), a tag (REL_17_0), a major (17, 9.6), a release (17.2), <ref>@YYYY-MM-DD (the branch's last commit by that day), or <ref>~N. Default: the newest release branch's head.

list_files

List the files of the postgres source under a directory at any commit, branch, tag or date (code-history index), with line counts; depth folds deeper paths into directories with file counts; glob filters paths.

argumenttypemeaning
depthnumberoptionalLevels below path to list (default all)
globstringoptionalPath glob, e.g. *.dat or src/include/catalog/*.h
limitnumberoptionalEntries (1-5000, default 500)
pathstringoptionalDirectory (default the root)
repositorystringoptionalRepository; only postgres is in the code-history index for now (the default).
versionstringoptionalCommit to read: a SHA or 7+ hex prefix, a branch (master, REL_17_STABLE), a tag (REL_17_0), a major (17, 9.6), a release (17.2), <ref>@YYYY-MM-DD (the branch's last commit by that day), or <ref>~N. Default: the newest release branch's head.

blame

Per-line blame of a postgres file at any commit (code-history index): the commit that wrote each line, as `git blame` with git's default diff. ignore_revs (default true) passes through the pgindent/reformat commits of .git-blame-ignore-revs when they replaced lines one-for-one; reverse adds the commit that removed each line later on the version's branch. At most 2000 lines per call; commits lists author, date and subject per short sha. proposals=true adds, per line, the earliest posted patch (Message-ID, date) on its commit's threads that added it; proposals_complete=false when the window spans more than 10 commits (those with the most lines are read). Lines under 4 characters or without a letter or digit get none. Not the same as git_blame, which returns a file's commit history.

argumenttypemeaning
pathstringrequiredPath from the repository root
end_linenumberoptionalLast line (default start_line + 1999)
ignore_revsbooleanoptionalPass through .git-blame-ignore-revs commits (default true)
proposalsbooleanoptionalAlso name, per line, the earliest patch mail on its commit's Discussion threads that added it: proposals [{line, message_id, date, url}] (default false)
repositorystringoptionalRepository; only postgres is in the code-history index for now (the default).
reversebooleanoptionalAlso name the commit that later removed each line (default false)
start_linenumberoptionalFirst line (default 1)
versionstringoptionalCommit to read: a SHA or 7+ hex prefix, a branch (master, REL_17_STABLE), a tag (REL_17_0), a major (17, 9.6), a release (17.2), <ref>@YYYY-MM-DD (the branch's last commit by that day), or <ref>~N. Default: the newest release branch's head.

get_commit

One postgres commit from the code-history index: message, parsed trailers (names only), Discussion threads (links to the archived thread on /m/), back-patch siblings on other branches, first_releases (per branch the change landed on: sha, release such as 14.23, first_version incl. betas, shipped=false when reverted before that release; null release = not yet released), reverted_by and reverts, posted_patch (of the patch mails on its Discussion threads up to its commit date, the one whose changed lines match the commit's best: message_id, date, subject, from, score 0-1, url; null when none shares at least 0.2), files changed with line counts, and its diff rendered from the index (at most 3000 lines; diff_complete says whether it was cut). Accepts a SHA (7+ hex), branch, tag or any version form.

argumenttypemeaning
commitstringrequiredSHA or prefix (7+ hex), or any version form (REL_17_0, master~2), or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io)
contextnumberoptionalDiff context lines (0-1000, default 3)
diffbooleanoptionalInclude the diff (default true)
pathsarrayoptionalOnly diff files under these paths
repositorystringoptionalRepository; only postgres is in the code-history index for now (the default).

search_commits

Search postgres commits (code-history index), newest first, like git log: range (a rev, or A..B; default the newest release branch), message (regex, case-insensitive), author (regex over author, committer and Author/Co-authored-by/Reviewed-by trailers), paths, since/until (YYYY-MM-DD), changed_lines (a regex an added or removed line matches, as git log -G) and occurrences (a string whose count in a file changed, as git log -S). complete=false when changed_lines/occurrences matched more lines than it reads (300,000): commits may be missing.

argumenttypemeaning
authorstringoptionalRegex over author, committer and credit trailers
budget_msnumberoptionalTime budget (100-15000, default 10000)
changed_linesstringoptionalRegex an added or removed line matches (git log -G)
limitnumberoptionalCommits (1-200, default 30)
messagestringoptionalRegex over the commit message
occurrencesstringoptionalString whose number of occurrences changed (git log -S)
offsetnumberoptionalCommits to skip
pathsarrayoptionalPath prefixes the commit touched
rangestringoptionalA rev (its line back to the root) or A..B; default the newest release branch
repositorystringoptionalRepository; only postgres is in the code-history index for now (the default).
sincestringoptionalYYYY-MM-DD (committed on or after)
untilstringoptionalYYYY-MM-DD (committed before)

Code intelligence (22) index

search_symbols

Find C functions, macros, types and variables by name in the indexed source (HEAD): BM25 on names, then fuzzy and body matches. Filter by kind (function, struct, macro, ...), language, repository. Each result: qualified_name, name, kind, language, file, start_line and end_line. Like `ctags`/`git grep -w` for definitions. Follow with get_callers, or git_show_file with start_line/end_line to read the body.

argumenttypemeaning
querystringrequiredSearch query (symbol name, partial name, or keyword)
kindstringoptionalFilter by symbol kind: function, class, method, struct, enum, interface, trait, etc.
languagestringoptionalFilter by language: go, python, c, cpp, rust, java, typescript, javascript, etc.
limitnumberoptionalMaximum results (1-200, default 50)
repositorystringoptionalRepository name, e.g. pgbouncer, or several comma-separated (ucb-ingres-8.9,ucb-ingres-8.9-linux): each result then names its repository. Defaults to postgres when omitted. Aliases: repo, repo_name.

semantic_search_code

Search code symbols by semantic similarity using vector embeddings. Requires embeddings.

argumenttypemeaning
querystringrequiredNatural language query
limitnumberoptionalMaximum results (1-50, default 20)
repositorystringoptionalRepository 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.

argumenttypemeaning
querystringrequiredSearch query (supports keywords and natural language)
keyword_weightnumberoptionalWeight for keyword results in fusion (0.0-1.0, default 0.5)
limitnumberoptionalMaximum results (1-100, default 20)
repositorystringoptionalRepository 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.

argumenttypemeaning
patternstringrequiredRegular expression pattern
limitnumberoptionalMaximum results (1-100, default 50)
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

regex_search_code

Regular-expression search of the CURRENT source only (HEAD of master for postgres, the default branch elsewhere), like `git grep -E` with grep's line semantics: ^ and $ anchor at line starts and ends, . does not cross lines. PostgreSQL regex syntax (\s, \w, (?i) work). path_glob narrows by SQL LIKE pattern ("src/backend/%.c"), repository by name. Returns up to max_results files (default 50, max 500) with repo_name, file_path, line_no and snippet (its first matching line). For any other commit, branch, tag, major version or date, all matches with context, or history, use code_search with match=regex. Cite path:line with the sha.

argumenttypemeaning
patternstringrequiredPOSIX extended regex pattern, e.g. "^static\\s+void\\s+ProcSignal".
max_resultsnumberoptionalMax matches to return (1-500, default 50).
path_globstringoptionalRestrict results to paths matching this SQL LIKE pattern, e.g. "%/src/backend/%.c".
repositorystringoptionalRestrict results to this repository name (exact match against ag_repositories.name).

find_string_literals

Find occurrences of a literal in current (HEAD) source, restricted to a syntactic kind: "strings" (inside double quotes), "comments" (after // or /*), or "all".

argumenttypemeaning
literalstringrequiredLiteral text to find. Regex metachars are escaped.
kindstringoptionalOne of "all" (default), "strings", or "comments".
max_resultsnumberoptionalMax matches to return (1-500, default 50).
repositorystringoptionalRestrict results to this repository name.

get_symbol

Get full details for a code symbol by its qualified name, including source code, signature, documentation, and file location.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name (e.g. 'MyClass.myMethod', 'pkg::func_name')
repositorystringoptionalRepository 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.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
repositorystringoptionalRepository 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.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
repositorystringoptionalRepository 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.

argumenttypemeaning
pathstringrequiredFile path within the repository
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

get_callers

Reverse call graph: the symbols that call or reference qualified_name (from search_symbols), each with its file and lines, like `git grep -w <name>` restricted to call sites. HEAD only; macro expansion and function pointers are not followed. limit caps the list. Read a caller with git_show_file at its line.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
limitnumberoptionalMaximum results (1-100, default 50)
repositorystringoptionalRepository 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).

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
limitnumberoptionalMaximum results (1-100, default 50)
repositorystringoptionalRepository 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.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
limitnumberoptionalMaximum results (1-200, default 50)
max_depthnumberoptionalMaximum BFS depth (1-5, default 3)
repositorystringoptionalRepository 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.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

get_tests_for

Find test symbols that reference the given symbol.

argumenttypemeaning
qualified_namestringrequiredFully qualified symbol name
repositorystringoptionalRepository 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.

argumenttypemeaning
max_depthnumberoptionalMaximum BFS depth (1-10, default 8)
max_flowsnumberoptionalMaximum flows to return (1-50, default 20)
repositorystringoptionalRepository 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.

argumenttypemeaning
from_commitstringrequiredBase commit: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io).
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.
to_commitstringoptionalTarget commit: a SHA (>= 7 hex), branch, tag, major version (17, 9.6), <ref>~N, or a commit_id from another tool, or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io). Default HEAD.

find_dead_code

Find functions/methods with zero incoming call graph edges (potentially unused code).

argumenttypemeaning
limitnumberoptionalMaximum results (1-200, default 50)
repositorystringoptionalRepository 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.

argumenttypemeaning
depthnumberoptionalDirectory depth for grouping (default 2)
repositorystringoptionalRepository 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.

argumenttypemeaning
limitnumberoptionalMaximum communities (1-100, default 20)
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

get_community

Get details and member symbols for a specific community.

argumenttypemeaning
community_idnumberrequiredCommunity ID
repositorystringoptionalRepository 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.

argumenttypemeaning
repositorystringoptionalRepository name, e.g. pgbouncer. Defaults to postgres when omitted. Aliases: repo, repo_name.

Commitfest and cfbot (18) index

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.

argumenttypemeaning
statusstringoptionalFilter 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).

argumenttypemeaning
numbernumberrequiredCommitfest 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.

argumenttypemeaning
commitfest_numbernumberoptionalRestrict to entries from this commitfest (e.g. 59)
limitnumberoptionalMax entries to return (1-500, default 100)
offsetnumberoptionalPagination offset (default 0)
statusstringoptionalStatus keyword without leading colon, e.g. needs-review, ready-for-committer, waiting-on-author, committed, withdrawn, returned-with-feedback
topicstringoptionalRestrict to entries with this :entry/topic value (substring match)

get_entry

One commitfest entry by cf_id (the number in commitfest.postgresql.org/patch/<cf_id>/): title, status, commitfest, authors, reviewers, committer, its mail threads and branches. Read the thread with get_thread; cfbot state with find_failing_patches. Cite https://commitfest.postgresql.org/patch/<cf_id>/.

argumenttypemeaning
cf_idnumberrequiredcommitfest.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.

argumenttypemeaning
cf_idnumberrequiredcommitfest.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).

argumenttypemeaning
cf_idnumberrequiredcommitfest.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.

argumenttypemeaning
limitnumberoptionalMax entries (1-500, default 100)
sincestringoptionalRFC3339 cutoff (default: 7 days ago)

search_commitfest

Full-text search of commitfest entries (title first, then author/reviewer/committer names), in the current commitfest by default, or commitfests="all" (back to 2014) or a comma list of numbers. Websearch syntax: "phrase", -term, or. Each result: cf_id, title, status, commitfest(s), people, last update, the commitfest.postgresql.org patch url and the pg.ddx.io thread link. limit default 20, max 50. Details with get_entry; cite the patch url. Search operators apply (intitle:, from:, after:/before:, /regex/, commitfest:, release:); operators, warnings and skipped report them. Each result carries outlook: the commit model's estimate (p_cf, p_release, bands low/medium/high, health), or null.

argumenttypemeaning
querystringrequiredSearch query, e.g. NUMA or "Tom Lane". commitfest:this|next|<name> and release:this|next|PG20 keep entries the commit model estimates for that commitfest or release
commitfestsstringoptional"current" (default: the commitfest commitfest.postgresql.org/current/ shows), "all", or a comma list of commitfest numbers, e.g. "62,61" or "current,55"; see /api/v2/commitfest/commitfests
limitintegeroptionalMax results (default 20, max 50)
sortstringoptionalrelevance (default), likely or unlikely: by the commit model's P(commit) (the release's when the query has release:), entries without an estimate last

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).

argumenttypemeaning
emailstringoptionalExact :person/email
limitnumberoptionalMax entries to return (1-500, default 100)
namestringoptional: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.)

argumenttypemeaning
message_idstringrequiredRFC822 Message-ID, with or without angle brackets, or a message URL (postgr.es/m/..., postgresql.org/message-id/..., pg.ddx.io/m/...)

find_failing_patches

Commitfest entries whose latest cfbot build fails on at least one platform: cf_id, title, entry_status and commitfest_number. entry_status filters (default the active reviewable statuses, e.g. needs-review, ready-for-committer); platform narrows to one CI platform; limit caps the list. Cite https://commitfest.postgresql.org/patch/<cf_id>/.

argumenttypemeaning
entry_statusstringoptionalRestrict to entries in this status (e.g. needs-review, ready-for-committer). Default: any active status.
limitnumberoptionalMax entries (1-500, default 100)
platformstringoptionalRestrict 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.

argumenttypemeaning
limitnumberoptionalMax entries (1-500, default 100)
min_daysnumberoptionalMinimum 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.

argumenttypemeaning
failing_onstringoptionalPlatform keyword the entry must be failing on (e.g. macos)
limitnumberoptionalMax entries (1-500, default 100)
passing_onstringoptionalPlatform 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.

argumenttypemeaning
limitnumberoptionalMax 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.

argumenttypemeaning
cf_idnumberrequiredcommitfest.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.

argumenttypemeaning
animal_namestringrequiredBuildfarm animal name (e.g. fairywren)
limitnumberoptionalMax recent failed runs (1-200, default 50)

Buildfarm (8) index

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).

argumenttypemeaning
branchstringoptionalRestrict to animals tracking this PostgreSQL branch (e.g. master, REL_18_STABLE)
limitnumberoptionalMax animals (1-500, default 100)
osstringoptionalRestrict to animals running this OS (exact match against ag_buildfarm_animals.os)
ownerstringoptionalRestrict to a single owner_name or owner_email (exact match)
statusstringoptionalRestrict 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).

argumenttypemeaning
namestringrequiredAnimal name (e.g. elasmobranch, fairywren)

animal_history

Run timeline for one animal. Filterable by branch and start cutoff; ordered newest first.

argumenttypemeaning
namestringrequiredAnimal name
branchstringoptionalRestrict to a single PG branch
limitnumberoptionalMax runs (1-1000, default 100)
sincestringoptionalOnly 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.

argumenttypemeaning
owner_emailstringoptionalOwner email (exact)
owner_namestringoptionalOwner 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?'

argumenttypemeaning
branchstringoptionalRestrict to a single PG branch
limitnumberoptionalMax runs (1-1000, default 100)
sincestringoptionalOnly 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.

argumenttypemeaning
branchstringrequiredPG branch (e.g. master)
end_shastringrequiredLater commit SHA (window upper bound), or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io)
start_shastringrequiredEarlier commit SHA (window lower bound), or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io)

commit_buildfarm_status

Buildfarm results for one PostgreSQL commit: every animal that built it, with branch, status (passed/failed/flapping), the failing stage and the log url, plus a {passed, failed, flapping, unknown} rollup. commit_sha is a SHA (>= 7 hex) or a branch, tag or major version (17, 9.6) for the commit it points at. Cite the commit SHA and the log urls.

argumenttypemeaning
commit_shastringrequiredA commit SHA (>= 7 hex), or a commit URL (gitweb, git.postgresql.org, GitHub, pg.ddx.io), or a branch, tag or major version (17, 9.6) for the commit it points at

Community and people (6) index

get_contributor

A contributor's profile by email (exact) or name (substring): canonical name, page hash, totals and per-release counts by role (authored, reviewed, committed, reported, ...), the 5 latest credited commits (commit_sha = the git SHA, roles = every role they had in it), and buildfarm animals they own. People who hid their page are excluded from name lookups. For what they did recently use whats_new. Cite https://pg.ddx.io/community/<hash>.

argumenttypemeaning
emailstringoptionalExact :person/canonical-email match
namestringoptional: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.

argumenttypemeaning
limitnumberoptionalMax contributors to return (1-500, default 100)
offsetnumberoptionalPagination offset (default 0)
releasestringoptionalRestrict to one release, e.g. PG18 / PG17 / pre-9.6; 17, pg17, REL_17 and REL_17_STABLE mean PG17
rolestringoptionalRestrict to one role: authored, reviewed, tested, reported, committed, co-authored, suggested, signed-off, buildfarm-owner, ...
sourcestringoptionalRestrict 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).

argumenttypemeaning
releasestringrequiredRelease, e.g. PG18 / PG17 / pre-9.6; 17, pg17, REL_17 and REL_17_STABLE mean PG17
per_role_limitnumberoptionalTop-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.

argumenttypemeaning
releasestringoptionalRestrict to one release (PG17; 17, pg17, REL_17 also work); 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.

argumenttypemeaning
emailstringoptionalPerson's canonical email
limitnumberoptionalMax rows (1-500, default 50)
namestringoptionalPerson's name (substring; used when email is not given)
releasestringoptionalRestrict to one release (PG17; 17, pg17, REL_17 also work)
rolestringoptionalRestrict to one role

whats_new

Catch up: everything a person or group did, and where they were named, in a window, newest first per kind (mail grouped by thread). who: a name (fuzzy; close matches return ambiguous [{name, hash}]), email, hash:<8 hex>, team:<slug>, org:<name>, new:<window>, a phrase ('the core team'), or a list. since/until: ISO date, today, 2w/14d/1m, pg19 (a release's development window), all; default 14 days. during: a calendar event uid/url. topic narrows by hybrid search. Kinds: waiting (one person, no topic: what is on their radar, each with its rule (reply_to_you > called_out > to_cc > named, then commitfest and cfbot rules, then code_changed: open patches changing files they wrote much of on master in threads they have not posted in, group code_changes, with files and their share, score, proposer, patch_url; called_out items carry call_out {evidence, excerpt, confidence, url} quoting the message that asked them to take part), group, priority 0-100 and why, and an outlook (a model's estimate: unit commitfest = P(commit) for the CF and release and thread health, when its thread is in an open commitfest; unit thread = p_commit, P(a commit from a patch thread in no commitfest within horizon_days); people to seek out, factors, model_version)), acted (one person, no topic: what they did about what waited on them: answered, sent_patch, committed, with what asked them and when; an item leaves waiting when they act and shows here), mail_from, mail_to_cc, mail_mention, git_author, git_credit, git_mention, wiki_edit, wiki_mention, commitfest, calendar, roster. Names, page hashes and urls only, never addresses. ~4 s budget; late kinds go in timed_out with partial=true. Cite each item's url. Same as GET /api/v2/activity.

argumenttypemeaning
whorequiredWho: 'Tom Lane', 'team:core-team', 'org:Amazon/AWS', 'new:30d', a 8-hex person hash, an email; a string or a list of strings
duringstringoptionalA calendar event uid or url, or pg19: sets since and until to its dates
kindsarrayoptionalResult kinds to return (default all)
limitnumberoptionalItems per kind (1-100, default 20)
sincestringoptionalWindow start: 2026-10-01, 2w, 14d, 1m, today, pg19, all (default 14 days ago)
topicstringoptionalOptional topic that narrows every kind, e.g. NUMA, benchmarking
untilstringoptionalWindow end: now (default), today 08:00, 2026-10-21T08:00, pg19

Events and calendars (3) index

upcoming_events

PostgreSQL community events in a date window: conferences, PGDays, meetups, online events, Call for Papers and registration deadlines, conference talks (with speakers and their pg.ddx.io person hash), Talking Postgres episodes, release dates and commitfests. Same data as the iCalendar feeds at https://pg.ddx.io/calendars (community event listings from the PostgreSQL Event Calendar, curated by Andreas Scherbaum).

argumenttypemeaning
daysintegeroptionalLook-ahead window in days (default 90, max 730)
fromstringoptionalStart date YYYY-MM-DD (default today)
kindstringoptionalevent, cfp, deadline, session (a conference talk), release, or signal
limitintegeroptionalMax rows (default 50, max 500)
offsetintegeroptionalPagination offset
personstringoptionalpg.ddx.io person hash (8 hex): only their talks/appearances
seriesstringoptionalSeries slug, e.g. pgconf-eu, pgconf-dev, posette, talking-postgres
speakerstringoptionalSubstring of a speaker's name
tostringoptionalEnd date YYYY-MM-DD (default from + days)
wherestringoptionalCountry (ISO code or name, e.g. 'de', 'Germany'), region slug (europe, north-america, south-america, asia-pacific, middle-east-africa), a series slug (pgconf-eu, talking-postgres, ...), or 'online'

calendar_feeds

List every pg.ddx.io calendar feed (iCalendar URLs) with event counts: all events, regions, countries, conference series, the PostgreSQL release cycle, teams and organisations.

No arguments.

combine_calendars

Combine several pg.ddx.io calendar feeds into ONE subscription. Give feed paths or URLs as listed by calendar_feeds (e.g. events/region/europe, series/pgconf-eu, teams/committers, people/<8hex>, https://pg.ddx.io/cal/orgs/edb.ics; 1-200). Returns the combined feed's hash, canonical feed list, https url and webcal url. The same selection always yields the same URL.

argumenttypemeaning
feedsarrayrequiredFeed paths or /cal/ URLs to combine
excludesarrayoptionalFeeds whose events are removed from the combination (but not), e.g. events/country/rs or teams/security-team

Sources and coverage (3) index

get_ontology

What this server knows and which tool reads it: every kind of fact (person, membership, roster, commitfest entry, feature, decision, position, ...) with its attributes, value types, cardinality, docs and counts, and which kinds refer to which; the design-history graph's relations (thread DISCUSSES feature, decision DECIDES feature, person HOLDS position ABOUT feature, ...), sources (git, commitfest, rule, operator, model) and confidence rules (shown at 0.8 and above, "probably" from 0.5, hidden below; models capped at 0.9); the tables the tools read; and what is loaded (commits, tags, entries). Call it first to learn what can be asked. No arguments. Same as GET /api/v2/ontology.

No arguments.

list_sources

Every source behind this server with its kind (inbox, repository, docs, wiki, discord), item count, last update and freshness (fresh/stale): the 56 mailing lists, the git repositories, the documentation releases, the wiki and Discord. Use it to learn the inbox and repository names other tools accept and how current each is. kind filters; min_items drops small sources.

argumenttypemeaning
kindstringoptionalFilter to a single kind (inbox|repository|docs|wiki|discord)
limitnumberoptionalForward-compat: max rows (default unlimited)
min_itemsnumberoptionalOnly return sources with at least this many items
offsetnumberoptionalForward-compat: skip the first N rows

get_source_info

Detail for a single source by name, the same row list_sources returns. Returns kind, item_count, last_update, next_sync, freshness_status, and description; for a postgresql.org list also poll: the list poller's p_new (probability of mail we lack since its last poll), due, next_poll, factors and the last poll's outcome.

argumenttypemeaning
namestringrequiredA name list_sources returns: an inbox (pgsql-hackers), a repository (postgres), pg-docs, pg-wiki, pg-discord or legacy. A kind with one source (wiki, docs, discord) names that source.
kindstringoptionalOnly this kind (inbox, repository, docs, wiki, discord, legacy): a name two kinds share (psqlodbc is an inbox and a repository) otherwise answers the inbox.