Skip to content

tRPC API reference

The Pigeon web app exposes its data over tRPC v11. This page lists every procedure in the root router, grouped by sub-router, with the input shape and a one-line description. It’s reference material — dense and scannable.

If you need MCP tools instead, see MCP tools. The two surfaces sit on top of the same src/lib/services/ layer (see Architecture) but expose different procedure sets — the web UI calls tRPC; agents call MCP.

RouterConcernsFile
projectWorkspaces (one per repo)src/server/api/routers/project.ts
boardKanban views inside a projectsrc/server/api/routers/board.ts
columnVertical lanes; carry the rolesrc/server/api/routers/column.ts
cardUnits of worksrc/server/api/routers/card.ts
checklistSub-card todossrc/server/api/routers/checklist.ts
commentCard-scoped narrativesrc/server/api/routers/comment.ts
activityAppend-only audit logsrc/server/api/routers/activity.ts
tagProject-scoped labelssrc/server/api/routers/tag.ts
milestoneCard grouping with target datesrc/server/api/routers/milestone.ts
relationblocks / related / parent between cardssrc/server/api/routers/relation.ts
handoffAppend-only session continuitysrc/server/api/routers/handoff.ts
decisionDecision claims (legacy adapter over Claim)src/server/api/routers/decision.ts
noteLoose markdown — agent contextsrc/server/api/routers/note.ts
tokenUsageCosts page aggregationssrc/server/api/routers/token-usage.ts
systemVersion, tool catalog, release notessrc/server/api/routers/system.ts

Composition: src/server/api/root.ts glues these into the appRouter. Every procedure is exposed at /api/trpc/<router>.<procedure> — e.g. /api/trpc/card.listAll.

Top-level workspace. One per repo.

ProcedureKindInputWhat it does
listquery{}List all projects (sorted favorites-first).
getByIdquery{ id: uuid }Fetch one project by id.
createmutationcreateProjectSchemaCreate a project (allocates slug, repoPath, default board).
updatemutation{ id, data }Update name / slug / repoPath / metadata.
deletemutation{ id: uuid }Cascade-delete project + boards + cards.
toggleFavoritemutation{ id: uuid }Flip the favorite flag.
setDefaultBoardmutation{ projectId, boardId | null }Bind the project’s default board (must belong to project).
seedTutorialmutation{}Seed the Pigeon Tutorial project + board.

A kanban view inside a project. A project can have multiple boards; each holds its own column layout.

ProcedureKindInputWhat it does
listquery{ projectId }List boards in a project.
getFullquery{ id: uuid }Board + columns + cards (the canonical hydrate-everything call).
createmutationcreateBoardSchemaCreate board + default column set.
updatemutation{ id, data }Update name / description / staleInProgressDays.
deletemutation{ id: uuid }Cascade-delete board + columns + cards.

Vertical lanes; carry role (backlog/todo/active/review/done/parking).

ProcedureKindInputWhat it does
createmutationcreateColumnSchemaAdd a column to a board.
updatemutation{ id, data }Rename / re-role / set parking flag.
reordermutationreorderColumnsSchemaBulk re-position columns on a board.
deletemutation{ id: uuid }Delete column (must be empty, or cards reflow).

Units of work. The bulk of the board’s surface area.

ProcedureKindInputWhat it does
listAllquery{ projectId, boardId?, priority?, tag?, search? }Filter cards across a project.
getByIdquery{ id: uuid }Fetch card + comments + checklist + relations.
createmutationcreateCardSchemaAllocates project-scoped #N.
updatemutation{ id, data }Description, priority, milestone, tags, metadata.
movemutation{ id, columnId, position, intent? }Move between columns (intent required per tracker.md).
getCommitSummaryquery{ id: uuid }Linked commits + paths-touched roll-up.
deletemutation{ id: uuid }Soft-delete (sets deletedAt); #N never recycles.

Sub-card todos. Lightweight; no nesting.

ProcedureKindInputWhat it does
createmutationcreateChecklistItemSchemaAdd an item to a card.
updatemutation{ id, data }Toggle completed or update text/position.
deletemutation{ id: uuid }Remove an item.

Card-scoped narrative. Surfaced to the next session via getCardContext.

ProcedureKindInputWhat it does
listquery{ cardId: uuid }Comments on a card, oldest-first.
createmutationcreateCommentSchemaAdd a comment (authorType: HUMAN | AGENT).

Append-only audit log of everything that happened on a card or board.

ProcedureKindInputWhat it does
listquery{ cardId: uuid }Activity rows for one card.
listByBoardquery{ boardId, limit? }Recent activity across a board.
flowMetricsquery{ boardId }Throughput sparkline + cycle-time roll-ups.

Project-scoped labels. slug is immutable, label is mutable.

ProcedureKindInputWhat it does
listquerylistTagsSchemaList tags in a project.
getByIdquery{ id: uuid }Fetch one tag.
createmutationcreateTagSchemaCreate a tag (allocates slug).
renamemutationrenameTagSchemaRename label without changing slug.
mergemutationmergeTagsSchemaMerge two tags; redirects all CardTag rows.
deletemutationdeleteTagSchemaDelete tag and unlink from cards.

Card grouping with a target date. Release horizon, not a deadline.

ProcedureKindInputWhat it does
listquery{ projectId, state? }List milestones in a project.
getByIdquery{ id: uuid }Fetch one milestone.
createmutationcreateMilestoneSchemaCreate a milestone with target date + state.
updatemutation{ id, data }Update title / target date / state.
reordermutationreorderMilestonesSchemaBulk re-position milestones.
deletemutation{ id: uuid }Delete milestone; cards get milestoneId = null.
mergemutationmergeMilestonesSchemaMerge two milestones; redirects all cards.

blocks / related / parent edges between cards.

ProcedureKindInputWhat it does
linkmutationcreateRelationSchemaAdd a relation (fromCardId, toCardId, type).
unlinkmutation{ fromCardId, toCardId, type }Remove a relation.
getForCardquery{ cardId: uuid }All edges touching a card (incoming + outgoing).
getBlockersquery{ projectId }Cards that are blocked by an open card (graph crawl).

Append-only session continuity. Read by briefMe, written by saveHandoff.

ProcedureKindInputWhat it does
savemutationcreateHandoffSchemaAppend a new handoff (agentName, summary, workingOn, findings, nextSteps, blockers).
getLatestquery{ projectId, boardId? }Most recent handoff for the scope.
listquery{ projectId, boardId?, limit? }History of handoffs.
getBoardDiffquery{ boardId, sinceHandoffId? }What changed since a given handoff (cards moved, created, commented, checklist progress).

Decision claims. Legacy adapter — there is no Decision Prisma model; these are Claim rows with kind = 'decision'. See Data model.

ProcedureKindInputWhat it does
createmutationcreateDecisionSchemaCreate a decision-shaped Claim.
updatemutation{ id, data }Update the decision payload.
getByIdquery{ id: uuid }Fetch one decision.
listquery{ projectId, cardId?, status? }List decisions across a project.
deletemutation{ id: uuid }Delete a decision (soft on the underlying Claim).

Loose markdown — agent context, ad-hoc capture. Survives project deletion (onDelete: SetNull).

ProcedureKindInputWhat it does
listquery{ projectId, boardId?, cardId? }List notes scoped to a project / board / card.
createmutationcreateNoteSchemaCreate a note.
updatemutation{ id, data }Update title / body / kind.
deletemutation{ id: uuid }Delete a note.
promoteToCardmutationpromoteNoteToCardSchemaConvert a note into a card on the given column.

Costs page aggregations. Backed by src/lib/services/token-usage.ts. See Cost tracking for the math behind every section.

ProcedureKindInputWhat it does
getProjectSummaryquery{ projectId, boardId? }Headline cells (lifetime cost, sessions, tracking-since) + attributionBreakdown.
getSessionSummaryquery{ sessionId }One session’s cost + token rollup.
getCardSummaryquery{ cardId }One card’s cost across all attributed sessions.
getMilestoneSummaryquery{ milestoneId }Milestone-scoped cost rollup.
getTopSessionsquery{ projectId, boardId?, limit? }Top-N most expensive sessions with attributed card.
getDailyCostSeriesquery{ projectId, boardId? }7-day UTC-bucketed cost sparkline.
getDailyCostShareSeriesquery{ projectId, boardId }Per-day board’s-share-of-project ratio (NaN-safe).
getDiagnosticsquery{}Pricing health (last-verified date, default rate sources).
getPricingquery{}Resolved pricing map (defaults + overrides).
updatePricingmutation{ projectId, model, rates }Per-project rate override.
getSavingsSummaryquery{ projectId }briefMe vs naive getBoard bootstrap.
recalibrateBaselinemutation{ projectId }Re-measure both payload sizes; persist to Project.metadata.tokenBaseline.
getSessionPigeonOverheadquery{ sessionId }One session’s MCP-tool-call overhead.
getCardPigeonOverheadquery{ cardId }One card’s MCP-tool-call overhead.
getCardDeliveryMetricsquery{ projectId, boardId?, limit? }Median cost-per-shipped-card + Top-N most expensive cards.
getProjectPigeonOverheadquery{ projectId, boardId? }Project-wide MCP-tool-call overhead (priced at session’s first model’s outputPerMTok).

Version + catalog metadata for the web UI.

ProcedureKindInputWhat it does
infoquery{}{ version, mode } (mode is service in prod, dev in dev).
toolCatalogquery{}The MCP tool catalog + slash-command list (used by the in-app ? palette).
versionCheckquery{}Local-vs-shipped doctor pass — surfaces drift.
releaseNotesquery{ version? }Parse CHANGELOG.md and return entries.
  • MCP tools — the agent-facing surface (different procedure set, same service layer).
  • Architecture — how src/server/api/routers/ thin-adapt over src/lib/services/.
  • Cost tracking — the numbers tokenUsage.* aggregates over.