Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PI_SUBAGENT_PI_PATHNoOverride the pi binary path (default: pi).pi
PI_SUBAGENT_SESSION_DIRNoWhere pi session files are stored (default: .pi-subagent/sessions/ next to the package)..pi-subagent/sessions/

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pi_dispatchA

Dispatch a task to a new pi sub-agent session (spawns pi --mode rpc in cwd). Returns immediately with a taskId; use pi_wait to block for the result or pi_read to inspect progress.

pi_sendA

Send a message to a pi task. mode 'auto' (default): direct prompt when idle, steering message while it is working. 'followUp' queues until the agent fully stops.

pi_statusA

Lightweight status of a pi task: state, streaming flag, last activity, last assistant text, current tool. Includes 'pendingRequest' when pi is blocked on a UI dialog awaiting pi_respond.

pi_readA

Read buffered events of a pi task (tool calls, message updates, etc.). Pass 'since' = the latest seq you already saw for incremental reads.

pi_waitA

Block until the pi task's current run finishes (state idle/aborted/error), a UI dialog needs answering, or timeoutMs elapses. Returns the final state, the last assistant text in 'summary', and 'pendingRequest' when pi is waiting for pi_respond.

pi_respondA

Answer a pending UI dialog reported as 'pendingRequest' by pi_status/pi_wait. Pass 'value' for select/input/editor, 'confirmed' for confirm, or 'cancelled: true' to dismiss.

pi_abortB

Abort the pi task's current operation. The session stays alive; you can keep sending messages.

pi_closeA

Terminate the pi process and remove the task from the registry. Session files stay on disk.

pi_listA

List all pi tasks and their states.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/turbin/pi-subagent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server