On this page
#MCP Integration
Parley exposes an MCP-compatible JSON-RPC interface over stdio.
#Transport
- Supports both
Content-Lengthframed and newline-delimited JSON-RPC messages. - Implements
initialize,tools/list,tools/call,resources/list, andresources/read. - Advertises embedded documentation through MCP resources with
parley://docs/{slug}URIs.
#Typical tools
list_reviewsget_reviewlist_open_commentsadd_replymark_comment_addressedmark_comment_openset_review_staterun_ai_sessionget_documentation
#Embedded documentation
Agents can discover Parley's built-in markdown docs through resources/list and read any page with resources/read.
Available resource URIs:
parley://docs/keybindingsparley://docs/overviewparley://docs/quickstartparley://docs/review-workflowparley://docs/mcp
Agents that prefer tools can call get_documentation.
Inputs:
doc: optional doc slug, title, source path, or URI. If omitted, the tool returns the available docs list.
#run_ai_session behavior
Inputs:
provider:codex|claude|opencode|pimode:reply|refactor(optional; defaults by API call site)comment_ids: optional explicit thread IDs
Global gate:
- review-wide AI selects threads by thread status; explicit comment IDs target those comments directly
Target filtering:
mode=refactor:- auto-target (
comment_idsomitted): onlyopenandpendingthreads - explicit
comment_ids: still onlyopenandpendingthreads are processed
- auto-target (
mode=reply:- auto-target (
comment_idsomitted):openandpending - explicit
comment_ids: status filter is bypassed for selection, soaddressedcan be processed
- auto-target (
After processing:
- AI response is added as a thread reply
- thread status typically becomes
pending(different-author reply path)
#Example calls
Reply mode over all eligible threads:
{
"name": "run_ai_session",
"arguments": {
"review_name": "my-review",
"provider": "codex",
"mode": "reply"
}
}
Refactor mode over unresolved threads:
{
"name": "run_ai_session",
"arguments": {
"review_name": "my-review",
"provider": "codex",
"mode": "refactor"
}
}
Reply mode on explicit thread IDs:
{
"name": "run_ai_session",
"arguments": {
"review_name": "my-review",
"provider": "codex",
"mode": "reply",
"comment_ids": [12, 18]
}
}
#Notes
- Tools that operate on review state require an explicit
review_name. - Thread state updates are explicit tool calls.
set_review_stateaccepts Parley review states (open,under_review).run_ai_sessionsupportsreplyandrefactormodes.- Supported AI providers:
codex,claude,opencode,pi.