setlist-mcp 0.4.0 → 0.5.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/SKILL.md +3 -0
- package/dist/augment.js +21 -0
- package/dist/bundle.js +141 -3
- package/dist/client.js +4 -2
- package/dist/index.js +2 -0
- package/dist/tools/resolve.js +139 -0
- package/dist/tools/setlists.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for setlist.fm — concert setlists, artists, venues, and tours via the setlist.fm API",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.5.0"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "setlist.fm",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "MCP server for setlist.fm — search concert setlists, artists, venues, and tours via natural language",
|
|
18
|
-
"version": "0.
|
|
18
|
+
"version": "0.5.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
package/SKILL.md
CHANGED
|
@@ -116,6 +116,9 @@ setlist.fm's [API terms](https://www.setlist.fm/help/api-terms) bind anyone usin
|
|
|
116
116
|
|
|
117
117
|
## Notes
|
|
118
118
|
|
|
119
|
+
- **Stub setlists:** every setlist result carries `songCount` / `setCount` / `hasSongs`. A page can exist with no songs logged (`hasSongs: false`) — skip those without a second `get_setlist` call.
|
|
120
|
+
- **Disambiguate by location:** `artistName` + `date` can return shows in multiple cities. Add `cityName`/`cityId` or `venueName`/`venueId` to pin the right one (e.g. TSO on a date plays both Charlotte and Orlando).
|
|
121
|
+
- **All performers at a venue/festival on a day:** call `setlist_search_setlists` with `venueName` (or `venueId`) + `date` and **no** artist.
|
|
119
122
|
- IDs chain: `search_*` tools return the `mbid` / `setlistId` / `venueId` / `geoId` you feed into the `get_*` tools.
|
|
120
123
|
- **All dates are ISO `yyyy-MM-dd`** — both the `date`/`lastUpdated` inputs and every `eventDate` in the output. (The server translates to/from setlist.fm's native `dd-MM-yyyy` internally.)
|
|
121
124
|
- Results are paginated; pass `p` (1-based) to page through large result sets.
|
package/dist/augment.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function augmentSetlists(value) {
|
|
2
|
+
if (Array.isArray(value)) {
|
|
3
|
+
for (const item of value)
|
|
4
|
+
augmentSetlists(item);
|
|
5
|
+
}
|
|
6
|
+
else if (value !== null && typeof value === 'object') {
|
|
7
|
+
const obj = value;
|
|
8
|
+
const sets = obj.sets;
|
|
9
|
+
if (sets !== null && typeof sets === 'object') {
|
|
10
|
+
const raw = sets.set;
|
|
11
|
+
const list = Array.isArray(raw) ? raw : [];
|
|
12
|
+
const songCount = list.reduce((n, s) => n + (Array.isArray(s?.song) ? s.song.length : 0), 0);
|
|
13
|
+
obj.songCount = songCount;
|
|
14
|
+
obj.setCount = list.length;
|
|
15
|
+
obj.hasSongs = songCount > 0;
|
|
16
|
+
}
|
|
17
|
+
for (const key of Object.keys(obj))
|
|
18
|
+
augmentSetlists(obj[key]);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
package/dist/bundle.js
CHANGED
|
@@ -31258,11 +31258,33 @@ function toolAnnotations(opts = {}) {
|
|
|
31258
31258
|
}
|
|
31259
31259
|
|
|
31260
31260
|
// src/version.ts
|
|
31261
|
-
var VERSION = "0.
|
|
31261
|
+
var VERSION = "0.5.0";
|
|
31262
31262
|
|
|
31263
31263
|
// src/client.ts
|
|
31264
31264
|
import { dirname, join } from "path";
|
|
31265
31265
|
import { fileURLToPath } from "url";
|
|
31266
|
+
|
|
31267
|
+
// src/augment.ts
|
|
31268
|
+
function augmentSetlists(value) {
|
|
31269
|
+
if (Array.isArray(value)) {
|
|
31270
|
+
for (const item of value) augmentSetlists(item);
|
|
31271
|
+
} else if (value !== null && typeof value === "object") {
|
|
31272
|
+
const obj = value;
|
|
31273
|
+
const sets = obj.sets;
|
|
31274
|
+
if (sets !== null && typeof sets === "object") {
|
|
31275
|
+
const raw = sets.set;
|
|
31276
|
+
const list = Array.isArray(raw) ? raw : [];
|
|
31277
|
+
const songCount = list.reduce((n, s) => n + (Array.isArray(s?.song) ? s.song.length : 0), 0);
|
|
31278
|
+
obj.songCount = songCount;
|
|
31279
|
+
obj.setCount = list.length;
|
|
31280
|
+
obj.hasSongs = songCount > 0;
|
|
31281
|
+
}
|
|
31282
|
+
for (const key of Object.keys(obj)) augmentSetlists(obj[key]);
|
|
31283
|
+
}
|
|
31284
|
+
return value;
|
|
31285
|
+
}
|
|
31286
|
+
|
|
31287
|
+
// src/client.ts
|
|
31266
31288
|
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
31267
31289
|
await loadDotenvSafely({ path: join(__dirname, "..", ".env"), override: false });
|
|
31268
31290
|
var BASE_URL = "https://api.setlist.fm/rest";
|
|
@@ -31311,7 +31333,7 @@ var SetlistClient = class {
|
|
|
31311
31333
|
...opts.query !== void 0 ? { query: opts.query } : {},
|
|
31312
31334
|
...opts.body !== void 0 ? { body: opts.body } : {}
|
|
31313
31335
|
});
|
|
31314
|
-
return deepMapStringField(data, "eventDate", dmyToIso);
|
|
31336
|
+
return augmentSetlists(deepMapStringField(data, "eventDate", dmyToIso));
|
|
31315
31337
|
}
|
|
31316
31338
|
};
|
|
31317
31339
|
var client = new SetlistClient();
|
|
@@ -31383,7 +31405,7 @@ function registerSetlistTools(server) {
|
|
|
31383
31405
|
server.registerTool(
|
|
31384
31406
|
"setlist_search_setlists",
|
|
31385
31407
|
{
|
|
31386
|
-
description: "Search setlist.fm for concert setlists. Filter by any combination of artist, venue, city, country, tour, date, or year.
|
|
31408
|
+
description: "Search setlist.fm for concert setlists. Filter by any combination of artist, venue, city, country, tour, date, or year (provide at least one). Combine filters to disambiguate \u2014 artistName + date can span multiple cities, so add cityName/cityId or venueName/venueId to pin the exact show. Omit the artist and pass venueName/venueId + date to list EVERY performer at a venue or festival that day. Every result includes songCount, setCount, and hasSongs, so you can skip empty 'stub' setlists (hasSongs: false) without a second fetch." + ATTRIBUTION_NOTE,
|
|
31387
31409
|
annotations: { readOnlyHint: true },
|
|
31388
31410
|
inputSchema: {
|
|
31389
31411
|
artistName: external_exports.string().optional().describe("Artist name"),
|
|
@@ -31606,6 +31628,121 @@ function registerUserTools(server) {
|
|
|
31606
31628
|
);
|
|
31607
31629
|
}
|
|
31608
31630
|
|
|
31631
|
+
// src/tools/resolve.ts
|
|
31632
|
+
var MAX_BATCH = 24;
|
|
31633
|
+
function songCountOf(s) {
|
|
31634
|
+
const sets = Array.isArray(s.sets?.set) ? s.sets.set : [];
|
|
31635
|
+
return sets.reduce((n, set2) => n + (Array.isArray(set2?.song) ? set2.song.length : 0), 0);
|
|
31636
|
+
}
|
|
31637
|
+
function normalizeArtist(name) {
|
|
31638
|
+
return name.replace(/["'’‘”“]/g, "").replace(/\s*[+&]\s*/g, " and ").replace(/\./g, "").replace(/\s+/g, " ").trim();
|
|
31639
|
+
}
|
|
31640
|
+
async function emptyOn404(run, fallback) {
|
|
31641
|
+
try {
|
|
31642
|
+
return await run();
|
|
31643
|
+
} catch (err) {
|
|
31644
|
+
if (/\b404\b/.test(messageOf(err))) return fallback;
|
|
31645
|
+
throw err;
|
|
31646
|
+
}
|
|
31647
|
+
}
|
|
31648
|
+
async function searchSetlists(query) {
|
|
31649
|
+
return emptyOn404(async () => {
|
|
31650
|
+
const data = await client.request("GET", "/1.0/search/setlists", {
|
|
31651
|
+
query
|
|
31652
|
+
});
|
|
31653
|
+
return data?.setlist ?? [];
|
|
31654
|
+
}, []);
|
|
31655
|
+
}
|
|
31656
|
+
async function topArtistMbid(artistName) {
|
|
31657
|
+
return emptyOn404(async () => {
|
|
31658
|
+
const data = await client.request("GET", "/1.0/search/artists", {
|
|
31659
|
+
query: { artistName, sort: "relevance" }
|
|
31660
|
+
});
|
|
31661
|
+
return data?.artist?.[0]?.mbid;
|
|
31662
|
+
}, void 0);
|
|
31663
|
+
}
|
|
31664
|
+
function score(s, city, venue) {
|
|
31665
|
+
let sc = 0;
|
|
31666
|
+
const vn = s.venue?.name?.toLowerCase() ?? "";
|
|
31667
|
+
const cn = s.venue?.city?.name?.toLowerCase() ?? "";
|
|
31668
|
+
if (venue && vn.includes(venue.toLowerCase())) sc += 4;
|
|
31669
|
+
if (city && cn.includes(city.toLowerCase())) sc += 2;
|
|
31670
|
+
if (songCountOf(s) > 0) sc += 1;
|
|
31671
|
+
return sc;
|
|
31672
|
+
}
|
|
31673
|
+
function pickBest(list, city, venue) {
|
|
31674
|
+
if (list.length === 0) return void 0;
|
|
31675
|
+
return [...list].sort((a, b) => score(b, city, venue) - score(a, city, venue) || songCountOf(b) - songCountOf(a))[0];
|
|
31676
|
+
}
|
|
31677
|
+
async function resolveOne(c) {
|
|
31678
|
+
const filters = {
|
|
31679
|
+
date: isoToDmy(c.date),
|
|
31680
|
+
...c.city ? { cityName: c.city } : {},
|
|
31681
|
+
...c.venue ? { venueName: c.venue } : {}
|
|
31682
|
+
};
|
|
31683
|
+
let list = await searchSetlists({ artistName: c.artist, ...filters });
|
|
31684
|
+
if (list.length === 0) {
|
|
31685
|
+
const mbid = await topArtistMbid(c.artist);
|
|
31686
|
+
if (mbid) list = await searchSetlists({ artistMbid: mbid, ...filters });
|
|
31687
|
+
}
|
|
31688
|
+
if (list.length === 0) {
|
|
31689
|
+
const norm = normalizeArtist(c.artist);
|
|
31690
|
+
if (norm && norm.toLowerCase() !== c.artist.toLowerCase()) {
|
|
31691
|
+
list = await searchSetlists({ artistName: norm, ...filters });
|
|
31692
|
+
}
|
|
31693
|
+
}
|
|
31694
|
+
const best = pickBest(list, c.city, c.venue);
|
|
31695
|
+
if (!best) return { input: c, match: null, alternatives: 0 };
|
|
31696
|
+
const songCount = songCountOf(best);
|
|
31697
|
+
return {
|
|
31698
|
+
input: c,
|
|
31699
|
+
match: {
|
|
31700
|
+
setlistId: best.id,
|
|
31701
|
+
url: best.url,
|
|
31702
|
+
eventDate: best.eventDate,
|
|
31703
|
+
// already ISO (normalized by client.request)
|
|
31704
|
+
artist: best.artist?.name,
|
|
31705
|
+
venue: best.venue?.name,
|
|
31706
|
+
city: best.venue?.city?.name,
|
|
31707
|
+
tour: best.tour?.name,
|
|
31708
|
+
songCount,
|
|
31709
|
+
hasSongs: songCount > 0
|
|
31710
|
+
},
|
|
31711
|
+
alternatives: list.length - 1
|
|
31712
|
+
};
|
|
31713
|
+
}
|
|
31714
|
+
function registerResolveTools(server) {
|
|
31715
|
+
server.registerTool(
|
|
31716
|
+
"setlist_resolve_concerts",
|
|
31717
|
+
{
|
|
31718
|
+
description: "Resolve many concerts to their setlists in ONE call (instead of 2+ per show). Given up to 24 `{artist, date, city?, venue?}`, returns the best-match setlist for each \u2014 `{setlistId, url, eventDate, artist, venue, city, tour, songCount, hasSongs}` \u2014 plus a `{matched, stubs, unmatched}` summary. For each: searches artist + date (narrowed by your city/venue), and on a miss falls back to a relevance artist lookup (by mbid) and a punctuation-normalized name so format variants still resolve. `hasSongs: false` flags an empty stub page. Processed sequentially to respect setlist.fm's rate limit; chunk lists longer than 24 across calls." + ATTRIBUTION_NOTE,
|
|
31719
|
+
annotations: { readOnlyHint: true },
|
|
31720
|
+
inputSchema: {
|
|
31721
|
+
concerts: external_exports.array(
|
|
31722
|
+
external_exports.object({
|
|
31723
|
+
artist: external_exports.string().describe("Artist name"),
|
|
31724
|
+
date: external_exports.string().describe("Event date, ISO yyyy-MM-dd (e.g. 2025-08-28)"),
|
|
31725
|
+
city: external_exports.string().optional().describe("City to disambiguate multi-city dates (optional)"),
|
|
31726
|
+
venue: external_exports.string().optional().describe("Venue to disambiguate (optional)")
|
|
31727
|
+
})
|
|
31728
|
+
).min(1).max(MAX_BATCH).describe(`Concerts to resolve (1\u2013${MAX_BATCH} per call)`)
|
|
31729
|
+
}
|
|
31730
|
+
},
|
|
31731
|
+
async ({ concerts }) => {
|
|
31732
|
+
const results = [];
|
|
31733
|
+
for (const c of concerts) {
|
|
31734
|
+
results.push(await resolveOne(c));
|
|
31735
|
+
}
|
|
31736
|
+
const matched = results.filter((r) => r.match).length;
|
|
31737
|
+
const stubs = results.filter((r) => r.match && !r.match.hasSongs).length;
|
|
31738
|
+
return textResult({
|
|
31739
|
+
results,
|
|
31740
|
+
summary: { total: results.length, matched, stubs, unmatched: results.length - matched }
|
|
31741
|
+
});
|
|
31742
|
+
}
|
|
31743
|
+
);
|
|
31744
|
+
}
|
|
31745
|
+
|
|
31609
31746
|
// src/tools/utilities.ts
|
|
31610
31747
|
function registerUtilityTools(server) {
|
|
31611
31748
|
server.registerTool(
|
|
@@ -31657,6 +31794,7 @@ await runMcp({
|
|
|
31657
31794
|
registerVenueTools,
|
|
31658
31795
|
registerGeoTools,
|
|
31659
31796
|
registerUserTools,
|
|
31797
|
+
registerResolveTools,
|
|
31660
31798
|
registerUtilityTools
|
|
31661
31799
|
]
|
|
31662
31800
|
});
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { dirname, join } from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { loadDotenvSafely, readEnvVar, createApiClient, deepMapStringField, dmyToIso, } from '@chrischall/mcp-utils';
|
|
4
|
+
import { augmentSetlists } from './augment.js';
|
|
4
5
|
// Load .env for local dev; silently skip if dotenv is unavailable (e.g. the
|
|
5
6
|
// mcpb bundle). `loadDotenvSafely` swallows a missing dotenv module and never
|
|
6
7
|
// lets .env override a host-provided value.
|
|
@@ -61,8 +62,9 @@ export class SetlistClient {
|
|
|
61
62
|
...(opts.query !== undefined ? { query: opts.query } : {}),
|
|
62
63
|
...(opts.body !== undefined ? { body: opts.body } : {}),
|
|
63
64
|
});
|
|
64
|
-
// Surface every date as ISO yyyy-MM-dd (the API returns eventDate as dd-MM-yyyy)
|
|
65
|
-
|
|
65
|
+
// Surface every date as ISO yyyy-MM-dd (the API returns eventDate as dd-MM-yyyy),
|
|
66
|
+
// and annotate setlists with songCount/setCount/hasSongs so stubs are visible.
|
|
67
|
+
return augmentSetlists(deepMapStringField(data, 'eventDate', dmyToIso));
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
/**
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { registerSetlistTools } from './tools/setlists.js';
|
|
|
6
6
|
import { registerVenueTools } from './tools/venues.js';
|
|
7
7
|
import { registerGeoTools } from './tools/geo.js';
|
|
8
8
|
import { registerUserTools } from './tools/users.js';
|
|
9
|
+
import { registerResolveTools } from './tools/resolve.js';
|
|
9
10
|
import { registerUtilityTools } from './tools/utilities.js';
|
|
10
11
|
// The setlist.fm client is a module-level singleton (imported by each tool
|
|
11
12
|
// module) that defers its config error to the first request. That preserves the
|
|
@@ -22,6 +23,7 @@ await runMcp({
|
|
|
22
23
|
registerVenueTools,
|
|
23
24
|
registerGeoTools,
|
|
24
25
|
registerUserTools,
|
|
26
|
+
registerResolveTools,
|
|
25
27
|
registerUtilityTools,
|
|
26
28
|
],
|
|
27
29
|
});
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { textResult, isoToDmy, messageOf } from '@chrischall/mcp-utils';
|
|
3
|
+
import { client } from '../client.js';
|
|
4
|
+
import { ATTRIBUTION_NOTE } from '../attribution.js';
|
|
5
|
+
const MAX_BATCH = 24;
|
|
6
|
+
function songCountOf(s) {
|
|
7
|
+
const sets = Array.isArray(s.sets?.set) ? s.sets.set : [];
|
|
8
|
+
return sets.reduce((n, set) => n + (Array.isArray(set?.song) ? set.song.length : 0), 0);
|
|
9
|
+
}
|
|
10
|
+
// Loosen punctuation/format variants for a fuzzy retry: drop quotes, turn + / &
|
|
11
|
+
// into "and", drop stray periods, collapse whitespace. (Dan + Shay, "Weird Al"
|
|
12
|
+
// Yankovic, DJ Pee .Wee.)
|
|
13
|
+
function normalizeArtist(name) {
|
|
14
|
+
return name
|
|
15
|
+
.replace(/["'’‘”“]/g, '')
|
|
16
|
+
.replace(/\s*[+&]\s*/g, ' and ')
|
|
17
|
+
.replace(/\./g, '')
|
|
18
|
+
.replace(/\s+/g, ' ')
|
|
19
|
+
.trim();
|
|
20
|
+
}
|
|
21
|
+
// A no-match search returns HTTP 404 from setlist.fm — treat that as "empty",
|
|
22
|
+
// not an error; let anything else propagate.
|
|
23
|
+
async function emptyOn404(run, fallback) {
|
|
24
|
+
try {
|
|
25
|
+
return await run();
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
if (/\b404\b/.test(messageOf(err)))
|
|
29
|
+
return fallback;
|
|
30
|
+
throw err;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async function searchSetlists(query) {
|
|
34
|
+
return emptyOn404(async () => {
|
|
35
|
+
const data = await client.request('GET', '/1.0/search/setlists', {
|
|
36
|
+
query,
|
|
37
|
+
});
|
|
38
|
+
return data?.setlist ?? [];
|
|
39
|
+
}, []);
|
|
40
|
+
}
|
|
41
|
+
async function topArtistMbid(artistName) {
|
|
42
|
+
return emptyOn404(async () => {
|
|
43
|
+
const data = await client.request('GET', '/1.0/search/artists', {
|
|
44
|
+
query: { artistName, sort: 'relevance' },
|
|
45
|
+
});
|
|
46
|
+
return data?.artist?.[0]?.mbid;
|
|
47
|
+
}, undefined);
|
|
48
|
+
}
|
|
49
|
+
function score(s, city, venue) {
|
|
50
|
+
let sc = 0;
|
|
51
|
+
const vn = s.venue?.name?.toLowerCase() ?? '';
|
|
52
|
+
const cn = s.venue?.city?.name?.toLowerCase() ?? '';
|
|
53
|
+
if (venue && vn.includes(venue.toLowerCase()))
|
|
54
|
+
sc += 4;
|
|
55
|
+
if (city && cn.includes(city.toLowerCase()))
|
|
56
|
+
sc += 2;
|
|
57
|
+
if (songCountOf(s) > 0)
|
|
58
|
+
sc += 1;
|
|
59
|
+
return sc;
|
|
60
|
+
}
|
|
61
|
+
function pickBest(list, city, venue) {
|
|
62
|
+
if (list.length === 0)
|
|
63
|
+
return undefined;
|
|
64
|
+
// Best location/song score wins; prefer a populated setlist on ties via songCount.
|
|
65
|
+
return [...list].sort((a, b) => score(b, city, venue) - score(a, city, venue) || songCountOf(b) - songCountOf(a))[0];
|
|
66
|
+
}
|
|
67
|
+
async function resolveOne(c) {
|
|
68
|
+
const filters = {
|
|
69
|
+
date: isoToDmy(c.date),
|
|
70
|
+
...(c.city ? { cityName: c.city } : {}),
|
|
71
|
+
...(c.venue ? { venueName: c.venue } : {}),
|
|
72
|
+
};
|
|
73
|
+
let list = await searchSetlists({ artistName: c.artist, ...filters });
|
|
74
|
+
// Fuzzy fallback 1: resolve the artist via the (more forgiving) relevance
|
|
75
|
+
// search, then query by its mbid.
|
|
76
|
+
if (list.length === 0) {
|
|
77
|
+
const mbid = await topArtistMbid(c.artist);
|
|
78
|
+
if (mbid)
|
|
79
|
+
list = await searchSetlists({ artistMbid: mbid, ...filters });
|
|
80
|
+
}
|
|
81
|
+
// Fuzzy fallback 2: a punctuation-normalized name.
|
|
82
|
+
if (list.length === 0) {
|
|
83
|
+
const norm = normalizeArtist(c.artist);
|
|
84
|
+
if (norm && norm.toLowerCase() !== c.artist.toLowerCase()) {
|
|
85
|
+
list = await searchSetlists({ artistName: norm, ...filters });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const best = pickBest(list, c.city, c.venue);
|
|
89
|
+
if (!best)
|
|
90
|
+
return { input: c, match: null, alternatives: 0 };
|
|
91
|
+
const songCount = songCountOf(best);
|
|
92
|
+
return {
|
|
93
|
+
input: c,
|
|
94
|
+
match: {
|
|
95
|
+
setlistId: best.id,
|
|
96
|
+
url: best.url,
|
|
97
|
+
eventDate: best.eventDate, // already ISO (normalized by client.request)
|
|
98
|
+
artist: best.artist?.name,
|
|
99
|
+
venue: best.venue?.name,
|
|
100
|
+
city: best.venue?.city?.name,
|
|
101
|
+
tour: best.tour?.name,
|
|
102
|
+
songCount,
|
|
103
|
+
hasSongs: songCount > 0,
|
|
104
|
+
},
|
|
105
|
+
alternatives: list.length - 1,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export function registerResolveTools(server) {
|
|
109
|
+
server.registerTool('setlist_resolve_concerts', {
|
|
110
|
+
description: "Resolve many concerts to their setlists in ONE call (instead of 2+ per show). Given up to 24 `{artist, date, city?, venue?}`, returns the best-match setlist for each — `{setlistId, url, eventDate, artist, venue, city, tour, songCount, hasSongs}` — plus a `{matched, stubs, unmatched}` summary. For each: searches artist + date (narrowed by your city/venue), and on a miss falls back to a relevance artist lookup (by mbid) and a punctuation-normalized name so format variants still resolve. `hasSongs: false` flags an empty stub page. Processed sequentially to respect setlist.fm's rate limit; chunk lists longer than 24 across calls." +
|
|
111
|
+
ATTRIBUTION_NOTE,
|
|
112
|
+
annotations: { readOnlyHint: true },
|
|
113
|
+
inputSchema: {
|
|
114
|
+
concerts: z
|
|
115
|
+
.array(z.object({
|
|
116
|
+
artist: z.string().describe('Artist name'),
|
|
117
|
+
date: z.string().describe('Event date, ISO yyyy-MM-dd (e.g. 2025-08-28)'),
|
|
118
|
+
city: z.string().optional().describe('City to disambiguate multi-city dates (optional)'),
|
|
119
|
+
venue: z.string().optional().describe('Venue to disambiguate (optional)'),
|
|
120
|
+
}))
|
|
121
|
+
.min(1)
|
|
122
|
+
.max(MAX_BATCH)
|
|
123
|
+
.describe(`Concerts to resolve (1–${MAX_BATCH} per call)`),
|
|
124
|
+
},
|
|
125
|
+
}, async ({ concerts }) => {
|
|
126
|
+
const results = [];
|
|
127
|
+
// Sequential on purpose: one request at a time keeps us within setlist.fm's
|
|
128
|
+
// ~2 req/sec limit (the client also retries once on a 429).
|
|
129
|
+
for (const c of concerts) {
|
|
130
|
+
results.push((await resolveOne(c)));
|
|
131
|
+
}
|
|
132
|
+
const matched = results.filter((r) => r.match).length;
|
|
133
|
+
const stubs = results.filter((r) => r.match && !r.match.hasSongs).length;
|
|
134
|
+
return textResult({
|
|
135
|
+
results,
|
|
136
|
+
summary: { total: results.length, matched, stubs, unmatched: results.length - matched },
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
package/dist/tools/setlists.js
CHANGED
|
@@ -13,7 +13,7 @@ const page = z
|
|
|
13
13
|
.describe('Result page number (defaults to 1)');
|
|
14
14
|
export function registerSetlistTools(server) {
|
|
15
15
|
server.registerTool('setlist_search_setlists', {
|
|
16
|
-
description: "Search setlist.fm for concert setlists. Filter by any combination of artist, venue, city, country, tour, date, or year.
|
|
16
|
+
description: "Search setlist.fm for concert setlists. Filter by any combination of artist, venue, city, country, tour, date, or year (provide at least one). Combine filters to disambiguate — artistName + date can span multiple cities, so add cityName/cityId or venueName/venueId to pin the exact show. Omit the artist and pass venueName/venueId + date to list EVERY performer at a venue or festival that day. Every result includes songCount, setCount, and hasSongs, so you can skip empty 'stub' setlists (hasSongs: false) without a second fetch." +
|
|
17
17
|
ATTRIBUTION_NOTE,
|
|
18
18
|
annotations: { readOnlyHint: true },
|
|
19
19
|
inputSchema: {
|
package/dist/version.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// release-please-config.json's `extra-files`), and `versionSyncTest` guards
|
|
4
4
|
// that it stays equal to package.json. Import VERSION wherever the version is
|
|
5
5
|
// needed rather than re-declaring it.
|
|
6
|
-
export const VERSION = '0.
|
|
6
|
+
export const VERSION = '0.5.0'; // x-release-please-version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "setlist-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"mcpName": "io.github.chrischall/setlist-mcp",
|
|
5
5
|
"description": "setlist.fm MCP server for Claude — developed and maintained by AI (Claude Code)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/setlist-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.5.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "setlist-mcp",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.5.0",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|