Skip to main content
Glama
minmax

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 global

Node ≥ 20 と、PATH 上で動作する pi が必要です(npm i -g @earendil-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

pi セッションを開始します。[session: <uuid>]、回答、統計を返します。

pi_reply

ID でセッションを続行します。pi は以前のターンを保持しています。

pi_models

到達可能なモデルを一覧表示します(プロバイダー、ID、コンテキスト、最大出力、思考、画像)。

pi_sessions

既知のセッションを新しい順に、作業ディレクトリとともに一覧表示します。

pi

引数

メモ

prompt

必須。自己完結型である必要があります — pi はあなたの会話を見ることができません。

cwd

絶対パス。pi はここから AGENTS.md / CLAUDE.md を読み取ります。

model

例:bifrost/minimax/MiniMax-M3、sonnet、provider/id:thinking。

thinking

off … max。思考をサポートしていないモデルでは無効です — pi_models を確認してください。

tools

許可リスト。例:読み取り専用実行の場合は read,grep,find,ls。

no_tools

プロンプトテキストに対する純粋な推論。

system_prompt_append

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 に永続化されます。

1 つのセッションへの同時返信は直列化されます:2 つの pi プロセスが 1 つのセッションファイルに書き込むと破損する可能性があります。ID が不明な場合、pi は新しい会話を開始し、回答には既存のセッションを続行しているふりをする代わりに、明示的な [warning: no existing session …] が含まれます。

プロセス間の注意点。 セッションミューテックスはプロセスローカルです。2 つの MCP クライアントを 2 つのサーバープロセスに対して実行し、両方が 同じ セッション ID に同時に返信する場合、それらを直列化するものはありません。状態ファイルは再読み取りしてからマージする方式で書き込まれるため、一方のプロセスが学習したセッションが他方によって消去されることはありませんが、基になる pi セッションファイルにはそのような保護はありません。実際には、1 つのクライアントがセッションを所有します;厳密な保証が必要な場合は、サーバープロセスを 1 つに保ってください。

キャンセル

MCP notifications/cancelled は pi を SIGTERM で強制終了し、猶予期間後に SIGKILL にエスカレーションします。子プロセスも一緒に終了します:pi は独自のプロセスグループで実行され、ツリー全体にシグナルが送信されるため、pi がシグナルを転送できなくても、中断された sleep 120 は存続しません。

キャンセルは、呼び出しが並行スロットまたはセッションロックのキューに入る前に登録されるため、待機中にキャンセルされた呼び出しは pi をまったく起動しません。

シャットダウン — stdin EOF、SIGTERM、SIGINT、SIGHUP、または閉じた stdout — は、終了する前に実行中のすべての pi ツリーを回収します。切り離された子プロセスには、それらをクリーンアップする他の親プロセスがありません。

環境

変数

デフォルト

意味

PI_MCP_BIN

pi

pi バイナリへのパス。

PI_MCP_MODEL

pi の設定

すべての呼び出しのデフォルトモデル。

PI_MCP_THINKING

pi の設定

デフォルトの思考レベル。

PI_MCP_TIMEOUT_MS

1800000

pi が強制終了されるまでの呼び出しごとの壁時計。

PI_MCP_MAX_CONCURRENT

4

並行 pi プロセス数。

PI_MCP_MAX_OUTPUT

未設定

回答の上限。未設定は切り詰めなしを意味します。

PI_MCP_STDERR_LIMIT

1500

応答に含まれる stderr の末尾。

PI_MCP_MAX_CAPTURE

16000000

暴走ストリームに対する読み取りバッファガード。

PI_MCP_MAX_LINE

8000000

pi からの最長の単一イベント行。それを超えると破棄されます。

PI_MCP_MAX_FRAME

8000000

クライアントからの最長の単一 JSON-RPC フレーム。

PI_MCP_MAX_SESSIONS

200

最も古いものが破棄される前に記憶されるセッション数。

PI_MCP_KILL_GRACE_MS

5000

SIGTERM → SIGKILL の猶予期間。

PI_MCP_STATE

~/.local/state/pi-mcp/sessions.json

セッション → cwd マップ。

PI_MCP_WRAP

未設定

コマンドプレフィックス。例:sandbox-exec -f profile.sb。

設計

  • 呼び出しごとにプロセス。 pi 自身のセッションファイルが信頼できる情報源であり、それがこのサーバーの再起動後もフォローアップが存続する理由です。

  • pi -p --mode json。 JSON イベントストリームから、ターン、ツール呼び出し、トークン使用量、コストが得られます — 人間が読める出力のスクレイピングはありません。

  • 依存関係なし。 改行区切りの JSON-RPC 2.0 を直接話すため、同期を保つ SDK も、監査するファイルも 1 つだけです。

  • 長いプロンプトやダッシュで始まるプロンプト は @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 tools
piA

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.

NameRequiredDescriptionDefault
cwdNoUsually 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.
modelNoModel pattern or id, e.g. 'sonnet', 'bifrost/minimax/MiniMax-M3', 'provider/id:thinking'. Defaults to pi's own settings; pi_models lists valid values.
toolsNoUsually 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.
promptYesThe complete task. pi cannot see this conversation, so include everything it needs: file paths, goal, constraints, expected output format.
no_toolsNoDisable all pi tools: pure reasoning over the prompt, no file or shell access.
thinkingNoThinking level. No-op on models without thinking support (check pi_models). Defaults to pi's own settings.
transportNoUsually 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_msNoUsually 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_appendNoExtra text appended to pi's system prompt for this run.

TDQS

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

NameRequiredDescriptionDefault
searchNoOptional fuzzy filter, e.g. 'glm', 'deepseek', 'minimax'.

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

NameRequiredDescriptionDefault
cwdNoAbsolute path override. Defaults to the directory where the session started.
modelNoModel pattern or id, e.g. 'sonnet', 'bifrost/minimax/MiniMax-M3', 'provider/id:thinking'. Defaults to pi's own settings; pi_models lists valid values.
promptYesFollow-up message for this session.
sessionYesSession id from a [session: <id>] prefix, or from pi_sessions.
thinkingNoThinking level. No-op on models without thinking support (check pi_models). Defaults to pi's own settings.
transportNoUsually 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_msNoUsually 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

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

NameRequiredDescriptionDefault
commandNo'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.
messageNoText to deliver. Required for 'steer' and 'follow_up', ignored by 'abort'.
sessionYesSession id of the running turn (see pi_running).

TDQS

A4.6/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

  1. 6 tool updatesv0.5.1
    • First observedpi
    • First observedpi_models
    • First observedpi_reply
    • First observedpi_running
    • First observedpi_send
    • First observedpi_sessions

TDQS

A4.6/5.0

Scored across 6 tools

Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    B
    maintenance
    Enables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.
    7
    4
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Delegates 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.
    7
    12 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables delegation of coding tasks to a locally installed MiniMax Code CLI, leveraging user's existing login, models, and configuration.
    7
    38 npm
    MIT