deep-roon-mcp 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/deep-roon-mcp.js +103 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ Version 0.5: sixty-one tools (fifty-five with a read-only library; sixty-five wi
|
|
|
44
44
|
| `roon_cover` | The cover of what plays, as an image |
|
|
45
45
|
| `roon_history` | Roon's play history, newest first |
|
|
46
46
|
| `roon_top` | Most played albums, artists or tracks over your whole history |
|
|
47
|
+
| `roon_profiles` | The Roon profiles, and the one Deep Roon uses |
|
|
47
48
|
| `roon_library` | Your library with Roon's Focus: stars, genre, label, artist, composer, producer, years, hi-res, live … sorted any way |
|
|
48
49
|
| `roon_focus` | The Focus panel: what your library (or part of it) is made of, with counts |
|
|
49
50
|
| `roon_tracks`, `roon_artists` | Focus on tracks and artists (and composers) |
|
|
@@ -160,7 +161,7 @@ or by hand in `~/.codex/config.toml`:
|
|
|
160
161
|
[mcp_servers.deep-roon]
|
|
161
162
|
command = "npx"
|
|
162
163
|
args = ["-y", "deep-roon-mcp"]
|
|
163
|
-
# env = { ROON_HOST = "", DEEP_ROON_TOOLS = "", DEEP_ROON_INTERNAL = "", DEEP_ROON_READ_ONLY = "" }
|
|
164
|
+
# env = { ROON_HOST = "", ROON_PROFILE = "", DEEP_ROON_TOOLS = "", DEEP_ROON_INTERNAL = "", DEEP_ROON_READ_ONLY = "" }
|
|
164
165
|
```
|
|
165
166
|
|
|
166
167
|
ChatGPT on the web can't run a server on your computer — use the desktop app.
|
|
@@ -173,18 +174,24 @@ ChatGPT on the web can't run a server on your computer — use the desktop app.
|
|
|
173
174
|
"deep-roon": {
|
|
174
175
|
"command": "npx",
|
|
175
176
|
"args": ["-y", "deep-roon-mcp"],
|
|
176
|
-
"env": { "ROON_HOST": "", "DEEP_ROON_TOOLS": "", "DEEP_ROON_INTERNAL": "", "DEEP_ROON_READ_ONLY": "" }
|
|
177
|
+
"env": { "ROON_HOST": "", "ROON_PROFILE": "", "DEEP_ROON_TOOLS": "", "DEEP_ROON_INTERNAL": "", "DEEP_ROON_READ_ONLY": "" }
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
181
|
```
|
|
181
182
|
|
|
182
|
-
The same settings as environment variables: `ROON_HOST` (the Core's address, empty = find it), `
|
|
183
|
+
The same settings as environment variables: `ROON_HOST` (the Core's address, empty = find it), `ROON_PROFILE` (a Roon profile
|
|
184
|
+
by name, empty = the first; see below), `DEEP_ROON_TOOLS=essentials`,
|
|
183
185
|
`DEEP_ROON_INTERNAL=off`, `DEEP_ROON_READ_ONLY=library` (nothing changes the library; playing works) or `DEEP_ROON_READ_ONLY=all`
|
|
184
186
|
(Deep Roon only looks: no playing, queueing or zone changes either), `DEEP_ROON_PLAYLIST_EDIT=1` (the playlist edits). Leave out what you don't need. VS Code calls the block `"servers"` instead of `"mcpServers"`.
|
|
185
187
|
|
|
186
188
|
Then, once, in Roon: Settings › Extensions › **Enable** next to "Deep Roon MCP". Until then the tools say so.
|
|
187
189
|
|
|
190
|
+
**Roon profiles.** The play history, most played, Daily Picks, Daily Mixes, New for you, favourites and Listen Later belong to
|
|
191
|
+
a Roon profile. Deep Roon is a Roon remote of its own, like each Roon app, so switching profiles in a Roon app doesn't change
|
|
192
|
+
it: it uses `ROON_PROFILE` (or **Roon profile** in Claude Desktop's settings), else the first profile. Those tools also take
|
|
193
|
+
`profile` for one question ("what did Anna play this week?"); `roon_profiles` lists the names.
|
|
194
|
+
|
|
188
195
|
### Over HTTP
|
|
189
196
|
|
|
190
197
|
For a client that can't start a program on your computer, Deep Roon MCP can serve MCP over HTTP instead (Streamable
|
package/dist/deep-roon-mcp.js
CHANGED
|
@@ -9269,6 +9269,9 @@ var init_client = __esm({
|
|
|
9269
9269
|
graph = new ObjectGraph();
|
|
9270
9270
|
explicitProfile;
|
|
9271
9271
|
cachedProfile;
|
|
9272
|
+
/** The profile chosen by name (7 Nov 2026, forum: "after switching profiles, roon_history still returns my first
|
|
9273
|
+
* profile") — see core/session.ts; unset = the explicit option, else the first Profile in the graph. */
|
|
9274
|
+
chosenProfile;
|
|
9272
9275
|
settleMs;
|
|
9273
9276
|
/** Added 8 Oct 2026: a PING every 10 s while connected (see RemotingClient.ping); stops at the first failed one —
|
|
9274
9277
|
* a caller may replace conn.onclosed, so the close hook alone is not enough. */
|
|
@@ -9291,7 +9294,11 @@ var init_client = __esm({
|
|
|
9291
9294
|
* on every other Core the server matched nothing against it, which is a big
|
|
9292
9295
|
* part of why search returned no results.
|
|
9293
9296
|
*/
|
|
9297
|
+
useProfile(id) {
|
|
9298
|
+
this.chosenProfile = id;
|
|
9299
|
+
}
|
|
9294
9300
|
profile() {
|
|
9301
|
+
if (this.chosenProfile) return this.chosenProfile;
|
|
9295
9302
|
if (this.explicitProfile) return this.explicitProfile;
|
|
9296
9303
|
if (this.cachedProfile) return this.cachedProfile;
|
|
9297
9304
|
for (const o of this.graph.objects.values()) {
|
|
@@ -9865,9 +9872,14 @@ async function exportPlayHistory(client2, options) {
|
|
|
9865
9872
|
if (!result.success) throw new Error(`VirtualHistoryQuery failed: ${result.status}`);
|
|
9866
9873
|
const [queryOid] = readFlexLong(Uint8Array.from(result.payload), 0);
|
|
9867
9874
|
try {
|
|
9875
|
+
let seen2 = 0;
|
|
9868
9876
|
const total = await pollFor("history Count", timeoutMs, pollIntervalMs, () => {
|
|
9869
|
-
const
|
|
9870
|
-
|
|
9877
|
+
const q = client2.graph.getObject(queryOid);
|
|
9878
|
+
const count = field(q, "::Count");
|
|
9879
|
+
if (count === void 0) {
|
|
9880
|
+
if (q && !seen2) seen2 = Date.now();
|
|
9881
|
+
return q && Date.now() - seen2 >= 1500 ? 0 : void 0;
|
|
9882
|
+
}
|
|
9871
9883
|
if (!Number.isSafeInteger(count) || count < 0) {
|
|
9872
9884
|
throw new Error(`invalid history Count: ${String(count)}`);
|
|
9873
9885
|
}
|
|
@@ -15457,7 +15469,7 @@ var require_lib2 = __commonJS({
|
|
|
15457
15469
|
var version2;
|
|
15458
15470
|
var init_package = __esm({
|
|
15459
15471
|
"package.json"() {
|
|
15460
|
-
version2 = "0.5.
|
|
15472
|
+
version2 = "0.5.8";
|
|
15461
15473
|
}
|
|
15462
15474
|
});
|
|
15463
15475
|
|
|
@@ -15685,6 +15697,29 @@ var init_official = __esm({
|
|
|
15685
15697
|
function afterFirstConnect(f) {
|
|
15686
15698
|
onFirstConnect = f;
|
|
15687
15699
|
}
|
|
15700
|
+
function asProfile(name, work2) {
|
|
15701
|
+
return name?.trim() ? asked.run(name.trim(), work2) : work2();
|
|
15702
|
+
}
|
|
15703
|
+
function profilesOf(c) {
|
|
15704
|
+
const list = [...c.graph.objects.values()].find((o) => /\.DataList<[\w.]*\.Profile>$/.test(o.typeName));
|
|
15705
|
+
const objs = list ? (list.fields.$items ?? []).map((r) => c.graph.getObject(r.$ref)) : [...c.graph.objects.values()].filter((o) => o.typeName.endsWith(".Profile"));
|
|
15706
|
+
const field3 = /* @__PURE__ */ __name((o, n) => Object.entries(o.fields).find(([k]) => k.endsWith(`::${n}`) || k === n)?.[1], "field");
|
|
15707
|
+
return objs.filter(Boolean).map((o) => ({ name: String(field3(o, "Name") ?? ""), id: field3(o, "ProfileId") })).filter((p) => p.name && Buffer.isBuffer(p.id));
|
|
15708
|
+
}
|
|
15709
|
+
function chooseProfile(c) {
|
|
15710
|
+
const name = wanted ?? (process.env.ROON_PROFILE?.trim() || void 0);
|
|
15711
|
+
if (!name) {
|
|
15712
|
+
c.useProfile(void 0);
|
|
15713
|
+
return;
|
|
15714
|
+
}
|
|
15715
|
+
const all = profilesOf(c), p = all.find((x) => x.name.toLowerCase() === name.toLowerCase());
|
|
15716
|
+
if (!p) throw new RoonError(`No Roon profile called "${name}" \u2014 the profiles: ${all.map((x) => x.name).join(", ") || "none found"}`, "invalid");
|
|
15717
|
+
c.useProfile(p.id);
|
|
15718
|
+
}
|
|
15719
|
+
function profileInUse(c) {
|
|
15720
|
+
const id = c.profile();
|
|
15721
|
+
return profilesOf(c).find((p) => p.id.equals(id))?.name;
|
|
15722
|
+
}
|
|
15688
15723
|
function findTarget() {
|
|
15689
15724
|
if (target) return Promise.resolve(target);
|
|
15690
15725
|
finding ??= locate().finally(() => {
|
|
@@ -15765,13 +15800,17 @@ async function open3() {
|
|
|
15765
15800
|
return c;
|
|
15766
15801
|
}
|
|
15767
15802
|
function withCore(work2) {
|
|
15803
|
+
const mine = asked.getStore();
|
|
15768
15804
|
const task = queue.then(async () => {
|
|
15769
15805
|
if (idleTimer) {
|
|
15770
15806
|
clearTimeout(idleTimer);
|
|
15771
15807
|
idleTimer = null;
|
|
15772
15808
|
}
|
|
15809
|
+
wanted = mine;
|
|
15773
15810
|
try {
|
|
15774
|
-
|
|
15811
|
+
const c = await open3();
|
|
15812
|
+
chooseProfile(c);
|
|
15813
|
+
return await work2(c);
|
|
15775
15814
|
} catch (e) {
|
|
15776
15815
|
if (!(e instanceof RoonError && (e.kind === "not_found" || e.kind === "invalid"))) close("after an error");
|
|
15777
15816
|
throw e;
|
|
@@ -15785,7 +15824,9 @@ function withCore(work2) {
|
|
|
15785
15824
|
}
|
|
15786
15825
|
async function fresh() {
|
|
15787
15826
|
close("a fresh graph");
|
|
15788
|
-
|
|
15827
|
+
const c = await open3();
|
|
15828
|
+
chooseProfile(c);
|
|
15829
|
+
return c;
|
|
15789
15830
|
}
|
|
15790
15831
|
function closeSoon(reason) {
|
|
15791
15832
|
close(reason);
|
|
@@ -15793,10 +15834,11 @@ function closeSoon(reason) {
|
|
|
15793
15834
|
function shutdown() {
|
|
15794
15835
|
close("shutting down");
|
|
15795
15836
|
}
|
|
15796
|
-
var IDLE_MS, INTERNAL_PORT, target, client, idleTimer, queue, onFirstConnect, finding;
|
|
15837
|
+
var import_node_async_hooks, IDLE_MS, INTERNAL_PORT, target, client, idleTimer, queue, onFirstConnect, asked, wanted, finding;
|
|
15797
15838
|
var init_session = __esm({
|
|
15798
15839
|
"src/core/session.ts"() {
|
|
15799
15840
|
"use strict";
|
|
15841
|
+
import_node_async_hooks = require("node:async_hooks");
|
|
15800
15842
|
init_intern();
|
|
15801
15843
|
init_discover();
|
|
15802
15844
|
init_errors();
|
|
@@ -15811,6 +15853,11 @@ var init_session = __esm({
|
|
|
15811
15853
|
queue = Promise.resolve();
|
|
15812
15854
|
onFirstConnect = null;
|
|
15813
15855
|
__name(afterFirstConnect, "afterFirstConnect");
|
|
15856
|
+
asked = new import_node_async_hooks.AsyncLocalStorage();
|
|
15857
|
+
__name(asProfile, "asProfile");
|
|
15858
|
+
__name(profilesOf, "profilesOf");
|
|
15859
|
+
__name(chooseProfile, "chooseProfile");
|
|
15860
|
+
__name(profileInUse, "profileInUse");
|
|
15814
15861
|
finding = null;
|
|
15815
15862
|
__name(findTarget, "findTarget");
|
|
15816
15863
|
__name(locate, "locate");
|
|
@@ -16040,11 +16087,11 @@ function signedIn(c, s) {
|
|
|
16040
16087
|
const st = field2(o, "LoginStatus");
|
|
16041
16088
|
return st === void 0 || st === 4 ? o : null;
|
|
16042
16089
|
}
|
|
16043
|
-
function streaming(c,
|
|
16044
|
-
if (
|
|
16045
|
-
const o = signedIn(c,
|
|
16046
|
-
if (!o) throw new RoonError(`${SERVICE_NAME[
|
|
16047
|
-
return { service:
|
|
16090
|
+
function streaming(c, wanted2) {
|
|
16091
|
+
if (wanted2) {
|
|
16092
|
+
const o = signedIn(c, wanted2);
|
|
16093
|
+
if (!o) throw new RoonError(`${SERVICE_NAME[wanted2]} isn't signed in on this Roon Core`, "unavailable");
|
|
16094
|
+
return { service: wanted2, o };
|
|
16048
16095
|
}
|
|
16049
16096
|
for (const s of ["qobuz", "tidal"]) {
|
|
16050
16097
|
const o = signedIn(c, s);
|
|
@@ -16074,9 +16121,9 @@ async function search(query, limit3, kind) {
|
|
|
16074
16121
|
return { query, rows };
|
|
16075
16122
|
});
|
|
16076
16123
|
}
|
|
16077
|
-
async function section(name, limit3, offset2, genres2 = [],
|
|
16124
|
+
async function section(name, limit3, offset2, genres2 = [], wanted2, what = "albums") {
|
|
16078
16125
|
return withCore(async (c) => {
|
|
16079
|
-
const { service: service2, o } = streaming(c,
|
|
16126
|
+
const { service: service2, o } = streaming(c, wanted2);
|
|
16080
16127
|
const methods = SECTIONS[service2];
|
|
16081
16128
|
if (!methods[name] && !(service2 === "tidal" && genres2.length)) throw new RoonError(`${SERVICE_NAME[service2]} has no shelf "${name}"; choose from ${Object.keys(methods).join(", ")}`, "invalid");
|
|
16082
16129
|
if (what === "tracks" && service2 !== "tidal") throw new RoonError("Shelves of tracks are TIDAL's; Qobuz's shelves are albums", "invalid");
|
|
@@ -16161,9 +16208,9 @@ function tidalStruct(c, type, g) {
|
|
|
16161
16208
|
{ name: `string ${T}::Path`, propType: 20, value: new BinaryWriter().string(g.path).toBuffer() }
|
|
16162
16209
|
]);
|
|
16163
16210
|
}
|
|
16164
|
-
async function genres(parent,
|
|
16211
|
+
async function genres(parent, wanted2) {
|
|
16165
16212
|
return withCore(async (c) => {
|
|
16166
|
-
const { service: service2, o } = streaming(c,
|
|
16213
|
+
const { service: service2, o } = streaming(c, wanted2);
|
|
16167
16214
|
if (service2 === "tidal") {
|
|
16168
16215
|
if (parent) throw new RoonError("TIDAL's genres have no sub-genres", "invalid");
|
|
16169
16216
|
const [g, m] = [await tidalList(c, o, "GetGenres"), await tidalList(c, o, "GetMoods")];
|
|
@@ -16398,9 +16445,9 @@ async function bio(key, max, wiki) {
|
|
|
16398
16445
|
};
|
|
16399
16446
|
});
|
|
16400
16447
|
}
|
|
16401
|
-
async function discography(key,
|
|
16448
|
+
async function discography(key, wanted2) {
|
|
16402
16449
|
return withCore(async (c) => {
|
|
16403
|
-
const { service: service2, o: q } = streaming(c,
|
|
16450
|
+
const { service: service2, o: q } = streaming(c, wanted2);
|
|
16404
16451
|
const pv = await performer(c, key);
|
|
16405
16452
|
const end = Date.now() + 1500;
|
|
16406
16453
|
while (Date.now() < end && field2(c.graph.getObject(pv.$ref), "Name") === void 0) await wait(40);
|
|
@@ -16696,10 +16743,10 @@ async function focusMembers(c, f, people = ["artist", "composer", "producer"]) {
|
|
|
16696
16743
|
}
|
|
16697
16744
|
if (f.year_from && f.year_from > 1e3) m.push({ name: "MinDate", propType: 23, value: dateValue(f.year_from, 0, 0) });
|
|
16698
16745
|
if (f.year_to && f.year_to > 1e3) m.push({ name: "MaxDate", propType: 23, value: dateValue(f.year_to, 12, 31) });
|
|
16699
|
-
const
|
|
16700
|
-
if (
|
|
16746
|
+
const wanted2 = [["artist", "artists", "RequirePerformers"], ["composer", "composers", "RequireComposers"], ["producer", "producers", "RequireProduction"]].filter(([p]) => people.includes(p) && f[p]);
|
|
16747
|
+
if (wanted2.length) {
|
|
16701
16748
|
const whole = await albumInfo(c, []);
|
|
16702
|
-
for (const [p, list, member2] of
|
|
16749
|
+
for (const [p, list, member2] of wanted2) {
|
|
16703
16750
|
const want = String(f[p]);
|
|
16704
16751
|
const l = await panelList(c, whole, list, want);
|
|
16705
16752
|
const hit = l.find((x) => String(x.name).toLowerCase() === want.toLowerCase()) ?? l[0];
|
|
@@ -50536,8 +50583,10 @@ async function runImage(work2) {
|
|
|
50536
50583
|
__name(runImage, "runImage");
|
|
50537
50584
|
|
|
50538
50585
|
// src/tools/read.ts
|
|
50586
|
+
init_session();
|
|
50539
50587
|
var READ = { readOnlyHint: true, openWorldHint: false };
|
|
50540
50588
|
var service = external_exports.enum(["qobuz", "tidal"]).optional().describe("qobuz or tidal \u2014 default: Qobuz when it is signed in in Roon, else TIDAL.");
|
|
50589
|
+
var profile = external_exports.string().optional().describe("A Roon profile by name (roon_profiles lists them) \u2014 default: ROON_PROFILE, else the first profile.");
|
|
50541
50590
|
var limit = /* @__PURE__ */ __name((max, dflt) => external_exports.number().int().min(1).max(max).optional().describe(`How many (default ${dflt}, at most ${max}).`), "limit");
|
|
50542
50591
|
function registerReadTools(server, internal = true) {
|
|
50543
50592
|
const R = /* @__PURE__ */ __name((name) => internal || name === "roon_zones" || name === "roon_now_playing", "R");
|
|
@@ -50636,10 +50685,11 @@ function registerReadTools(server, internal = true) {
|
|
|
50636
50685
|
limit: limit(500, 30),
|
|
50637
50686
|
offset: external_exports.number().int().min(0).optional(),
|
|
50638
50687
|
since: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays from this date on (YYYY-MM-DD)."),
|
|
50639
|
-
before: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays before this date (YYYY-MM-DD).")
|
|
50688
|
+
before: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays before this date (YYYY-MM-DD)."),
|
|
50689
|
+
profile
|
|
50640
50690
|
},
|
|
50641
50691
|
annotations: READ
|
|
50642
|
-
}, ({ limit: n, offset: offset2, since, before }) => run(() => history(n ?? 30, offset2 ?? 0, before, since)));
|
|
50692
|
+
}, ({ limit: n, offset: offset2, since, before, profile: p }) => run(() => asProfile(p, () => history(n ?? 30, offset2 ?? 0, before, since))));
|
|
50643
50693
|
reg("roon_top", {
|
|
50644
50694
|
title: "Most played",
|
|
50645
50695
|
description: 'The most played albums, artists or tracks in Roon, counted over the WHOLE play history (a play counts when at least half the track was heard). Use this for "most listened" questions \u2014 don\'t tally roon_history yourself. `since` and `until` (YYYY-MM-DD) limit the period \u2014 Roon filters by date itself, however far back: "what did I play most in March 2019" is since 2019-03-01, until 2019-04-01.',
|
|
@@ -50647,10 +50697,17 @@ function registerReadTools(server, internal = true) {
|
|
|
50647
50697
|
what: external_exports.enum(["albums", "artists", "tracks"]).optional(),
|
|
50648
50698
|
limit: limit(100, 20),
|
|
50649
50699
|
since: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays from this date on (YYYY-MM-DD)."),
|
|
50650
|
-
until: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays before this date (YYYY-MM-DD).")
|
|
50700
|
+
until: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Only plays before this date (YYYY-MM-DD)."),
|
|
50701
|
+
profile
|
|
50651
50702
|
},
|
|
50652
50703
|
annotations: READ
|
|
50653
|
-
}, ({ what, limit: n, since, until }) => run(() => top(what ?? "albums", n ?? 20, since, until)));
|
|
50704
|
+
}, ({ what, limit: n, since, until, profile: p }) => run(() => asProfile(p, () => top(what ?? "albums", n ?? 20, since, until))));
|
|
50705
|
+
reg("roon_profiles", {
|
|
50706
|
+
title: "Roon profiles",
|
|
50707
|
+
description: "The profiles on this Roon Core, and the one Deep Roon uses (`in_use`). Deep Roon is a Roon remote of its own: switching profiles in a Roon app doesn't change it. The play history, most played, Daily Picks, Daily Mixes, New for you, favourites and Listen Later are per profile \u2014 those tools take `profile` (a name from here) for one question; ROON_PROFILE sets the default.",
|
|
50708
|
+
inputSchema: {},
|
|
50709
|
+
annotations: READ
|
|
50710
|
+
}, () => run(() => withCore(async (c) => ({ profiles: profilesOf(c).map((p) => p.name), in_use: profileInUse(c), default: process.env.ROON_PROFILE?.trim() || null }))));
|
|
50654
50711
|
}
|
|
50655
50712
|
__name(registerReadTools, "registerReadTools");
|
|
50656
50713
|
|
|
@@ -51044,7 +51101,12 @@ __name(findPlaylist, "findPlaylist");
|
|
|
51044
51101
|
|
|
51045
51102
|
// src/roon/more.ts
|
|
51046
51103
|
var profileObject = /* @__PURE__ */ __name((c) => {
|
|
51047
|
-
const
|
|
51104
|
+
const id = c.profile();
|
|
51105
|
+
const all = [...c.graph.objects.values()].filter((o) => o.typeName.endsWith(".Profile"));
|
|
51106
|
+
const p = all.find((o) => {
|
|
51107
|
+
const v = field2(o, "ProfileId");
|
|
51108
|
+
return Buffer.isBuffer(v) && v.equals(id);
|
|
51109
|
+
}) ?? all[0];
|
|
51048
51110
|
if (!p) throw new RoonError("Roon gave no profile");
|
|
51049
51111
|
return p;
|
|
51050
51112
|
}, "profileObject");
|
|
@@ -51602,6 +51664,9 @@ async function dspSet(zoneName, s) {
|
|
|
51602
51664
|
}
|
|
51603
51665
|
__name(dspSet, "dspSet");
|
|
51604
51666
|
|
|
51667
|
+
// src/tools/library.ts
|
|
51668
|
+
init_session();
|
|
51669
|
+
|
|
51605
51670
|
// src/roon/playlist-edit.ts
|
|
51606
51671
|
var import_node_crypto = require("node:crypto");
|
|
51607
51672
|
init_intern();
|
|
@@ -51848,6 +51913,7 @@ var PLAYS2 = { readOnlyHint: false, destructiveHint: false, openWorldHint: false
|
|
|
51848
51913
|
var CHANGES = { readOnlyHint: false, destructiveHint: true, openWorldHint: false };
|
|
51849
51914
|
var zone2 = external_exports.string().describe("A Roon zone name (see roon_zones).");
|
|
51850
51915
|
var mode2 = external_exports.enum(["now", "next", "queue"]).optional().describe("now (default), next, or queue (at the end).");
|
|
51916
|
+
var profile2 = external_exports.string().optional().describe("A Roon profile by name (roon_profiles lists them) \u2014 default: ROON_PROFILE, else the first profile.");
|
|
51851
51917
|
var limit2 = /* @__PURE__ */ __name((max, dflt) => external_exports.number().int().min(1).max(max).optional().describe(`How many (default ${dflt}, at most ${max}).`), "limit");
|
|
51852
51918
|
var offset = external_exports.number().int().min(0).optional().describe("Paging: where to start (in steps of `limit`).");
|
|
51853
51919
|
var days = external_exports.number().int().min(1).optional();
|
|
@@ -51958,27 +52024,27 @@ function registerLibraryTools(server) {
|
|
|
51958
52024
|
server.registerTool("roon_daily_picks", {
|
|
51959
52025
|
title: "Daily Picks",
|
|
51960
52026
|
description: 'Roon\'s Daily Picks from the Home screen \u2014 today\'s personal recommendations, in boxes. Each box has its `kind`, its `reason` (new_release; recent = from what was played lately; all_time = from long-term listening) and `because_you_played` \u2014 the album the box is built on \u2014 plus the recommended albums with a `key`. `limit` is per box (default 8). THE tool for "what does Roon recommend today", "my daily picks".',
|
|
51961
|
-
inputSchema: { limit: limit2(30, 8) },
|
|
52027
|
+
inputSchema: { limit: limit2(30, 8), profile: profile2 },
|
|
51962
52028
|
annotations: READ2
|
|
51963
|
-
}, ({ limit: n }) => run(() => dailyPicks(n ?? 8)));
|
|
52029
|
+
}, ({ limit: n, profile: p }) => run(() => asProfile(p, () => dailyPicks(n ?? 8))));
|
|
51964
52030
|
server.registerTool("roon_mix", {
|
|
51965
52031
|
title: "A Daily Mix's tracks",
|
|
51966
52032
|
description: "The tracks inside one of Roon's Daily Mixes (by `key` or name from roon_mixes), as Roon's mix page shows them before playing \u2014 each with a `key` for roon_play_tracks. To play the whole mix, roon_play_mix.",
|
|
51967
|
-
inputSchema: { key: external_exports.string().describe("A mix key or its name, from roon_mixes."), limit: limit2(300, 100) },
|
|
52033
|
+
inputSchema: { key: external_exports.string().describe("A mix key or its name, from roon_mixes."), limit: limit2(300, 100), profile: profile2 },
|
|
51968
52034
|
annotations: READ2
|
|
51969
|
-
}, ({ key, limit: n }) => run(() => mix(key, n ?? 100)));
|
|
52035
|
+
}, ({ key, limit: n, profile: p }) => run(() => asProfile(p, () => mix(key, n ?? 100))));
|
|
51970
52036
|
server.registerTool("roon_new_for_you", {
|
|
51971
52037
|
title: "New releases for you",
|
|
51972
52038
|
description: '"New releases for you" from Roon\'s Home: new albums Roon picked for this user, from the artists and music they listen to \u2014 personal, unlike roon_new (the streaming services\' editorial shelf, the same for everyone). Use it for "my new releases", "what\'s new for me". Albums carry year, format, `genres`, sometimes a `review`, and a `key`; `genres` at the top counts the shelf\'s top-level genres (the choices for `genre`).',
|
|
51973
|
-
inputSchema: { limit: limit2(100, 30), offset, genre: external_exports.string().optional().describe("Only albums of this genre (a Roon genre name, e.g. Jazz; sub-genres match too).") },
|
|
52039
|
+
inputSchema: { limit: limit2(100, 30), offset, genre: external_exports.string().optional().describe("Only albums of this genre (a Roon genre name, e.g. Jazz; sub-genres match too)."), profile: profile2 },
|
|
51974
52040
|
annotations: READ2
|
|
51975
|
-
}, ({ limit: n, offset: o, genre }) => run(() => newForYou(n ?? 30, o ?? 0, genre)));
|
|
52041
|
+
}, ({ limit: n, offset: o, genre, profile: p }) => run(() => asProfile(p, () => newForYou(n ?? 30, o ?? 0, genre))));
|
|
51976
52042
|
server.registerTool("roon_mixes", {
|
|
51977
52043
|
title: "Daily Mixes",
|
|
51978
52044
|
description: 'Roon\'s own Daily Mixes, from Roon\'s Home \u2014 NOT TIDAL\'s mixes: for "TIDAL mixes", "My Mix", "My Daily Discovery" or TIDAL\'s daily mixes use roon_tidal_playlists with `shelf: "my_mixes"`. These are today\'s personal Roon mixes, each built around an artist (or genre) the user listens to, with a few `touchstones` and a `key` for roon_play_mix. They change every day.',
|
|
51979
|
-
inputSchema: {},
|
|
52045
|
+
inputSchema: { profile: profile2 },
|
|
51980
52046
|
annotations: READ2
|
|
51981
|
-
}, () => run(() => mixes()));
|
|
52047
|
+
}, ({ profile: p }) => run(() => asProfile(p, () => mixes())));
|
|
51982
52048
|
server.registerTool("roon_play_mix", {
|
|
51983
52049
|
title: "Play a Daily Mix",
|
|
51984
52050
|
description: "Play one of today's Daily Mixes on a Roon zone (`key` from roon_mixes, or the mix's name). `mode`: now (default), next or queue. Only on an explicit request, never as a probe.",
|
|
@@ -52025,9 +52091,9 @@ function registerLibraryTools(server) {
|
|
|
52025
52091
|
server.registerTool("roon_favorites", {
|
|
52026
52092
|
title: "Favourite albums",
|
|
52027
52093
|
description: 'The user\'s favourite albums: `source: "roon"` (default) are the albums with a heart in Roon, newest first; `source: "qobuz"` or `"tidal"` the favourites at that service. Albums carry a `key`.',
|
|
52028
|
-
inputSchema: { source: external_exports.enum(["roon", "qobuz", "tidal"]).optional(), limit: limit2(100, 50) },
|
|
52094
|
+
inputSchema: { source: external_exports.enum(["roon", "qobuz", "tidal"]).optional(), limit: limit2(100, 50), profile: profile2 },
|
|
52029
52095
|
annotations: READ2
|
|
52030
|
-
}, ({ source, limit: n }) => run(() => favorites(source ?? "roon", n ?? 50)));
|
|
52096
|
+
}, ({ source, limit: n, profile: p }) => run(() => asProfile(p, () => favorites(source ?? "roon", n ?? 50))));
|
|
52031
52097
|
server.registerTool("roon_radio_favorite", {
|
|
52032
52098
|
title: "A station in My Live Radio",
|
|
52033
52099
|
description: "Put a Live Radio station in the user's own list (My Live Radio), or take it out (`on: false`). The `key` comes from roon_radio. Changes the user's library: only on an explicit request. Reads the result back.",
|
|
@@ -52043,9 +52109,9 @@ function registerLibraryTools(server) {
|
|
|
52043
52109
|
server.registerTool("roon_listen_later", {
|
|
52044
52110
|
title: "Listen Later",
|
|
52045
52111
|
description: "The user's Listen Later list in Roon: the albums (and tracks) marked to hear later, newest first, each with a `key`. By default only what still waits; `include_played: true` adds what has been heard since.",
|
|
52046
|
-
inputSchema: { include_played: external_exports.boolean().optional() },
|
|
52112
|
+
inputSchema: { include_played: external_exports.boolean().optional(), profile: profile2 },
|
|
52047
52113
|
annotations: READ2
|
|
52048
|
-
}, ({ include_played }) => run(() => listenLater(include_played === true)));
|
|
52114
|
+
}, ({ include_played, profile: p }) => run(() => asProfile(p, () => listenLater(include_played === true))));
|
|
52049
52115
|
server.registerTool("roon_listen_later_set", {
|
|
52050
52116
|
title: "Listen Later: add or remove",
|
|
52051
52117
|
description: "Put an album or a track on the Listen Later list in Roon, or take it off (`on: false`) \u2014 the natural thing to offer after recommending something the user can't hear right now. Changes the library: only on an explicit request. Reads it back.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deep-roon-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "An MCP server for Roon that reaches the parts the official API doesn't: reviews, biographies, Qobuz's and TIDAL's shelves, TIDAL's playlists, your history, search across your library and the streaming services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "René Bouwmeester <21277119+renebouwmeester@users.noreply.github.com>",
|