Skip to main content
Glama
██████╗ ██╗    ██████╗ ███████╗██╗     ███████╗ ██████╗  █████╗ ████████╗███████╗
██╔══██╗██║    ██╔══██╗██╔════╝██║     ██╔════╝██╔════╝ ██╔══██╗╚══██╔══╝██╔════╝
██████╔╝██║    ██║  ██║█████╗  ██║     █████╗  ██║  ███╗███████║   ██║   █████╗
██╔═══╝ ██║    ██║  ██║██╔══╝  ██║     ██╔══╝  ██║   ██║██╔══██║   ██║   ██╔══╝
██║     ██║    ██████╔╝███████╗███████╗███████╗╚██████╔╝██║  ██║   ██║   ███████╗
╚═╝     ╚═╝    ╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝
                            ███╗   ███╗ ██████╗██████╗
                            ████╗ ████║██╔════╝██╔══██╗
                            ██╔████╔██║██║     ██████╔╝
                            ██║╚██╔╝██║██║     ██╔═══╝
                            ██║ ╚═╝ ██║╚██████╗██║
                            ╚═╝     ╚═╝ ╚═════╝╚═╝

npm node license

pi 코딩 에이전트를 위임 가능하고 조종 가능한 워커로 노출하는 MCP 서버입니다.

Claude Code(또는 모든 MCP 호스트)를 이 서버에 연결하고 pi의 약 38개 제공자(DeepSeek, Grok, GLM, Kimi, Qwen, Codex, OpenRouter, 로컬 llama.cpp) 중 하나에 작업을 위임하세요. 서브 에이전트의 컨텍스트는 메인 대화에 들어오지 않습니다.

용도

메인 하네스는 비싼 모델에서 실행되며, 신경 쓰는 컨텍스트 윈도우가 있습니다. 하네스가 하는 일 중 상당수는 그 모델이 필요 없고, 오히려 컨텍스트를 적극적으로 손상시킵니다: 모든 호출 지점을 찾기 위해 저장소를 grep 하기, 한 가지 질문에 답하기 위해 2000줄짜리 파일 읽기, 리팩터링이 남긴 것을 감사하기.

그 작업을 대신 위임하세요:

  • 비용. 단순 작업은 DeepSeek, GLM, Kimi, Qwen 또는 로컬 llama.cpp에서 실행됩니다. 실제로 프론티어 모델이 필요한 추론에만 프론티어 가격을 지불합니다.

  • 컨텍스트. 위임 에이전트는 자체 예산으로 파일을 읽고 결과를 반환합니다. 읽은 200KB는 결코 대화에 들어오지 않습니다.

  • 피해 범위. 위임 에이전트는 기본적으로 읽기 전용(read, grep, find, ls)이며, 세션 구성 시 강제됩니다. 탐색 작업을 하는 저렴한 모델은 옵트인하지 않는 한 트리에 손을 댈 수 없습니다.

위임 에이전트는 항상 pi 에이전트입니다. Codex, Grok, DeepSeek 등은 그 뒤의 모델을 공급합니다. 이것은 그들의 CLI를 감싼 래퍼가 아닙니다.

Related MCP server: Pi Session MCP

왜 pi인가, opencode나 CLI 래퍼가 아닌가?

위임 에이전트는 두 채널이 열려 있어야만 조종할 수 있습니다: 작업 중에 방향을 바꿀 수 있어야 하고, 에이전트가 질문을 하고 답변을 받을 때까지 블록할 수 있어야 합니다. 다른 프로그램에서 코딩 에이전트를 구동하는 대부분의 방식은 둘 다 닫아버립니다.

pi -p / CLI 래퍼

opencode SDK

이 서버

프로세스 내에서 실행

아니요 (서브프로세스)

아니요 (opencode serve에 HTTP 클라이언트)

예 (createAgentSession)

실행 중인 턴 방향 전환

아니요

abort만

steer

에이전트가 질문할 수 있음

아니요 (ctx.hasUI false)

세션 API에 없음

status → answer *

호출별 모델

아니요

예

model 인자

pi -p와 --mode json은 ctx.hasUI = false로 설정합니다. 그렇게 시작된 위임 에이전트는 구조적으로 발사 후 잊기(fire-and-forget)입니다: 질문을 제기할 수 없고, 방향을 바꿀 수도 없습니다.

opencode의 SDK는 별도의 서버 프로세스를 위한 타입드 클라이언트입니다: createOpencode()는 opencode serve를 부팅하고 HTTP로 통신합니다. 깔끔한 설계이지만, 감독해야 할 두 번째 프로세스가 생기고, 노출하는 세션 표면(prompt, abort, revert, messages)에는 턴 중간 조종이 없으며 에이전트가 호출자에게 질문할 경로도 없습니다.

pi는 createAgentSession을 임베드 가능한 라이브러리로 제공합니다. 이 서버는 세션 객체를 프로세스 내에서 보유하므로, session.steer()가 현재 도구 호출 이후, 다음 모델 호출 이전에 메시지를 넣을 수 있고, 합성 uiContext가 에이전트의 질문을 받아 answer를 위해 대기시킵니다. 셸로 빠져나가는 것이 없고, 감독할 것도 없습니다.

* 질문은 pi 확장에서 오므로, 그 채널은 extensions: true로 생성된 위임 에이전트에게만 열려 있습니다. 웹 검색 및 기타 확장 도구를 참조하세요.

(표는 위임 채널을 비교한 것이지 샌드박싱이 아닙니다; opencode에는 자체 권한 구성이 있습니다. 이 서버가 무엇을 강제하고 강제하지 않는지는 기본 읽기 전용을 참조하세요.)

도구

도구

용도

init

먼저 호출하세요. 도달 가능한 모델, 허용된 도구, 위임 에이전트를 구동하는 방법을 보고합니다. 다른 모든 도구는 이것이 한 번 실행될 때까지 거부합니다.

spawn

백그라운드에서 위임. sessionId를 즉시 반환합니다. 기본적으로 이것을 사용하세요.

spawn_batch

한 번의 호출로 최대 10개의 위임 에이전트를 팬아웃합니다. 배치로 검증되므로 하나의 작업이 잘못되면 아무것도 시작되지 않습니다.

run

위임하고 완료될 때까지 블록합니다. 빠른 질문 전용.

status

상태, 턴, 사용된 도구, 최신 텍스트, 대기 중인 질문.

steer

실행 중인 에이전트를 방향 전환. 현재 도구 호출 이후에 적용됩니다.

follow_up

완료된 위임 에이전트에게 또 다른 턴을 부여합니다. 읽었던 모든 것을 유지하므로 작업을 다시 설명할 필요가 없습니다.

answer

status가 표면화한 질문에 답변합니다. 질문할 수 있는 것은 확장뿐이므로 extensions: true에서만 도달 가능합니다.

abort

세션을 중지합니다. 부분 출력은 계속 읽을 수 있습니다.

models

이 위임 에이전트가 사용할 수 있는 모델을 나열합니다.

sessions

실행 중 및 완료된 세션을 나열합니다. state로 필터링하고 verbose로 확장합니다.

forget

완료된 세션을 기록에서 제거하여 id를 해제합니다.

설치

Node.js 22.19+와 한 번 로그인된(pi, 그다음 /login) 작동하는 pi 설치가 필요합니다.

Claude Code

claude mcp add pi -e PI_DELEGATE_MODEL=openrouter/stealth/ox-alpha -- npx -y pi-delegate-mcp

.mcp.json을 통한 모든 MCP 호스트

{
  "mcpServers": {
    "pi": {
      "command": "npx",
      "args": ["-y", "pi-delegate-mcp"],
      "env": { "PI_DELEGATE_MODEL": "openrouter/stealth/ox-alpha" },
      "timeout": 1800000
    }
  }
}

npx는 매 실행마다 패키지를 해석합니다. 고정하려면 전역으로 설치하고 바이너리를 직접 호출하세요:

npm install -g pi-delegate-mcp
{ "mcpServers": { "pi": { "command": "pi-delegate-mcp", "timeout": 1800000 } } }

서버 키는 모든 도구 이름에 접두사로 붙으므로(mcp__pi__spawn) 짧게 유지하세요.

소스에서

git clone https://github.com/howznguyen/pi-delegate-mcp && cd pi-delegate-mcp
npm install && npm run build && npm link

첫 실행

에이전트에게 무언가를 위임하라고 요청하세요. 에이전트는 이 서버가 도달할 수 있는 것을 배우기 위해 init을 한 번 호출한 다음 spawn을 호출합니다:

{ "id": "audit-01", "label": "who still imports onnxruntime",
  "prompt": "Search this repo for anything still importing onnxruntime and list the files.",
  "cwd": "/path/to/repo" }
{ "sessionId": "audit-01", "state": "running", "model": "opencode-go/deepseek-v4-flash",
  "activeTools": ["read", "grep", "find", "ls"] }

spawn은 즉시 반환합니다. status로 순서가 있는 도구 추적과 답변을 폴링하거나, 여러 개가 진행 중일 때는 sessions를 폴링하세요. init이 실패하면 정확히 무엇이 빠졌는지 말해줍니다: pi 미설치, 로그인된 제공자 없음, 또는 일치하는 것이 없는 모델 범위.

아래 예시의 모델 이름은 예시용입니다. models를 실행하여 자신의 pi 설치가 실제로 도달할 수 있는 것을 확인하세요.

추적 가능성

spawn과 run 모두 사용자 정의 id와 자유 텍스트 label을 허용합니다:

{
  "id": "search-audit-01",
  "label": "what ONNX removal left behind",
  "prompt": "...",
  "model": "opencode-go/deepseek-v4-flash"
}

Id는 [A-Za-z0-9._:-], 1-64자, 영숫자로 시작해야 하며 활성 세션 간에 고유해야 합니다. 생략하면 UUID가 생성됩니다.

완료된 세션은 사라지지 않고 status와 sessions로 계속 읽을 수 있으므로, 위임 에이전트가 실제로 무엇을 했는지 돌아가 확인할 수 있습니다. 가장 최근의 PI_DELEGATE_HISTORY(기본 50)개가 유지됩니다. forget은 하나를 일찍 제거합니다.

status는 순서가 있는 toolCalls 추적을 반환합니다: 위임 에이전트가 실행한 모든 도구와 인자, 타이밍. 호출 id와 결과를 보려면 verbose: true를 추가하세요:

{
  "seq": 1,
  "id": "call_467b4bb4…",
  "name": "bash",
  "state": "ok",
  "ms": 10,
  "args": "{\"command\":\"echo hello-trace\"}",
  "result": "hello-trace\n"
}

인자와 결과는(PI_DELEGATE_TRACE_ARGS, PI_DELEGATE_TRACE_RESULT) 잘린 길이가 기록된 채로 클리핑되므로, 큰 파일의 read 한 번이 컨텍스트를 넘치게 할 수 없습니다.

위임 에이전트에게 또 다른 턴 주기

완료된 위임 에이전트는 끝난 것이 아닙니다. pi는 세션을 메모리에 유지하므로, follow_up은 이미 읽은 모든 것이 여전히 컨텍스트에 있는 상태로 같은 에이전트를 다시 프롬프트합니다:

{ "sessionId": "search-audit-01", "prompt": "Now check whether the build files reference it too" }
{ "sessionId": "search-audit-01", "state": "running", "turnsSoFar": 1 }

위임 에이전트는 중단한 지점에서 이어갑니다. 첫 턴에 읽은 파일을 여전히 보유하므로, 두 번째 질문은 저장소를 다시 읽는 새 세션 대신 모델 호출 한 번만 듭니다.

이것이 위임 에이전트와 대화하는 저렴한 방법입니다. 새로 생성하면 작업을 다시 설명하고 같은 파일을 다시 읽는 비용을 지불해야 하며, 답변에는 그에 이른 추론이 전혀 포함되지 않습니다.

follow_up은 아직 작업 중인 위임 에이전트를 거부합니다. 작업 중간에 방향을 바꾸는 것은 steer의 역할이기 때문입니다. 둘은 상호 교환할 수 없습니다: steer는 실행 중인 에이전트의 도구 호출 사이에 적용되고, follow_up은 완료된 에이전트에서 새 턴을 시작합니다.

팬아웃

spawn_batch는 한 번의 호출로 전체 배치를 시작합니다. 작업은 배치 수준의 model, cwd, tools, extensions를 상속하고, 필요한 곳에서 개별적으로 재정의합니다:

{
  "idPrefix": "audit",
  "model": "opencode-go/deepseek-v4-flash",
  "cwd": "/repo",
  "tools": ["ls"],
  "tasks": [
    { "prompt": "What still imports onnxruntime?", "label": "imports" },
    { "prompt": "Which build files still reference ONNX?", "label": "build" },
    {
      "prompt": "Any ONNX model files left on disk?",
      "label": "artifacts",
      "model": "opencode-go/ox-alpha-free"
    }
  ]
}

그러면 audit-01, audit-02, audit-03으로 이름이 지정되고 몇 밀리초 안에 반환됩니다. 위임 에이전트를 시작하는 것은 생각할 때까지 기다리지 않기 때문입니다.

배치는 아무것도 시작하기 전에 검증됩니다: id 형식, 배치 내 중복 id, 이미 활성화된 id, 차단된 도구, 모든 모델 이름. 하나의 잘못된 작업은 호출을 실패시키고 아무것도 시작하지 않습니다. 팬아웃의 절반이 최악의 결과입니다. 시작된 위임 에이전트에 대한 비용을 지불하면서 어떤 것이 시작되지 않았는지도 알아내야 하기 때문입니다.

전체 배치를 위임 에이전트당 status 하나씩이 아니라 sessions 호출 하나로 폴링하세요. 실제로 읽고 싶은 위임 에이전트에 대해서만 status로 내려가세요. steer와 abort는 세션별로 유지됩니다.

호출별 모델 선택

모든 호출의 model은 PI_DELEGATE_MODEL을 재정의합니다. 해석할 수 없는 이름은 조용한 기본 모델 폴백이 아니라 하드 오류입니다. 조용한 폴백은 요청하지 않은 모델에 비용이 청구되는 방식이기 때문입니다.

어떤 이름이 해석되는지는 pi 자체의 enabledModels 범위가 결정하며, 이 서버는 단순히 표시만 하는 것이 아니라 강제합니다:

opencode-go/deepseek-v4-flash  -> ok      (listed in enabledModels)
opencode-go/glm-5.3            -> refused (out of scope)
knowns-hub/claude-opus         -> ok      (custom provider, see below)

사용자 정의 제공자는 범위를 우회합니다. ~/.pi/agent/models.json에 선언된 제공자가 서비스하는 모든 모델은 enabledModels가 이름을 지정하지 않아도 제공됩니다. 제공자를 수동으로 선언하는 것 자체가 사용 의도이기 때문입니다. 이것이 목록이 enabledModels보다 훨씬 길 수 있는 이유입니다: 범위의 세 항목에 두 개의 사용자 정의 제공자를 더하면 쉽게 열다섯 개의 제공 모델이 될 수 있습니다. init은 적용될 때 models.scopeNote에서 명시적으로 말합니다.

두 가지 스위치가 이를 변경합니다:

효과

PI_DELEGATE_STRICT_SCOPE=1

enabledModels를 정확히 준수합니다. 사용자 정의 제공자 우회가 제거됩니다.

PI_DELEGATE_IGNORE_SCOPE=1

범위 지정을 완전히 제거합니다. 인증된 모든 모델을 사용할 수 있습니다.

현재 적용 중인 설정에서 실제로 도달 가능한 것을 보려면 models를 호출하세요.

상태 줄

Claude Code는 정확히 하나의 statusLine 명령만 허용하므로, pi-delegate-statusline은 이미 실행 중인 것을 감싸고 이 작업 공간의 위임 에이전트를 보여주는 세그먼트를 추가합니다:

{
  "statusLine": {
    "type": "command",
    "command": "PI_DELEGATE_STATUSLINE_WRAP=ccstatusline pi-delegate-statusline",
    "refreshInterval": 10
  }
}

PI_DELEGATE_STATUSLINE_WRAP를 내려놓으면 pi 세그먼트만 출력합니다.

π ▸ audit engine·t1·12s audit index·t2·8s   running, with turn counts and elapsed time
π ▸ migrate·t7·3m04s ?1 waiting             one delegate is blocked on a question
π ✓2                                        finished, nothing running

어떤 위임 에이전트가 어떤 세션에 속하는가

디렉터리로 필터링하는 것만으로는 충분하지 않습니다: 같은 저장소에 열린 두 Claude Code 세션이 서로의 위임 에이전트를 보여줄 수 있습니다. 귀속은 대신 프로세스 계보를 사용합니다.

MCP 호스트는 세션당 서버 하나를 생성하므로, 서버는 process.ppid, 즉 호스트의 pid를 기록합니다. 같은 호스트가 생성한 상태 줄은 자신의 조상을 탐색하고 hostPid가 거기서 발견되는 상태 파일만 유지합니다. 같은 저장소, 두 세션, 누화 없음. 디렉터리 필터는 이것이 생기기 전에 작성된 상태 파일을 위한 폴백으로 남아 있습니다.

상태는 $XDG_STATE_HOME/pi-delegate-mcp/<pid>.json에 저장됩니다(PI_DELEGATE_STATE_DIR로 위치 변경). 파일은 해당 프로세스가 사라졌을 때 정리되며, 오직 ESRCH인 경우에만 그렇습니다. EPERM은 프로세스가 다른 사용자로 살아 있음을 의미하기 때문입니다. 서버는 또한 stdin이 닫히거나 호스트 pid가 사라지면 스스로 종료되므로, 전송을 닫지 않은 채 호스트가 죽더라도 아무것도 남지 않습니다.

기본적으로 읽기 전용

도구는 세션 생성 시점에 read, grep, find, ls로 잠깁니다. 그 외의 것은 세션이 만들어지기도 전에 거부됩니다.

범위를 넓히려면 서버에 추가 도구 이름을 지정하세요:

"env": { "PI_DELEGATE_ALLOW_TOOLS": "bash" }

또는 PI_DELEGATE_ALLOW_WRITE=1로 모든 것을 허용할 수 있습니다.

bash는 절충안이 아닙니다. pi에는 권한 시스템이 없으므로 bash를 가진 델리게이트는 write와 edit가 목록에 있는지와 관계없이 파일을 쓰고, 삭제하고, 네트워크에 접근할 수 있습니다. 그 두 개를 거부하면서 bash를 허용하는 것은 의도를 기록할 뿐 아무것도 강제하지 않습니다. Claude Code의 권한 프롬프트와 훅은 pi가 하는 일을 결코 보지 못합니다. 실제 경계가 필요하다면 이 서버를 컨테이너 안에서 실행하세요.

웹 검색 및 기타 확장 도구

pi의 자체 도구는 read, grep, find, ls, bash, powershell, write, edit입니다. 그중에는 검색도 fetch도 없습니다. 그것들은 자체 도구를 등록하는 pi 확장에서 제공되며, 델리게이트가 사용할 수 있습니다.

호출에 extensions: true를 설정하고 서버에서 도구 이름을 허용하세요:

"env": { "PI_DELEGATE_ALLOW_TOOLS": "web_search,fetch_content" }
{ "prompt": "Find the current Node LTS version and tell me just the number",
  "extensions": true, "tools": ["read", "grep", "find", "ls", "web_search"] }
{ "seq": 1, "name": "web_search", "state": "ok", "ms": 2568,
  "args": "{\"query\":\"latest stable Node.js LTS version\",\"numResults\":5}" }

이것이 델리게이트에 bash를 넘겨주지 않고 네트워크 접근을 주는 방법입니다. web_search는 검색만 할 수 있고 그 외에는 아무것도 할 수 없으며, 다른 모든 도구와 동일한 허용 목록을 통과하므로 요청하지 않은 호출에는 읽기 전용 기본값이 그대로 유지됩니다.

어떤 도구가 존재하는지는 서버를 실행하는 사용자가 설치한 것에 달려 있습니다. pi-web-access는 web_search, fetch_content, source_check, get_search_content를 제공합니다. pi-mcp-adapter는 ~/.pi/agent/mcp.json의 MCP 서버들을 연결하여 mcp로 노출합니다. pi에는 자체 MCP 클라이언트가 없으므로 그 확장이 유일한 경로입니다.

extensions: true는 원하는 확장 하나만이 아니라 설치된 모든 확장을 신뢰합니다. 확장들은 묶음으로 로드되며, 이 서버 프로세스의 모든 권한으로 실행되고, 일부는 세션보다 오래 지속되는 소켓과 타이머를 엽니다. 기본적으로 켜 두지 말고, 필요로 하는 델리게이트를 위해 호출별로 켜십시오. 또한 실제 시작 시간이 소요되므로 요청하지 않으면 꺼져 있습니다.

구성

환경 변수

기본값

의미

PI_DELEGATE_MODEL

pi의 자체 기본값

호출에서 model을 생략할 때 사용되는 모델

PI_DELEGATE_ALLOW_TOOLS

설정 안 됨

허용할 추가 도구의 쉼표 목록, 예: bash

PI_DELEGATE_ALLOW_WRITE

설정 안 됨

1은 모든 도구를 허용

PI_DELEGATE_HISTORY

50

검토를 위해 보관되는 완료된 세션 수

PI_DELEGATE_TRACE_ARGS

400

추적에 보관되는 도구 인자의 최대 문자 수

PI_DELEGATE_TRACE_RESULT

600

추적에 보관되는 도구 결과의 최대 문자 수

PI_DELEGATE_BATCH_MAX

10

spawn_batch 호출당 태스크 수 상한

PI_DELEGATE_LIST_CAP

60

이 값을 초과하면 init이 모델을 나열하는 대신 공급자별로 요약

PI_DELEGATE_STATE_DIR

XDG 상태 디렉터리

상태 표시줄 상태가 게시되는 위치

PI_DELEGATE_STATUSLINE_WRAP

설정 안 됨

감싸서 추가할 상태 표시줄 명령

PI_DELEGATE_STATUSLINE_LOG

설정 안 됨

디버깅을 위해 상태 표시줄을 렌더링할 때마다 타임스탬프를 추가할 파일

PI_DELEGATE_PROGRESS_MS

15000

run 중 진행 알림 간격

PI_DELEGATE_IGNORE_SCOPE

설정 안 됨

1은 pi의 enabledModels 범위를 무시하고 구성된 모든 모델을 허용

PI_DELEGATE_STRICT_SCOPE

설정 안 됨

1은 enabledModels를 정확히 따르고 사용자 지정 공급자 우회를 제거

PI_CODING_AGENT_DIR

~/.pi/agent

pi의 auth.json과 설정을 읽는 위치

장기 실행 작업

MCP TypeScript SDK는 기본적으로 60초 요청 시간 제한을 사용하며, 실제 작업은 이 제한을 훌쩍 넘겨버립니다. 선호 순서대로 세 가지 방어책이 있습니다:

  1. spawn + status를 사용하세요. 아무것도 블로킹되지 않으므로 시간 제한이 적용되지 않습니다.

  2. run은 주기적으로 진행 알림을 보내며 호스트의 시간 제한을 재설정합니다.

  3. .mcp.json의 "timeout" 또는 환경의 MCP_TOOL_TIMEOUT으로 상한을 높이세요.

CLAUDE_AUTO_BACKGROUND_TASKS=1은 Claude Code가 약 2분 후에 긴 MCP 호출을 백그라운드로 전환하게 합니다. 호출이 백그라운드로 전환되면 진행 알림은 버려지므로 (1) 또는 (3) 중 하나를 선택하세요. 둘 다는 안 됩니다.

인증

서버는 자격 증명을 처리하지 않습니다. pi는 ~/.pi/agent/auth.json에서 먼저 인증하고 그다음 환경 변수를 사용합니다. MCP 호스트는 종종 환경 변수가 제거된 환경으로 서버를 실행하므로, 셸 프로필에 키를 내보내는 것보다 auth.json을 사용하는 것이 좋습니다(pi를 한 번 실행하고 /login).

개발

npm install
npm run build       # tsc, src/*.ts -> dist/
npm run typecheck   # tsc --noEmit, strict
npm run test:ci     # offline: boots the server over stdio and lists its tools
npm test            # full suite: needs a logged-in pi, makes real model calls

test:ci는 CI가 실행하는 명령이자 prepublishOnly가 게이트로 삼는 명령입니다. 자격 증명도 네트워크도 필요 없기 때문입니다. npm test는 실제 델리게이트를 실제 공급자에 대해 실행하므로 비용이 들고 pi에 로그인된 환경에서만 작동합니다.

경로

담당 내용

src/config.ts

모든 환경 변수를 한곳에서 읽습니다

src/permissions.ts

도구 허용 목록과 이를 강제하는 게이트

src/registry.ts

세션 맵, ID 점유, 기록 축출

src/tools/

MCP 도구 그룹별 모듈 하나

src/pi/

pi SDK에 닿는 모든 것

src/statusline/

상태 파일 게시 및 상태 표시줄 바이너리

릴리스는 태그 기반입니다. npm version patch && git push --follow-tags는 빌드와 테스트를 실행한 다음 OIDC trusted publishing으로 게시하므로 저장소 어디에도 npm 토큰이 저장되지 않습니다.

이슈와 풀 리퀘스트는 환영합니다. 문제가 있는 델리게이트를 보고하는 경우라면 verbose: true를 지정한 status의 toolCalls 추적을 첨부하는 것이 유용합니다.

관련 사례

abatilo/pi-mcp-bridge는 더 간단한 길을 택합니다: pi --mode json -p --session-id <uuid>를 실행하고 pi가 세션을 디스크에 유지하게 하므로 브리지는 상태를 전혀 가지지 않습니다. 우아하고 읽어볼 가치가 있습니다. 그 단순함을 얻기 위해 방향 제어, 질문, 도구 제어를 포기합니다.

라이선스

MIT

Available Tools

12 tools
abortA

Stop a running pi session. Partial output stays readable via status.

NameRequiredDescriptionDefault
sessionIdYes

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that partial output remains readable after abort, which is a useful behavioral detail beyond the simple action. It does not detail other side effects, but for a simple abort tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one clear sentence with an additional clause. It is front-loaded with the main action and adds a relevant detail. No wasted words, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one param, no output schema), the description covers the core action and a key consequence. However, it lacks details on error conditions, idempotency, or what 'running' means precisely. Acceptable but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the sessionId parameter at all. The agent must infer that sessionId refers to the ID of the session to abort. With low coverage, the description should compensate, but it does not.

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?

States the specific action 'Stop a running pi session' with a clear resource (pi session). It distinguishes from siblings like run, status, and spawn by focusing on termination. The verb 'abort' is reinforced by the description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies when to use (to stop a running session) but does not explicitly contrast with alternatives. However, it does mention that 'Partial output stays readable via status', which hints at using status afterwards. No explicit when-not to use, but the mention of status provides some context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

answerA

Answer a question raised by a pi agent. Get requestId from status. Only pi extensions can ask, so questions appear only for delegates spawned with extensions: true; the MCP adapter's tool-approval and elicitation prompts are the usual source. A delegate waiting on one is blocked until you answer it.

NameRequiredDescriptionDefault
valueYesChosen option, text, or boolean for a confirm
requestIdYes
sessionIdYes

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose a critical behavioral trait: 'A delegate waiting on one is blocked until you answer it,' i.e. this call has a real unblocking side effect. It also explains the origin of requests (MCP adapter tool-approval and elicitation prompts), which helps an agent recognize legitimate questions. It omits permission/auth requirements for the caller and what a successful answer returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core purpose and immediately followed by the operational detail (where to get requestId). No filler or restatement of the tool name. Slightly dense mid-sentence clause, but nothing wasted.

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?

For a 3-required-param, no-output-schema tool with no annotations, the description covers purpose, prerequisite lookup, source of requests, and the blocking consequence. The main remaining gap is that `sessionId` is never explained and there is no statement of what a valid answer looks like beyond the schema's `value` types.

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 coverage is only 33% (only `value` is described), so the description must compensate. It does add genuine meaning for `requestId` by pointing to `status` as its source. However, `sessionId` is left entirely unexplained in both schema and description, so the compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Answer a question raised by a pi agent') that is clearly distinct from siblings like status, spawn, or steer. It scopes the tool to a narrow case (questions from pi extensions), so an agent can tell it apart from generic session tools. It stops just short of 5 because it never characterizes what an 'answer' does downstream beyond unblocking the caller.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear prerequisite chain: get `requestId` from `status`, and questions only exist for delegates spawned with `extensions: true`. That effectively tells the agent the condition under which this tool is callable. It doesn't state a when-not-to-use or name a fallback tool if no question is pending, so it falls short of explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

follow_upA

Send another prompt to a delegate that has already finished, keeping everything it read and said. Use this instead of spawning a fresh delegate and re-explaining the task: the session still holds its own context, which yours never had to absorb. Returns immediately; poll with status as usual. For a delegate that is still working, use steer instead.

NameRequiredDescriptionDefault
promptYesThe next turn for this delegate
sessionIdYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Given no annotations, the description carries the full burden. It discloses context preservation, immediate return (non-blocking), and the need to poll with `status`. It also states the pre‑condition (delegate finished). It doesn't cover error cases or side effects explicitly, but for this tool the key behaviors are well communicated.

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 sentences pack purpose, usage, alternatives, and behavior with zero filler. The primary instruction (use for finished delegates) is front-loaded, and each clause serves a purpose.

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?

For a simple 2-parameter tool without an output schema, the description covers the essential workflow: when to use, what it does, and how to obtain results (poll via `status`). Minor gaps like error handling or repeated follow‑ups are not critical for an agent to call it correctly.

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 documents the `prompt` parameter, but `sessionId` is left undocumented. The description does not add explicit meaning for `sessionId` beyond the name and context. With 50% schema coverage, this is borderline; the description could have compensated by explaining that `sessionId` identifies the finished delegate session.

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?

Clear action (send another prompt) targeted at a specific resource (a finished delegate) while preserving context. Explicitly distinguishes from spawn and steer, making the tool's purpose unambiguous even among many siblings.

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?

Provides direct guidance to use this instead of spawning a fresh delegate, and explicitly directs to `steer` for a working delegate. The when-to-use and when-not-to-use conditions are spelled out, leaving no ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

forgetA

Drop a finished session from the review history, freeing its id for reuse.

NameRequiredDescriptionDefault
sessionIdYes

TDQS

A4.2/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 burden. It clearly discloses the destructive effect ('Drop'), the target ('review history'), and the side effect ('freeing its id for reuse'). It does not mention irreversibility or error behavior, but the core behavior is transparent and specific.

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?

A single, front-loaded sentence with no filler. Every word contributes meaning, and the most important action ('Drop') comes first.

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?

For a one-parameter tool with no output schema, the description states the operation, the constraint (finished session), and the outcome (id reuse). It could have pointed to sessions for finding sessionId or to abort for running sessions, but nothing critical is missing for selecting and invoking the tool.

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 schema gives no description for sessionId, so the description adds meaning by tying it to a finished session's id and explaining the reuse consequence. It does not explicitly name the parameter or explain where to find sessionId, but the parameter name plus the description make the intent clear.

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 ('Drop') and resource ('finished session from the review history'), and clarifies the consequence ('freeing its id for reuse'). It also distinguishes itself from abort by specifying the session must be finished.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this is for finished sessions only, which separates it from running-session tools like abort. However, it never explicitly names an alternative or states when not to use this tool, leaving some routing inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

initA

READ THIS FIRST. Reports what this server can reach and how to drive it: permitted tools, the default model, models available per provider, and the recipes for delegating. Every other tool refuses until this has been called once.

NameRequiredDescriptionDefault
cwdNoRepository you intend to delegate in; picks up its project-local pi model scope
modelsNoSubstring to filter the model list, e.g. "deepseek"

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 full burden, and it discloses the most important behavior: all other tools refuse until init runs. It also makes clear this is a reporting/discovery call, implying read-only use, though it does not explicitly address repeated-call safety or side effects.

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 short sentences front-load the critical directive and include the refusal behavior without any filler. 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 discovery tool with two optional parameters and no output schema, the description sufficiently lists what the agent will learn (reachable tools, default model, provider models, delegation recipes) and the prerequisite behavior, making it complete enough to call correctly.

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 coverage is 100%, so the baseline is 3. The description does not add meaning beyond the schema's existing explanations for cwd and models, though its mention of model listing aligns with the models parameter.

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 ('Reports') and names concrete resources: permitted tools, default model, provider models, and delegation recipes. It clearly positions init as the mandatory discovery/entry-point tool, distinguishing it from siblings like models, which only list models.

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 gives explicit ordering guidance: 'READ THIS FIRST' and 'Every other tool refuses until this has been called once.' This tells an agent exactly when to call init and that no sibling can substitute for it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

modelsA

List models this delegate may use: pi's own scoped set plus any custom provider. Use to pick a model value.

NameRequiredDescriptionDefault
cwdNoPicks up a project-local pi model scope
filterNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the list scope (pi's scoped set plus custom providers) but does not mention side effects (none expected), output format, or ordering. For a read-only listing tool this is adequate but not rich; it does not contradict any structured data.

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 succinct sentences. The main purpose and usage are front-loaded, with no filler or redundant wording. Every phrase earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with two parameters and no output schema, this description covers the core purpose and usage. However, the `filter` parameter is left undocumented, and the description does not mention the return format or any caveats, leaving some operational details unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 50%: `cwd` has a description but `filter` does not. The tool description adds no meaning for `filter` or `cwd` beyond the schema, so the undocumented parameter remains unexplained. It fails to compensate for the schema gap.

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 clearly states 'List models this delegate may use' with a specific verb and resource. It also specifies the scope ('pi's own scoped set plus any custom provider'), which distinguishes it from the sibling command-like tools (init, run, etc.) that perform actions rather than listings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use to pick a `model` value', giving clear context for when to invoke it. It does not mention when not to use it or name alternatives, but given the sibling set are mostly action-oriented commands, the guidance is sufficient for selecting it correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

runA

Delegate a task to a pi agent and wait for the final answer. Blocks until done. Prefer spawn for long work; this is for quick questions.

NameRequiredDescriptionDefault
idNoYour own session id for traceability, e.g. "search-audit-01". 1-64 chars of [A-Za-z0-9._:-], must start alphanumeric, must not already be in use. Defaults to a UUID.
cwdNoWorking directory for the agent
labelNoFree-text note shown in `sessions`, e.g. what this delegate is for
modelNoModel as "provider/modelId", e.g. "openrouter/stealth/ox-alpha"
toolsNoTool allowlist for this delegate. [] disables all tools. Omit for defaults: read, grep, find, ls. Permitted on this server: read, grep, find, ls.
promptYesThe task for the pi agent
extensionsNoLoad pi extensions for this delegate. Off by default; they add startup cost and can misbehave.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it discloses the most consequential trait: the call blocks until the delegate finishes, and it returns the final answer. It does not cover failure/timeout behavior, cost, or isolation of the delegate, which leaves some gaps for an unattended blocking call.

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 short sentences, zero waste, and the blocking constraint plus the routing guidance are front-loaded. Every sentence conveys a decision-relevant fact.

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?

For a 7-parameter delegation tool with full schema coverage and no output schema, the description supplies the missing return semantics ('final answer') and the blocking contract, which the schema cannot express. Minor gap: no mention of what happens on delegate failure or timeout.

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 all seven parameters (including id, tools allowlist, extensions, model) are already documented in the schema. The description adds no syntax or format meaning beyond that, so the baseline of 3 applies.

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?

States a specific verb+resource ('Delegate a task to a pi agent') and clarifies the interaction model ('wait for the final answer'), then explicitly differentiates itself from the `spawn` sibling. An agent can distinguish this from spawn, spawn_batch, and follow_up without opening any 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?

Names the alternative (`spawn`) and the exact condition that selects it ('long work') versus the condition for this tool ('quick questions'). This is an explicit when/when-not/alternative statement, which is the top of the scale.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sessionsA

List pi sessions held by this server, running and finished. Finished ones stay readable for review until evicted (keeps the newest 50).

NameRequiredDescriptionDefault
stateNoFilter by state: starting, running, done, aborted, error
verboseNoInclude full text and tool calls

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose that finished sessions remain readable until evicted and keeps the newest 50, which is useful behavioral context. However, it does not mention any authentication requirements, rate limits, or the exact return format (e.g., whether it returns summaries or raw session objects). For a non-destructive list operation, this is partial transparency but not exhaustive.

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 two tight sentences. The first states the core purpose, and the second adds a relevant retention policy. No fluff or redundancy; every word earns its place. It is front-loaded with the primary action and scope, making it easy for an agent to quickly grasp the tool's function.

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?

Given the low complexity (2 optional params, no output schema, no annotations), the description covers the essential aspects: what it lists, the state scope, and retention behavior. It does not explicitly describe the output format, but for a list tool this is often inferable. The lack of an output schema is partially offset by the clear description of the tool's behavior, making it adequately complete for correct invocation.

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%, with both 'state' and 'verbose' already documented. The description adds no new parameter-specific detail beyond what the schema provides—it references 'running and finished' which maps to a subset of state values, but this is already inferred from the schema's enum-like description. Since the schema carries the parameter semantics, the description's contribution is minimal, aligning with the baseline of 3.

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 begins with a specific verb and resource: 'List pi sessions held by this server, running and finished.' It clearly identifies the tool as a listing operation for sessions, and the mention of 'running and finished' distinguishes it from siblings like 'status' which likely targets a single session. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing sessions but does not explicitly contrast it with alternatives such as 'status' or 'forget'. No when-to-use/when-not-to-use guidance is provided, relying on the agent to infer when this tool is appropriate based on the action of listing. The retention note hints at review use cases, but no explicit routing to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spawnA

Delegate a task to a pi agent running in the background. Returns a sessionId immediately, so nothing blocks. Poll with status, redirect with steer, answer its questions with answer. Use this for anything that might take more than a minute.

NameRequiredDescriptionDefault
idNoYour own session id for traceability, e.g. "search-audit-01". 1-64 chars of [A-Za-z0-9._:-], must start alphanumeric, must not already be in use. Defaults to a UUID.
cwdNoWorking directory for the agent
labelNoFree-text note shown in `sessions`, e.g. what this delegate is for
modelNoModel as "provider/modelId", e.g. "openrouter/stealth/ox-alpha"
toolsNoTool allowlist for this delegate. [] disables all tools. Omit for defaults: read, grep, find, ls. Permitted on this server: read, grep, find, ls.
promptYesThe task for the pi agent
extensionsNoLoad pi extensions for this delegate. Off by default; they add startup cost and can misbehave.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the burden and delivers the single most important trait: it returns a sessionId immediately and nothing blocks, so the agent knows not to expect an inline result. It omits other behavioral context such as permissions, session lifetime/cleanup (handled by `forget`/`abort`), and failure behavior.

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 short sentences, front-loaded with the core action and followed by the async contract and lifecycle routing. No filler; every sentence carries actionable information.

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?

For a 7-parameter, no-output-schema tool this covers what an agent most needs: the async contract and the follow-up tools for polling, steering and answering. Residual gaps are minor – return payload shape beyond sessionId and failure/timeout behavior are unstated.

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 schema already explains id, cwd, label, model, tools and extensions in detail. The description adds no parameter-level meaning beyond that (e.g. it never mentions the tools allowlist or model override), so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Delegate a task to a pi agent running in the background," which is unambiguous. It implicitly separates itself from `run` via the timing heuristic ("more than a minute"), but never names `run` or `spawn_batch` explicitly, so sibling differentiation is inferred rather than stated.

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?

Gives an explicit when-to-use rule ("anything that might take more than a minute") and then routes the agent through the full lifecycle: poll with `status`, redirect with `steer`, answer questions with `answer`. This is exactly the alternative-naming guidance an agent needs to pick and follow this tool correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spawn_batchA

Fan out several delegates in one call. Each task inherits the batch-level model, cwd, tools and extensions unless it overrides them. The whole batch is validated before any delegate starts, so a bad model name or a duplicate id fails everything instead of leaving half a fan-out running. Poll the result with sessions, which reports all of them at once, rather than one status per delegate.

NameRequiredDescriptionDefault
cwdNoDefault working directory for every task in this batch
modelNoDefault model for every task in this batch
tasksYes1 to 10 delegates to start
toolsNoDefault tool allowlist for every task in this batch
idPrefixNoNames the tasks `<prefix>-01`, `<prefix>-02`, ... e.g. "audit" gives "audit-01"
extensionsNoDefault extensions setting for every task in this batch

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully covers behavioral traits: whole-batch validation before any start, failure semantics for bad model or duplicate id, and inheritance/override rules. It discloses key outcomes and edge-case behavior, though it does not mention async execution or session cleanup.

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 sentences with no filler. The core purpose and key behavior are front-loaded; the polling guidance is a natural close. Every clause serves a purpose.

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?

Given no output schema and no annotations, the description covers purpose, validation, inheritance, and polling—enough for correct invocation. Minor gaps like precise return format are covered by the `sessions` reference, so it is nearly complete for the complexity level.

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% with descriptions for all 6 parameters, so baseline is 3. The description adds meaningful semantics beyond the schema: it explains how batch-level defaults are overridden per task, clarifies the idPrefix format, and states the validation impact on parameters. This elevates it above the baseline.

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 clearly states the action: 'Fan out several delegates in one call.' It specifies the resource (delegates) and the batch nature, distinguishing it from the single-delegate spawn. The inheritance and validation details further clarify its exact role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises polling with `sessions` instead of per-delegate `status`, giving concrete guidance on expected follow-up. It implies batch use case but does not explicitly contrast with `spawn` for single-delegate scenarios, leaving some room for inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

statusA

Check a background pi session. Returns state, turn count, tools used, latest text, and any pending questions the agent is waiting on. A non-empty questions array means it is blocked until you call answer. toolCalls traces every tool the delegate ran, in order.

NameRequiredDescriptionDefault
verboseNoInclude tool results and call ids in the trace
sessionIdYes

TDQS

A3.9/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 burden. It discloses the return contents (state, turn count, tools, latest text, pending questions) and explains the blocking semantics of the 'questions' array. It also notes that 'toolCalls' traces every tool run in order, adding behavioral depth beyond the tool name. It doesn't mention side effects, but 'check' implies read-only behavior, and the description sufficiently covers operational behavior.

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 concise and well-structured: two sentences plus a note. It front-loads the purpose, then details the return fields and the blocking condition. Every sentence carries useful information with no fluff.

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?

Given the absence of an output schema, the description adequately explains what the call returns and how to interpret the 'questions' array. It also clarifies the nature of 'toolCalls'. Minor omissions like error behavior for invalid sessions are not critical for a status-checking tool, so it feels complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%: only 'verbose' has a description; 'sessionId' is undocumented. The tool description does not mention either parameter, failing to compensate for the uncovered 'sessionId'. It doesn't explain what constitutes a valid sessionId or how 'verbose' changes the output beyond the schema's minimal hint. With low coverage and no description support, this is a significant gap.

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 clear verb ('Check') and a specific resource ('background pi session'), and enumerates exactly what it returns (state, turn count, tools used, latest text, pending questions). This distinguishes it from siblings like 'sessions' (which likely lists sessions) and 'answer' (which handles questions). The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives actionable guidance on how to interpret the result: a non-empty 'questions' array means the agent is blocked and must call 'answer'. However, it does not explicitly state when to use this tool versus alternatives (e.g., 'sessions' for listing all sessions, or 'steer' for modifying a session). The when-to-use context is implied but not contrasted with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

steerA

Redirect a running pi agent mid-task. The message lands after its current tool call finishes, before the next model call. Use this instead of aborting when the agent is going the wrong way.

NameRequiredDescriptionDefault
messageYes
sessionIdYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full burden of behavioral disclosure. It transparently explains the timing of when the message lands, which is a key behavioral trait. It does not mention error cases or lack of side effects, but for a simple steering action this is reasonably transparent.

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 two sentences, concise, and front-loaded with the core action and timing. Every word adds value without unnecessary detail.

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?

For a simple tool with no annotations and no output schema, the description covers the primary use case and timing behavior. It lacks details on error handling or edge cases, but given the low complexity, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description does not explain the parameters at all. While 'sessionId' and 'message' are somewhat self-explanatory by name, the description fails to indicate which parameter identifies the agent or what the message content should be. The description should have compensated for the lack of schema documentation.

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 clearly states the action ('redirect') on a specific resource ('running pi agent') and adds timing context (after current tool call, before next model call). It explicitly contrasts with the sibling 'abort', making the purpose unambiguous.

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 gives explicit guidance: use this instead of aborting when the agent is going the wrong way. This clearly tells the agent when to choose this tool over a direct alternative, leaving no 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. 3 tool updatesv0.1.1
    • Changedanswer2 fields changed
      • removedInput schema / properties / value / anyOf
        Removed value: -[
        -  {
        -    "type": "string"
        -  },
        -  {
        -    "type": "boolean"
        -  }
        -]
      • addedInput schema / properties / value / type
        Added value: +[
        +  "string",
        +  "boolean"
        +]
    • Changedrun1 field changed
      • changedInput schema / properties / tools / description
        Previous value: -"Tool allowlist for this delegate. Default: read, grep, find, ls. Permitted on this server: read, grep, find, ls."New value: +"Tool allowlist for this delegate. [] disables all tools. Omit for defaults: read, grep, find, ls. Permitted on this server: read, grep, find, ls."
    • Changedspawn1 field changed
      • changedInput schema / properties / tools / description
        Previous value: -"Tool allowlist for this delegate. Default: read, grep, find, ls. Permitted on this server: read, grep, find, ls."New value: +"Tool allowlist for this delegate. [] disables all tools. Omit for defaults: read, grep, find, ls. Permitted on this server: read, grep, find, ls."
  2. 12 tool updatesv0.1.0
    • First observedabort
    • First observedanswer
    • First observedfollow_up
    • First observedforget
    • First observedinit
    • First observedmodels
    • First observedrun
    • First observedsessions
    • First observedspawn
    • First observedspawn_batch
    • First observedstatus
    • First observedsteer

TDQS

A4.1/5.0

Scored across 12 tools

Disambiguation5/5

Each tool targets a distinct state or action, and the three delegation entry points (spawn/run/spawn_batch) are explicitly differentiated by blocking behavior and fan-out. The message-sending trio (answer/steer/follow_up) is clearly disambiguated by delegate state, and descriptions even cross-reference each other (spawn vs steer vs follow_up).

Naming Consistency4/5

Most names are concise lowercase verbs (spawn, run, steer, abort, forget, init) with a consistent compound pattern for spawn_batch/spawn variants. The deviation is noun-style list tools (sessions, models) and the short 'init', which break a strict verb convention but remain readable and predictable.

Tool Count5/5

12 tools map cleanly onto the delegation lifecycle: launch (spawn/run/spawn_batch), monitor (status/sessions), interact (steer/follow_up/answer), stop (abort), and housekeeping (forget/models/init). Each earns its place with no redundant or filler tools.

Completeness4/5

The surface covers the full delegate lifecycle including batch fan-out, mid-task redirection, post-completion follow-up, Q&A unblocking, and cleanup. Minor gaps exist (e.g. no dedicated blocking wait-for-completion on a spawned session, no explicit per-provider model-filtering view), but agents can work around these via status/run.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    B
    maintenance
    Enables a primary agent in Antigravity IDE to delegate coding tasks to background subagents across multiple model backends, with crash recovery, process cleanup, and human-in-the-loop approval for destructive actions.
    20
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables a coding agent such as Codex or Claude Code to delegate work to a local Pi coding-agent session, including second-opinion reviews, bulk reading kept out of the main context, and follow-up turns that retain context. Operators control what is possible by defining workspace and execution-profile aliases in a local config file, so clients cannot choose directories, models, providers, or permission levels themselves.
    2,808 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables an assistant to run pi coding-agent tasks in the background: dispatching a task, polling its status and tool trace, reading the final result, and cancelling it when no longer needed, all without pulling the delegate's context into its own conversation.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables a main agent to delegate tasks to reusable Pi agents with persistent sessions, question handoffs, bounded waiting, and in-run correction, while continuing other work. It supports named agents, context retention across MCP restarts, and result retrieval through MCP without repeated polling.
    11
    9 npm
    MIT