UNPKG

@withpica/mcp-server

Version:

MCP Server for withPICA — enables AI assistants to interact with your withPICA music catalog

45 lines • 2.26 kB
/** * Saved Catalog Selections MCP Tools — ADR-319 * * "Songs I've written with Joe Baxter", "demos by fez", "songs from 2019" — * a selection is a named, persisted, org-scoped predicate over the * catalogue. It re-resolves on each open (it's a live query, not a frozen * id list) and carries a `renderer` label saying how it is MEANT to be * presented: `listen` or `worklist`. Neither renderer is built — they are * ADR-319 phase 1c — so today the label is stored and returned and nothing * else reads it. Each resolved member does carry `playable`: its primary * audio file (the master when there is one) plus the work's other audio * files, or null when the work has no audio — so an agent building a * listening link from a selection does not have to page the audio files by * hand (ops_issue af33b578). * * The one thing this file exists to get right: `pica_selections_inspect` * with `resolve: true` must never let a zero-member answer read as "you * have no such songs" when the truth is "PICA does not know" — e.g. on * production only 7 of 3,898 works carry a composition date, so "songs * from 2019" resolving to zero is a data-coverage fact, not a catalogue * fact. `resolveSelection` (lib/services/catalog-selection/resolve.ts) * already computes this per-clause as `coverage[].substrate_rows`; this * tool's job is to make sure that honesty survives the trip to an agent * that might only read the text block. `formatSuccess` folds the full * response (including `data.resolution.coverage`) into both `content[0] * .text` and `structuredContent`, so the coverage envelope is present on * both — required because the claude.ai connector replaces the text block * with `structuredContent` rather than showing both. */ import { PicaClient } from "@withpica/mcp-sdk"; import type { ToolDefinition, ToolExecutor } from "./index.js"; export declare class SelectionsTools { private pica; constructor(pica: PicaClient); getTools(): Array<{ definition: ToolDefinition; executor: ToolExecutor; }>; private querySelections; private inspectSelection; private createSelection; private updateSelection; private deleteSelection; } //# sourceMappingURL=selections.d.ts.map