pi-cli-mcp
pi-cli-mcp
로컬에 설치된 pi CLI에 코딩 작업을 위임하는 MCP 서버입니다.
실제 pi 바이너리를 자체 복사본 대신 래핑하므로, 모든 호출은 사용자의
~/.pi/agent/settings.json — 공급자, 모델, 사고 수준, 확장 기능, AGENTS.md /
CLAUDE.md 검색 — 을 그대로 상속합니다. 모델 스택이 여기에 중복되지 않으며,
pi를 업그레이드해도 서버가 표류하지 않습니다.
기본 에이전트(Claude Code, Cursor, 모든 MCP 클라이언트)가 pi에 작업을 넘겨야 할 때 사용하세요: 다른 모델의 두 번째 의견, 기본 컨텍스트 창 밖에 두고 싶은 조사, 또는 병렬 작업.
설치
npx -y pi-cli-mcp # no install
npm install -g pi-cli-mcp # or globalNode ≥ 20과 PATH에 있는 pi(npm i -g @earend-works/pi-coding-agent)가 필요합니다.
Claude Code
claude mcp add-json pi -s user '{
"type": "stdio",
"command": "npx",
"args": ["-y", "pi-cli-mcp"],
"timeout": 3600000
}'
claude mcp list | grep '^pi:' # expect: ✔ Connected넉넉한 timeout이 중요합니다: 실제 위임된 작업은 몇 분 동안 실행될 수 있습니다.
기타 MCP 클라이언트
{
"mcpServers": {
"pi": { "command": "npx", "args": ["-y", "pi-cli-mcp"] }
}
}서버 이름을 짧게 유지하세요(pi): 모델이 보는 도구 이름의 일부가 됩니다.
Related MCP server: pi-delegate-mcp
도구
도구 | 용도 |
| pi 세션을 시작합니다. |
| ID로 세션을 계속합니다. pi는 이전 대화를 계속 유지합니다. |
| 도달 가능한 모델을 나열합니다(공급자, ID, 컨텍스트, 최대 출력, 사고, 이미지). |
| 알려진 세션을 최신순으로 작업 디렉터리와 함께 나열합니다. |
pi
인자 | 설명 |
| 필수. 자족적이어야 합니다 — pi는 사용자의 대화를 볼 수 없습니다. |
| 절대 경로. pi는 여기서 |
| 예: |
|
|
| 허용 목록, 예: 읽기 전용 실행의 경우 |
| 프롬프트 텍스트에 대한 순수 추론. |
| pi의 시스템 프롬프트에 추가되는 추가 텍스트. |
pi({
prompt: "Map how retries are wired in src/http.rs. Report call sites only.",
cwd: "/abs/path/to/repo",
tools: "read,grep,find,ls"
})pi에는 권한 시스템이 없습니다. 기본 도구로
cwd안에서 파일을 편집하고 셸 명령을 사용자 권한으로 실행합니다. 작업이 분석일 때는tools또는no_tools를 전달하세요. 샌드박스를 원하면PI_MCP_WRAP를 사용하세요.
반환되는 것
pi의 최종 답변과 집계 통계만 반환됩니다 — 대화 기록, 도구 인자, 도구 출력은 절대 반환되지 않습니다:
[session: 0927adc5-a840-4b68-93ca-5ca344c9fafb]
Created note.md containing "hello" and updated target.txt to read "new content".
---
pi: bifrost/minimax/MiniMax-M3 · 5 turns · 4 tool calls: bash, read, write, edit · 11k in / 276 out · 9.8s
pi wrote: note.md, target.txt"최종 답변"은
stopReason으로 정의됩니다, 위치가 아닙니다:stopReason이toolUse가 아닌 마지막 어시스턴트 메시지 — pi가 도구 호출 단계를 표시하는 방식입니다. 중간 실행 내레이션은 프리앰블이 도구 호출과 메시지를 공유하더라도 삭제됩니다. 최종 메시지에 텍스트가 없으면, 이전 프리앰블로 조용히 되돌아가는 대신 실행 실패로 보고됩니다. 아무것도 최종 상태에 도달하지 않으면, 마지막으로 생성된 텍스트가 그대로 반환되고 그렇게 표시됩니다.답변은 절대 잘리지 않습니다. 상한을 원하면
PI_MCP_MAX_OUTPUT을 설정하세요. 진단 정보만 제한됩니다.pi wrote:는 pi가 실제로 파일을 쓴 경우에만 나타납니다, 그래서 부작용 확인으로 사용할 수 있습니다.잘못된
stopReason은 호출을 실패시킵니다, 실패-폐쇄 방식입니다.stop/length는 성공입니다;error,aborted, 누락된stopReason, 그리고 알려진 어휘 밖의 모든 것은 답변이 첨부된 채 오류로 보고됩니다. 검증되는stopReason은 반환되는 메시지에 속한 것이며, 마지막으로 도착한 이벤트의 것이 아닙니다. pi는 깨끗하게 마무리되지 않은 턴에서 종료 코드 0으로 종료할 수 있으므로, 종료 코드만으로는 신뢰할 수 없습니다.원시 stdout은 답변으로 반환되지 않습니다. 이벤트 스트림이 예상 계약과 일치하지 않으면, 응답은 그 사실과 도착한 것의 형태(메시지 수,
stopReason값, 도구 호출 수, 바이트 수)를 설명합니다 — 내레이션, 도구 인자, 도구 결과가 새어 나갈 수 있는 대화 기록 자체는 절대 반환하지 않습니다.
세션
pi는 세션 ID를 반환하고, pi_reply는 그 세션을 계속합니다. 대화는 pi 자체의 세션
파일에 저장되므로, 이 서버를 재시작해도 후속 작업이 계속 작동합니다 — 세션 → 디렉터리
매핑은 ~/.local/state/pi-mcp/sessions.json에 유지됩니다.
한 세션에 대한 동시 응답은 직렬화됩니다: 두 pi 프로세스가 하나의 세션 파일을 동시에
쓰면 손상될 수 있습니다. ID를 알 수 없으면 pi는 새 대화를 시작하고 답변에 명시적으로
[warning: no existing session …]을 포함합니다.
교차 프로세스 주의사항. 세션 뮤텍스는 프로세스 로컬입니다. 두 MCP 클라이언트가 두 서버 프로세스에 대해 동시에 같은 세션 ID로 응답하면, 직렬화되지 않습니다. 상태 파일은 다시 읽고 병합하는 방식으로 쓰여지므로 한 프로세스가 학습한 세션이 다른 프로세스에 의해 지워지지 않지만, 기본 pi 세션 파일에는 그러한 보호 기능이 없습니다. 실제로는 한 클라이언트가 세션을 소유합니다; 확실한 보장이 필요하면 서버 프로세스를 하나만 유지하세요.
취소
MCP notifications/cancelled는 유예 기간 후 SIGTERM으로 pi를 종료하고 SIGKILL로
격상합니다. 자식 프로세스도 함께 종료됩니다: pi는 자체 프로세스 그룹에서 실행되므로
신호가 전체 트리에 전달되어, 중단된 sleep 120도 pi가 신호를 전달하지 못하더라도
살아남지 못합니다.
취소는 동시성 슬롯이나 세션 잠금을 기다리는 호출 이전에 등록되므로, 대기 중에 취소된 호출은 pi를 전혀 시작하지 않습니다.
종료 — stdin EOF, SIGTERM, SIGINT, SIGHUP, 또는 stdout 닫힘 — 시 실행 중인 모든
pi 트리를 수거한 후 종료합니다. 분리된 자식 프로세스를 정리할 다른 부모가 없습니다.
환경
변수 | 기본값 | 설명 |
|
| pi 바이너리 경로. |
| pi의 설정 | 모든 호출의 기본 모델. |
| pi의 설정 | 기본 사고 수준. |
|
| pi가 종료되기 전 호출당 벽시계 시간. |
|
| 동시 pi 프로세스 수. |
| 미설정 | 답변 상한. 미설정 시 잘리지 않음. |
|
| 응답에 포함되는 stderr 꼬리. |
|
| 실행 중인 스트림에 대한 읽기 버퍼 가드. |
|
| pi에서 삭제되기 전 단일 이벤트 줄의 최대 길이. |
|
| 클라이언트에서 삭제되기 전 단일 JSON-RPC 프레임의 최대 길이. |
|
| 가장 오래된 세션이 삭제되기 전 기억되는 세션 수. |
|
| SIGTERM → SIGKILL 유예 기간. |
|
| 세션 → cwd 매핑. |
| 미설정 | 명령 접두사, 예: |
설계
호출당 프로세스. pi 자체의 세션 파일이 진실의 원천이므로, 이 서버를 재시작해도 후속 작업이 유지됩니다.
pi -p --mode json. json 이벤트 스트림이 턴, 도구 호출, 토큰 사용량, 비용을 제공합니다 — 사람이 읽을 수 있는 출력을 긁어낼 필요가 없습니다.의존성 없음. 개행으로 구분된 JSON-RPC 2.0을 직접 사용하므로 동기화할 SDK가 없고 감사할 파일이 하나뿐입니다.
길거나 대시로 시작하는 프롬프트는
@file첨부로 전달됩니다. pi에는--구분자가 없고 argv에는 OS 크기 제한이 있기 때문입니다.
대안을 쓰지 않는 이유
pandysp/pi-mcp-server는 @mariozechner/pi-coding-agent@^0.52.9 — pi의 이전 패키지
이름 아래의 옛 포크 — 에 의존하므로, 사용자의 CLI 대신 훨씬 오래된 에이전트의 번들
복사본을 실행하고 고정된 공급자 목록만 알고 있습니다. 생태계의 다른 모든 것
(pi-mcp-adapter, pi-mcp-extension 및 포크)은 반대 방향으로 실행됩니다: pi 안으로
들어가는 MCP 서버입니다. pi 자체에는 네이티브 mcp-server 하위 명령이 없습니다.
테스트
npm test테스트 스위트는 stdio를 통해 실제 서버를 구동하고, 실제 모델이 요청 시 생성할 수 없는
경로(잘못된 stopReason, 과도한 크기의 답변, 취소)에 대해서는 가짜 pi 바이너리를
사용하므로 API 액세스가 필요 없고 토큰을 소비하지 않습니다.
라이선스
MIT
Available Tools
6 toolspiA
Start a NEW task in the local pi agent — a separate CLI coding agent with its own read/bash/edit/write tools and its own context window. Blocks until pi settles, then returns only its final answer plus stats, prefixed [session: ]; continue that session later with pi_reply.
Good for: a second opinion from a different model, work kept out of this context, or parallel investigation.
Caution: pi has no permission system. With its default tools it edits files and runs shell commands as your user inside cwd. For analysis-only work pass tools or no_tools.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Usually omit to use this server's cwd. If set, must be an absolute path (relative is rejected). pi works and edits here, and reads AGENTS.md / CLAUDE.md from here. | |
| model | No | Model pattern or id, e.g. 'sonnet', 'bifrost/minimax/MiniMax-M3', 'provider/id:thinking'. Defaults to pi's own settings; pi_models lists valid values. | |
| tools | No | Usually omit to keep pi's default set (includes bash/edit/write). Set a comma-separated allowlist of pi tool names only to restrict, e.g. 'read,grep,ls' for a read-only run. | |
| prompt | Yes | The complete task. pi cannot see this conversation, so include everything it needs: file paths, goal, constraints, expected output format. | |
| no_tools | No | Disable all pi tools: pure reasoning over the prompt, no file or shell access. | |
| thinking | No | Thinking level. No-op on models without thinking support (check pi_models). Defaults to pi's own settings. | |
| transport | No | Usually omit. The default 'rpc' keeps pi up, so a running turn can be steered or aborted with pi_send. 'print' runs one process per turn that cannot be reached while it works. | |
| timeout_ms | No | Usually omit — the server default is generous. Override only when the task's real size demands it. A run killed at the deadline is not lost: it still returns its session id and is resumable with pi_reply. | |
| system_prompt_append | No | Extra text appended to pi's system prompt for this run. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden, and it does substantial work: it discloses that pi blocks until completion, returns only final answer plus stats, has no permission system, edits files and runs shell commands as the user inside cwd, and that a timeout-killed run is resumable. A small gap is not describing the exact stats format or failure behavior, but the most important behavioral traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet dense: an opening behavioral summary, a clear 'Good for' section, and a Caution section. Every sentence earns its place. It front-loads the core behavior (starts a new task, blocks, returns session id) before routing and caution details, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex 9-parameter tool with no output schema and no annotations, the description provides a complete operating picture: session lifecycle (via pi_reply), model discovery (pi_models), steering/aborting (pi_send), timeout recovery, safety caveats, and parameter defaults. The combination of description and 100% schema coverage leaves little ambiguity about how to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 9 parameters well. The description adds value beyond the schema by explaining which parameters to 'usually omit' (cwd, tools, transport, timeout_ms) and why, and by explaining the consequences of transport choices and timeout deadlines. This is helpful guidance an agent could not get from the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Start a NEW task') and resource ('local pi agent'), and clearly distinguishes this tool from its siblings by explaining pi_reply continues sessions, pi_models lists models, and pi_send steers running turns. The scope is explicit: it blocks until pi settles and returns only the final answer plus stats prefixed with [session: <id>].
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says when to use pi ('Good for: a second opinion from a different model, work kept out of this context, or parallel investigation') and offers clear caution about its lack of a permission system, advising to pass tools or no_tools for analysis-only work. It also references sibling tools for continued sessions and model listings, giving an agent actionable routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_modelsA
List the models pi can actually reach right now — provider, model id, context window, max output, thinking and image support — read from the live catalog. Use it to pick model and thinking values for pi / pi_reply. Starts no session, runs no task.
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Optional fuzzy filter, e.g. 'glm', 'deepseek', 'minimax'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden and does so well: it states this is a read from the live catalog ('actually reach right now') and explicitly denies side effects. It could add error/availability behavior or auth expectations, but the core read-only, no-task traits are clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences, front-loaded with the main action and output fields before the usage directive. Every sentence contributes either scope, use case, or a side-effect exclusion; no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple one-optional-parameter input and no output schema, the description is complete: it describes the returned model attributes, the purpose, and the non-mutating behavior. An agent can call it correctly without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the only parameter with 100% coverage, so the description need not compensate; it stays at the baseline. The description does not add extra semantic detail beyond the schema's 'Optional fuzzy filter' with examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource ('List the models pi can actually reach right now') and enumerates the return fields, making the tool's function unmistakable. It also ties itself to pi and pi_reply, which separates it from the session/task siblings without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly tells the agent when to use it: to pick `model` and `thinking` values for `pi` / `pi_reply`. The closing phrase 'Starts no session, runs no task' also signals when-not to use it, distinguishing it from pi_send, pi_running, and pi_sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_replyA
Send a new turn to an existing pi session that is not executing right now — including one that timed out or was cancelled: the session survives, so resume it here instead of restarting with pi. pi still has its prior turns (but never this conversation), so the follow-up can be short. Survives restarts of this server. For a turn still running under 'rpc', use pi_send instead.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute path override. Defaults to the directory where the session started. | |
| model | No | Model pattern or id, e.g. 'sonnet', 'bifrost/minimax/MiniMax-M3', 'provider/id:thinking'. Defaults to pi's own settings; pi_models lists valid values. | |
| prompt | Yes | Follow-up message for this session. | |
| session | Yes | Session id from a [session: <id>] prefix, or from pi_sessions. | |
| thinking | No | Thinking level. No-op on models without thinking support (check pi_models). Defaults to pi's own settings. | |
| transport | No | Usually omit. The default 'rpc' keeps pi up, so a running turn can be steered or aborted with pi_send. 'print' runs one process per turn that cannot be reached while it works. | |
| timeout_ms | No | Usually omit — the server default is generous. Override only when the task's real size demands it. A run killed at the deadline is not lost: it still returns its session id and is resumable with pi_reply. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden and meets it well: it discloses session survival across timeout/cancellation, that pi retains prior turns but 'never this conversation', and that sessions survive server restarts. The schema's transport and timeout_ms descriptions add durability semantics (killed runs still return a session id and are resumable). Minor deduction for not covering what happens when a session id is invalid or expired, though the schema's reference to pi_sessions partially mitigates this.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, zero filler, and the core purpose plus most critical edge case are front-loaded in the first sentence. Each subsequent sentence earns its place: context retention, persistence, and sibling routing. Nothing is redundant with the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a stateful tool with 7 parameters, no annotations, and no output schema, the definition is complete. It covers how to obtain a session id (via schema references to pi_sessions and the [session: <id>] prefix), what the timeout behavior is (resumable, returns session id), when the call returns before the turn completes (transport semantics), and how to distinguish siblings. The essential return-value behavior is disclosed through the timeout_ms description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description adds genuine parameter-level value on top. It clarifies the session parameter's semantics (timed-out/cancelled sessions are still valid targets) and the prompt parameter's expected style ('so the follow-up can be short'). The schema parameter descriptions themselves are unusually rich, cross-referencing pi_models, pi_sessions, and pi_send, which justifies above-baseline scoring.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource — 'Send a new turn to an existing pi session' — with a precise scope condition ('that is not executing right now'). It actively distinguishes itself from siblings by naming both alternatives: 'resume it here instead of restarting with `pi`' and 'use pi_send instead.' An agent can tell exactly what this tool does without opening any sibling schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit when-to-use and when-not-to-use guidance is present. It covers valid edge cases ('including one that timed out or was cancelled'), gives the exclusion condition ('For a turn still running under "rpc", use pi_send instead'), and names the restart alternative (`pi`). The persistence guarantee ('Survives restarts of this server') further informs whether resuming is safe.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_runningA
List pi turns executing at this moment — the ones pi_send can reach — with session id, working directory, elapsed time, and messages already sent in. Only rpc-transport runs appear; 'print' runs are unreachable mid-run. For past sessions use pi_sessions.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the live-only nature of the data, the rpc-transport limitation, the unavailability of 'print' runs during execution, and the fields returned. It does not spell out that the call is read-only, but 'List' strongly implies it, and the caveats add meaningful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, no filler. The main action and scope are front-loaded, and each subsequent sentence adds a necessary caveat or alternative. The description is compact but information-dense.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter list tool with no output schema, the description is complete: it names the resource, the live scope, the transport restriction, the return fields, and the alternative for historical data. An agent has everything needed to select and invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there is nothing for the description to explain. The description adds value by itemizing the returned fields (session id, working directory, elapsed time, messages sent in), which helps the agent understand the tool's output even in the absence of an output schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and a precise resource ('pi turns executing at this moment'), and clarifies the scope by saying 'the ones pi_send can reach.' It also distinguishes itself from pi_sessions explicitly, so an agent can tell them apart without reading schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states exactly when to use this tool: for currently executing pi turns over rpc-transport. It explicitly excludes 'print' runs as unreachable mid-run and directs the agent to pi_sessions for past sessions, giving clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_sendA
Deliver a message into a pi turn that is executing right now. Works only on runs started with transport 'rpc' — 'print' runs cannot be reached, and a session that already finished takes pi_reply, not pi_send. Returns immediately; pi's reaction appears in the answer of the pi/pi_reply call still waiting on that turn. pi_running lists reachable sessions.
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | 'steer' (default) interrupts the current turn with the message; 'follow_up' queues it for after the turn finishes; 'abort' stops the turn. Passed to pi unchanged. | |
| message | No | Text to deliver. Required for 'steer' and 'follow_up', ignored by 'abort'. | |
| session | Yes | Session id of the running turn (see pi_running). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden, and it delivers. It discloses the async behavior ('Returns immediately'), where the effect surfaces ('pi's reaction appears in the answer of the pi/pi_reply call still waiting on that turn'), and the transport/reachability constraint. This is exactly the kind of non-obvious behavioral context an agent needs beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four dense sentences with zero waste. The core action is front-loaded, followed by constraints, behavioral timing, and a helpful pointer to pi_running. Every sentence earns its place and no information is duplicated from the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no annotations and no output schema, the description covers the essential context: transport constraint, timing semantics, where the result appears, sibling differentiation, and session discovery. The only minor gap is the exact return value of pi_send itself (an ack?) and behavior on an invalid or unknown session id, but these are small omissions for an otherwise complete definition.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3: the schema already documents each parameter's meaning, including the command enum behavior and message requirements. The description adds marginal value by framing session as a currently executing turn and pointing to pi_running, but it does not meaningfully augment the parameter docs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Deliver a message into a pi turn that is executing right now.' It explicitly distinguishes the tool from pi_reply ('a session that already finished takes pi_reply, not pi_send'), so an agent can tell them apart instantly. The scope is precise — only live turns on 'rpc' transport.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
This is exemplary routing guidance. It states the exact precondition ('Works only on runs started with transport 'rpc''), a negative exclusion ('print' runs cannot be reached), and names the alternative tool for the finished-session case (pi_reply). It also points to pi_running for discovering reachable sessions. Nothing is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pi_sessionsA
List all pi sessions started through this server, newest first, with their working directory — running or finished, including runs that timed out. Use it to recover an id for pi_reply. For turns still executing (pi_send targets), use pi_running.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral burden. It clearly discloses listing order, the working directory field, and the inclusion of running, finished, and timed-out sessions. The only minor gap is that it doesn't state return format or error behavior, but for a listing tool the disclosed scope and status coverage are strong.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no filler. The first sentence delivers the core behavior and result fields, the second gives the primary use case, and the third handles sibling differentiation. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless list tool with no output schema, the description is complete enough: it states scope, ordering, covered statuses, a concrete usage purpose, and the related alternative for in-progress sessions. Nothing essential for correct invocation is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, which is the baseline case for a 4. The description correctly focuses on what the return value contains (all sessions, working directory, ordering) rather than parameter details, which are not applicable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') with a clear resource ('pi sessions'), and adds distinguishing details: 'started through this server, newest first, with their working directory'. It also covers inclusion criteria (running, finished, timed out) and explicitly differentiates from the sibling pi_running, so an agent can select it correctly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states exactly when to use the tool: 'Use it to recover an id for pi_reply.' It also gives an explicit exclusion: 'For turns still executing (pi_send targets), use pi_running.' This directs the agent to the right sibling without ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.5.1- First observed
pi - First observed
pi_models - First observed
pi_reply - First observed
pi_running - First observed
pi_send - First observed
pi_sessions
TDQS
Scored across 6 tools
Each tool maps to a distinct lifecycle stage: starting a session, messaging a running session, messaging an idle/finished one, listing running sessions, listing all sessions, and listing models. pi_reply and pi_send both send messages, but their descriptions clearly separate them by execution state and transport, so an agent should not confuse them.
Tool names are consistently lowercase snake_case with a pi_ prefix, which makes the namespace predictable. The slight inconsistency is that pi is a bare root command, and pi_running/pi_sessions/pi_models are noun-style list commands rather than verb-style names, but the pattern is still easy to follow.
Six tools is well-scoped for a server that manages an external CLI agent. Each tool handles a necessary interaction point—start, continue, interrupt, list live sessions, list historical sessions, and inspect available models—without redundancy or bloat.
The core session lifecycle is covered: create, resume, message mid-run, list running, list all, and check models. There is no explicit cancel/stop tool or read-only session history viewer, but pi_reply can resume any non-running session, so agents are not blocked by the omissions.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Run any Relay model (image, video, audio, LLM), poll tasks, upload files and search Relay's docs.
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.74MIT
- AlicenseNot gradedqualityBmaintenanceDelegates bounded coding tasks from MCP clients to the Pi Coding Agent over stdio. Supports review, verification, implementation, and batch operations with long-running task polling.MIT
- AlicenseAqualityCmaintenanceDelegates coding tasks to the locally installed Kimi Code CLI, reusing its auth, models, and configuration while adding tools for sessions, replies, model discovery, live turn steering, and history access.712 npmMIT
- AlicenseAqualityBmaintenanceEnables delegation of coding tasks to a locally installed MiniMax Code CLI, leveraging user's existing login, models, and configuration.738 npmMIT