@cyanheads/musicbrainz-mcp-server 0.2.0 → 0.3.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.
Files changed (79) hide show
  1. package/AGENTS.md +44 -13
  2. package/CLAUDE.md +44 -13
  3. package/Dockerfile +6 -3
  4. package/README.md +79 -125
  5. package/changelog/0.2.x/0.2.1.md +32 -0
  6. package/changelog/0.3.x/0.3.0.md +33 -0
  7. package/dist/config/server-config.d.ts +1 -0
  8. package/dist/config/server-config.d.ts.map +1 -1
  9. package/dist/config/server-config.js +5 -0
  10. package/dist/config/server-config.js.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/mcp-server/resources/definitions/entity.resource.d.ts.map +1 -1
  14. package/dist/mcp-server/resources/definitions/entity.resource.js +18 -6
  15. package/dist/mcp-server/resources/definitions/entity.resource.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/_pagination.d.ts +12 -0
  17. package/dist/mcp-server/tools/definitions/_pagination.d.ts.map +1 -0
  18. package/dist/mcp-server/tools/definitions/_pagination.js +52 -0
  19. package/dist/mcp-server/tools/definitions/_pagination.js.map +1 -0
  20. package/dist/mcp-server/tools/definitions/_shared.d.ts +2 -0
  21. package/dist/mcp-server/tools/definitions/_shared.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/_shared.js +22 -6
  23. package/dist/mcp-server/tools/definitions/_shared.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/browse-entities.tool.d.ts +15 -3
  25. package/dist/mcp-server/tools/definitions/browse-entities.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/browse-entities.tool.js +128 -31
  27. package/dist/mcp-server/tools/definitions/browse-entities.tool.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-artist.tool.d.ts +13 -0
  29. package/dist/mcp-server/tools/definitions/get-artist.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/get-artist.tool.js +53 -1
  31. package/dist/mcp-server/tools/definitions/get-artist.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/get-cover-art.tool.d.ts +7 -0
  33. package/dist/mcp-server/tools/definitions/get-cover-art.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/get-cover-art.tool.js +45 -8
  35. package/dist/mcp-server/tools/definitions/get-cover-art.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/get-label.tool.d.ts +15 -0
  37. package/dist/mcp-server/tools/definitions/get-label.tool.d.ts.map +1 -1
  38. package/dist/mcp-server/tools/definitions/get-label.tool.js +28 -4
  39. package/dist/mcp-server/tools/definitions/get-label.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/get-recording.tool.d.ts +13 -0
  41. package/dist/mcp-server/tools/definitions/get-recording.tool.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/definitions/get-recording.tool.js +27 -6
  43. package/dist/mcp-server/tools/definitions/get-recording.tool.js.map +1 -1
  44. package/dist/mcp-server/tools/definitions/get-release-group.tool.d.ts +4 -0
  45. package/dist/mcp-server/tools/definitions/get-release-group.tool.d.ts.map +1 -1
  46. package/dist/mcp-server/tools/definitions/get-release-group.tool.js +9 -3
  47. package/dist/mcp-server/tools/definitions/get-release-group.tool.js.map +1 -1
  48. package/dist/mcp-server/tools/definitions/get-release.tool.d.ts +24 -3
  49. package/dist/mcp-server/tools/definitions/get-release.tool.d.ts.map +1 -1
  50. package/dist/mcp-server/tools/definitions/get-release.tool.js +69 -8
  51. package/dist/mcp-server/tools/definitions/get-release.tool.js.map +1 -1
  52. package/dist/mcp-server/tools/definitions/get-work.tool.d.ts +8 -2
  53. package/dist/mcp-server/tools/definitions/get-work.tool.d.ts.map +1 -1
  54. package/dist/mcp-server/tools/definitions/get-work.tool.js +33 -5
  55. package/dist/mcp-server/tools/definitions/get-work.tool.js.map +1 -1
  56. package/dist/mcp-server/tools/definitions/index.d.ts +152 -53
  57. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  58. package/dist/mcp-server/tools/definitions/lookup-identifier.tool.d.ts +2 -2
  59. package/dist/mcp-server/tools/definitions/lookup-identifier.tool.d.ts.map +1 -1
  60. package/dist/mcp-server/tools/definitions/lookup-identifier.tool.js +26 -7
  61. package/dist/mcp-server/tools/definitions/lookup-identifier.tool.js.map +1 -1
  62. package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts +9 -1
  63. package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts.map +1 -1
  64. package/dist/mcp-server/tools/definitions/search-entities.tool.js +44 -14
  65. package/dist/mcp-server/tools/definitions/search-entities.tool.js.map +1 -1
  66. package/dist/services/musicbrainz/musicbrainz-service.d.ts +12 -3
  67. package/dist/services/musicbrainz/musicbrainz-service.d.ts.map +1 -1
  68. package/dist/services/musicbrainz/musicbrainz-service.js +22 -4
  69. package/dist/services/musicbrainz/musicbrainz-service.js.map +1 -1
  70. package/dist/services/musicbrainz/release-appearances.d.ts +16 -0
  71. package/dist/services/musicbrainz/release-appearances.d.ts.map +1 -0
  72. package/dist/services/musicbrainz/release-appearances.js +15 -0
  73. package/dist/services/musicbrainz/release-appearances.js.map +1 -0
  74. package/dist/services/musicbrainz/types.d.ts +13 -4
  75. package/dist/services/musicbrainz/types.d.ts.map +1 -1
  76. package/package.json +10 -9
  77. package/server.json +17 -3
  78. package/skills/musicbrainz-guide/SKILL.md +69 -0
  79. package/skills/musicbrainz-guide/references/query-syntax.md +23 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @fileoverview musicbrainz_get_work — work (a composition, the song as written,
3
- * distinct from any recording) by MBID: type, language(s), ISWCs, writer/composer/
4
- * lyricist relationships, and the recordings that perform it. The work lookup
3
+ * distinct from any recording) by MBID: type, language(s), ISWCs, work attributes, writer/composer/
4
+ * lyricist relationships, movements, arrangements, and the recordings that perform it. The work lookup
5
5
  * returns the first 25 recording relationships and every non-recording relation.
6
6
  * @module mcp-server/tools/definitions/get-work.tool
7
7
  */
@@ -12,7 +12,7 @@ import { sliceWorkRelations } from '../../../services/musicbrainz/work-relations
12
12
  import { AliasSchema, classifyMbidError, ExternalLinkSchema, MBID_EXAMPLE, MbidInput, normalizeAliases, normalizeRelations, normalizeTags, RelationSchema, renderAliases, renderExternalLinks, renderRelationships, renderTags, safeText, TagSchema, } from './_shared.js';
13
13
  export const getWorkTool = tool('musicbrainz_get_work', {
14
14
  title: 'musicbrainz-mcp-server: get work',
15
- description: 'Work (a composition, distinct from a recording) by MBID: type, languages, ISWCs, writers/composers/lyricists, aliases, tags, and external links. This server returns the first 25 recording relationships with their exact total and actual truncation disclosure, preserving all other relationships. Browse recording entities with musicbrainz_browse_entities (target_type=recording, link.work), then use musicbrainz_get_recording for work relationship attributes and dates; browse alone does not return those details.',
15
+ description: 'Work (a composition, distinct from a recording) by MBID: type, languages, ISWCs, ordered work attributes (rights-society registrations, musical key and other metadata), writers/composers/lyricists, movements, arrangements, aliases, tags, and external links. Attributes remain available when relationships are disabled. Follow work target MBIDs with this tool; direction, orderingKey, and targetDisambiguation distinguish parts and arrangements without reordering relationships. This server returns the first 25 recording relationships with their exact total and actual truncation disclosure, preserving all other relationships. Browse recording entities with musicbrainz_browse_entities (target_type=recording, link.work), then use musicbrainz_get_recording for work relationship attributes and dates; browse alone does not return those details.',
16
16
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
17
17
  errors: [
18
18
  {
@@ -33,7 +33,7 @@ export const getWorkTool = tool('musicbrainz_get_work', {
33
33
  inc_relationships: z
34
34
  .boolean()
35
35
  .default(true)
36
- .describe('Include writer/composer relationships, recording relationships, and external links.'),
36
+ .describe('Include writer/composer, movement/arrangement and recording relationships, and external links.'),
37
37
  }),
38
38
  output: z.object({
39
39
  mbid: z.string().describe('Work MBID.'),
@@ -42,6 +42,20 @@ export const getWorkTool = tool('musicbrainz_get_work', {
42
42
  type: z.string().optional().describe('Work type (Song, Symphony, …). Omitted when unknown.'),
43
43
  languages: z.array(z.string()).describe('Lyrics languages (ISO codes; may be empty).'),
44
44
  iswcs: z.array(z.string()).describe('ISWCs assigned to this work (may be empty).'),
45
+ attributes: z
46
+ .array(z
47
+ .object({
48
+ type: z
49
+ .string()
50
+ .optional()
51
+ .describe('Attribute type, such as a rights society or musical key. Omitted when unknown.'),
52
+ value: z
53
+ .string()
54
+ .optional()
55
+ .describe('Exact attribute value, preserving spaces and leading zeros. Omitted when unknown.'),
56
+ })
57
+ .describe('One work attribute; known members of sparse rows are preserved.'))
58
+ .describe('Work attributes in upstream order, including repeated types (may be empty).'),
45
59
  aliases: z.array(AliasSchema).describe('Alternate titles (may be empty).'),
46
60
  tags: z.array(TagSchema).describe('Community tags/genres (may be empty).'),
47
61
  relationships: z
@@ -75,7 +89,7 @@ export const getWorkTool = tool('musicbrainz_get_work', {
75
89
  const service = getMusicBrainzService();
76
90
  const inc = ['aliases', 'tags', 'genres'];
77
91
  if (input.inc_relationships)
78
- inc.push('artist-rels', 'recording-rels', 'url-rels');
92
+ inc.push('artist-rels', 'work-rels', 'recording-rels', 'url-rels');
79
93
  let raw;
80
94
  try {
81
95
  raw = await service.lookup('work', input.mbid, { inc }, ctx, { signal: ctx.signal });
@@ -100,6 +114,10 @@ export const getWorkTool = tool('musicbrainz_get_work', {
100
114
  ...(raw.type ? { type: raw.type } : {}),
101
115
  languages,
102
116
  iswcs: raw.iswcs ?? [],
117
+ attributes: (raw.attributes ?? []).map((attribute) => ({
118
+ ...(typeof attribute.type === 'string' ? { type: attribute.type } : {}),
119
+ ...(typeof attribute.value === 'string' ? { value: attribute.value } : {}),
120
+ })),
103
121
  aliases: normalizeAliases(raw.aliases),
104
122
  tags: normalizeTags(raw.tags ?? raw.genres),
105
123
  relationships,
@@ -117,6 +135,16 @@ export const getWorkTool = tool('musicbrainz_get_work', {
117
135
  lines.push(`**Languages:** ${result.languages.join(', ')}`);
118
136
  if (result.iswcs.length)
119
137
  lines.push(`**ISWCs:** ${result.iswcs.join(', ')}`);
138
+ if (result.attributes.length) {
139
+ lines.push('', '### Attributes');
140
+ for (const attribute of result.attributes) {
141
+ const members = [
142
+ attribute.type === undefined ? undefined : `type: ${safeText(`"${attribute.type}"`)}`,
143
+ attribute.value === undefined ? undefined : `value: ${safeText(`"${attribute.value}"`)}`,
144
+ ].filter((member) => member !== undefined);
145
+ lines.push(members.length ? `- ${members.join(', ')}` : '- Attribute metadata unavailable.');
146
+ }
147
+ }
120
148
  const tags = renderTags(result.tags);
121
149
  if (tags)
122
150
  lines.push(tags);
@@ -1 +1 @@
1
- {"version":3,"file":"get-work.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-work.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACtD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EACT,kgBAAkgB;IACpgB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAE9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,mHAAmH;YACzH,QAAQ,EAAE,0CAA0C,YAAY,gF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jC,KAAK,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"get-work.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-work.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACtD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EACT,+0BAA+0B;IACj1B,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAE9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,mHAAmH;YACzH,QAAQ,EAAE,0CAA0C,YAAY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YACJ,CAAC;QACH,CAAC;QACD,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -9,9 +9,12 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
9
9
  release: "release";
10
10
  "release-group": "release-group";
11
11
  }>>;
12
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
13
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
12
14
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
13
15
  mbid: import("zod").ZodString;
14
16
  entityType: import("zod").ZodString;
17
+ offset: import("zod").ZodNumber;
15
18
  representativeRelease: import("zod").ZodOptional<import("zod").ZodString>;
16
19
  images: import("zod").ZodArray<import("zod").ZodObject<{
17
20
  id: import("zod").ZodString;
@@ -37,52 +40,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
37
40
  readonly recovery: "No release or release-group exists with that MBID. Check that entity_type matches the MBID (a release-group MBID needs entity_type=release-group), or find the MBID with musicbrainz_search_entities.";
38
41
  }], {
39
42
  readonly hasArt: import("zod").ZodBoolean;
40
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
41
- }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
42
- mbid: import("zod").ZodString;
43
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
44
- mbid: import("zod").ZodString;
45
- title: import("zod").ZodString;
46
- disambiguation: import("zod").ZodOptional<import("zod").ZodString>;
47
- primaryType: import("zod").ZodOptional<import("zod").ZodString>;
48
- secondaryTypes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
49
- firstReleaseDate: import("zod").ZodOptional<import("zod").ZodString>;
50
- artistCredit: import("zod").ZodArray<import("zod").ZodObject<{
51
- name: import("zod").ZodString;
52
- artistId: import("zod").ZodString;
53
- artistName: import("zod").ZodString;
54
- joinPhrase: import("zod").ZodOptional<import("zod").ZodString>;
55
- }, import("zod/v4/core").$strip>>;
56
- artistCreditString: import("zod").ZodString;
57
- releases: import("zod").ZodArray<import("zod").ZodObject<{
58
- mbid: import("zod").ZodString;
59
- title: import("zod").ZodString;
60
- date: import("zod").ZodOptional<import("zod").ZodString>;
61
- country: import("zod").ZodOptional<import("zod").ZodString>;
62
- status: import("zod").ZodOptional<import("zod").ZodString>;
63
- disambiguation: import("zod").ZodOptional<import("zod").ZodString>;
64
- }, import("zod/v4/core").$strip>>;
65
- tags: import("zod").ZodArray<import("zod").ZodObject<{
66
- name: import("zod").ZodString;
67
- count: import("zod").ZodNumber;
68
- }, import("zod/v4/core").$strip>>;
69
- coverArt: import("zod").ZodOptional<import("zod").ZodObject<{
70
- exists: import("zod").ZodBoolean;
71
- count: import("zod").ZodOptional<import("zod").ZodNumber>;
72
- front: import("zod").ZodOptional<import("zod").ZodBoolean>;
73
- back: import("zod").ZodOptional<import("zod").ZodBoolean>;
74
- }, import("zod/v4/core").$strip>>;
75
- }, import("zod/v4/core").$strip>, readonly [{
76
- readonly reason: "invalid_mbid";
77
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
78
- readonly when: "The MBID is malformed or the all-zeros sentinel (rejected before fetch), or MusicBrainz rejects it with HTTP 400.";
79
- readonly recovery: "MBID must be a 36-character UUID (e.g. a74b1b7f-71a5-4011-9441-d0b5e4122711). Use musicbrainz_search_entities (entityType=release-group) to find one from a title.";
80
- }, {
81
- readonly reason: "entity_not_found";
82
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
83
- readonly when: "The MBID is well-formed but no release-group exists with it (MusicBrainz returns HTTP 404).";
84
- readonly recovery: "No release-group exists with that MBID. Verify the ID, or search by title with musicbrainz_search_entities.";
85
- }], {
43
+ readonly totalCount: import("zod").ZodNumber;
86
44
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
87
45
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
88
46
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
@@ -97,10 +55,11 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
97
55
  work: "work";
98
56
  }>;
99
57
  query: import("zod").ZodString;
100
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
58
+ limit: import("zod").ZodDefault<import("zod").ZodLazy<import("zod").ZodNumber>>;
101
59
  offset: import("zod").ZodDefault<import("zod").ZodNumber>;
102
60
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
103
61
  entityType: import("zod").ZodString;
62
+ offset: import("zod").ZodNumber;
104
63
  results: import("zod").ZodArray<import("zod").ZodObject<{
105
64
  mbid: import("zod").ZodString;
106
65
  name: import("zod").ZodString;
@@ -114,8 +73,15 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
114
73
  length: import("zod").ZodOptional<import("zod").ZodString>;
115
74
  isrcs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
116
75
  iswcs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
76
+ secondaryTypes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
77
+ firstReleaseDate: import("zod").ZodOptional<import("zod").ZodString>;
117
78
  }, import("zod/v4/core").$strip>>;
118
79
  }, import("zod/v4/core").$strip>, readonly [{
80
+ readonly reason: "search_window_exceeded";
81
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
82
+ readonly when: "The offset is at or beyond the 500-match search window.";
83
+ readonly recovery: "Use an offset below 500 and narrow the query, or use musicbrainz_browse_entities for complete linked sets.";
84
+ }, {
119
85
  readonly reason: "blank_query";
120
86
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
121
87
  readonly when: "The query contains only whitespace (it is blank after trimming).";
@@ -137,6 +103,17 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
137
103
  gender: import("zod").ZodOptional<import("zod").ZodString>;
138
104
  country: import("zod").ZodOptional<import("zod").ZodString>;
139
105
  area: import("zod").ZodOptional<import("zod").ZodString>;
106
+ areaId: import("zod").ZodOptional<import("zod").ZodString>;
107
+ beginArea: import("zod").ZodOptional<import("zod").ZodObject<{
108
+ mbid: import("zod").ZodOptional<import("zod").ZodString>;
109
+ name: import("zod").ZodOptional<import("zod").ZodString>;
110
+ }, import("zod/v4/core").$strip>>;
111
+ endArea: import("zod").ZodOptional<import("zod").ZodObject<{
112
+ mbid: import("zod").ZodOptional<import("zod").ZodString>;
113
+ name: import("zod").ZodOptional<import("zod").ZodString>;
114
+ }, import("zod/v4/core").$strip>>;
115
+ ipis: import("zod").ZodArray<import("zod").ZodString>;
116
+ isnis: import("zod").ZodArray<import("zod").ZodString>;
140
117
  lifeSpan: import("zod").ZodOptional<import("zod").ZodObject<{
141
118
  begin: import("zod").ZodOptional<import("zod").ZodString>;
142
119
  end: import("zod").ZodOptional<import("zod").ZodString>;
@@ -168,6 +145,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
168
145
  targetType: import("zod").ZodString;
169
146
  targetId: import("zod").ZodOptional<import("zod").ZodString>;
170
147
  targetName: import("zod").ZodOptional<import("zod").ZodString>;
148
+ targetDisambiguation: import("zod").ZodOptional<import("zod").ZodString>;
149
+ orderingKey: import("zod").ZodOptional<import("zod").ZodNumber>;
171
150
  begin: import("zod").ZodOptional<import("zod").ZodString>;
172
151
  end: import("zod").ZodOptional<import("zod").ZodString>;
173
152
  }, import("zod/v4/core").$strip>>;
@@ -192,6 +171,61 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
192
171
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
193
172
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
194
173
  mbid: import("zod").ZodString;
174
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
175
+ mbid: import("zod").ZodString;
176
+ title: import("zod").ZodString;
177
+ disambiguation: import("zod").ZodOptional<import("zod").ZodString>;
178
+ primaryType: import("zod").ZodOptional<import("zod").ZodString>;
179
+ secondaryTypes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
180
+ firstReleaseDate: import("zod").ZodOptional<import("zod").ZodString>;
181
+ artistCredit: import("zod").ZodArray<import("zod").ZodObject<{
182
+ name: import("zod").ZodString;
183
+ artistId: import("zod").ZodString;
184
+ artistName: import("zod").ZodString;
185
+ joinPhrase: import("zod").ZodOptional<import("zod").ZodString>;
186
+ }, import("zod/v4/core").$strip>>;
187
+ artistCreditString: import("zod").ZodString;
188
+ releases: import("zod").ZodArray<import("zod").ZodObject<{
189
+ mbid: import("zod").ZodString;
190
+ title: import("zod").ZodString;
191
+ date: import("zod").ZodOptional<import("zod").ZodString>;
192
+ country: import("zod").ZodOptional<import("zod").ZodString>;
193
+ status: import("zod").ZodOptional<import("zod").ZodString>;
194
+ disambiguation: import("zod").ZodOptional<import("zod").ZodString>;
195
+ }, import("zod/v4/core").$strip>>;
196
+ tags: import("zod").ZodArray<import("zod").ZodObject<{
197
+ name: import("zod").ZodString;
198
+ count: import("zod").ZodNumber;
199
+ }, import("zod/v4/core").$strip>>;
200
+ externalLinks: import("zod").ZodArray<import("zod").ZodObject<{
201
+ type: import("zod").ZodString;
202
+ resource: import("zod").ZodString;
203
+ }, import("zod/v4/core").$strip>>;
204
+ coverArt: import("zod").ZodOptional<import("zod").ZodObject<{
205
+ exists: import("zod").ZodBoolean;
206
+ count: import("zod").ZodOptional<import("zod").ZodNumber>;
207
+ front: import("zod").ZodOptional<import("zod").ZodBoolean>;
208
+ back: import("zod").ZodOptional<import("zod").ZodBoolean>;
209
+ }, import("zod/v4/core").$strip>>;
210
+ }, import("zod/v4/core").$strip>, readonly [{
211
+ readonly reason: "invalid_mbid";
212
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
213
+ readonly when: "The MBID is malformed or the all-zeros sentinel (rejected before fetch), or MusicBrainz rejects it with HTTP 400.";
214
+ readonly recovery: "MBID must be a 36-character UUID (e.g. a74b1b7f-71a5-4011-9441-d0b5e4122711). Use musicbrainz_search_entities (entityType=release-group) to find one from a title.";
215
+ }, {
216
+ readonly reason: "entity_not_found";
217
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
218
+ readonly when: "The MBID is well-formed but no release-group exists with it (MusicBrainz returns HTTP 404).";
219
+ readonly recovery: "No release-group exists with that MBID. Verify the ID, or search by title with musicbrainz_search_entities.";
220
+ }], {
221
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
222
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
223
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
224
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
225
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
226
+ mbid: import("zod").ZodString;
227
+ media_offset: import("zod").ZodDefault<import("zod").ZodNumber>;
228
+ media_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
195
229
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
196
230
  mbid: import("zod").ZodString;
197
231
  title: import("zod").ZodString;
@@ -216,6 +250,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
216
250
  labelName: import("zod").ZodOptional<import("zod").ZodString>;
217
251
  catalogNumber: import("zod").ZodOptional<import("zod").ZodString>;
218
252
  }, import("zod/v4/core").$strip>>;
253
+ externalLinks: import("zod").ZodArray<import("zod").ZodObject<{
254
+ type: import("zod").ZodString;
255
+ resource: import("zod").ZodString;
256
+ }, import("zod/v4/core").$strip>>;
257
+ mediaOffset: import("zod").ZodNumber;
258
+ mediaTotal: import("zod").ZodNumber;
259
+ trackTotal: import("zod").ZodNumber;
219
260
  media: import("zod").ZodArray<import("zod").ZodObject<{
220
261
  position: import("zod").ZodOptional<import("zod").ZodNumber>;
221
262
  format: import("zod").ZodOptional<import("zod").ZodString>;
@@ -227,6 +268,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
227
268
  title: import("zod").ZodString;
228
269
  length: import("zod").ZodOptional<import("zod").ZodString>;
229
270
  recordingId: import("zod").ZodOptional<import("zod").ZodString>;
271
+ artistCredit: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
272
+ name: import("zod").ZodString;
273
+ artistId: import("zod").ZodString;
274
+ artistName: import("zod").ZodString;
275
+ joinPhrase: import("zod").ZodOptional<import("zod").ZodString>;
276
+ }, import("zod/v4/core").$strip>>>;
277
+ artistCreditString: import("zod").ZodOptional<import("zod").ZodString>;
230
278
  }, import("zod/v4/core").$strip>>;
231
279
  }, import("zod/v4/core").$strip>>;
232
280
  coverArt: import("zod").ZodObject<{
@@ -245,7 +293,12 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
245
293
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
246
294
  readonly when: "The MBID is well-formed but no release exists with it (MusicBrainz returns HTTP 404).";
247
295
  readonly recovery: "No release exists with that MBID. Verify the ID, or search by title with musicbrainz_search_entities.";
248
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
296
+ }], {
297
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
298
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
299
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
300
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
301
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
249
302
  mbid: import("zod").ZodString;
250
303
  inc_relationships: import("zod").ZodDefault<import("zod").ZodBoolean>;
251
304
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -268,6 +321,17 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
268
321
  date: import("zod").ZodOptional<import("zod").ZodString>;
269
322
  country: import("zod").ZodOptional<import("zod").ZodString>;
270
323
  }, import("zod/v4/core").$strip>>;
324
+ releaseAppearanceSummary: import("zod").ZodObject<{
325
+ shown: import("zod").ZodNumber;
326
+ cap: import("zod").ZodNumber;
327
+ completeness: import("zod").ZodEnum<{
328
+ complete: "complete";
329
+ truncated: "truncated";
330
+ unknown: "unknown";
331
+ }>;
332
+ totalCount: import("zod").ZodOptional<import("zod").ZodNumber>;
333
+ notice: import("zod").ZodString;
334
+ }, import("zod/v4/core").$strip>;
271
335
  relationships: import("zod").ZodArray<import("zod").ZodObject<{
272
336
  type: import("zod").ZodString;
273
337
  direction: import("zod").ZodOptional<import("zod").ZodString>;
@@ -275,6 +339,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
275
339
  targetType: import("zod").ZodString;
276
340
  targetId: import("zod").ZodOptional<import("zod").ZodString>;
277
341
  targetName: import("zod").ZodOptional<import("zod").ZodString>;
342
+ targetDisambiguation: import("zod").ZodOptional<import("zod").ZodString>;
343
+ orderingKey: import("zod").ZodOptional<import("zod").ZodNumber>;
278
344
  begin: import("zod").ZodOptional<import("zod").ZodString>;
279
345
  end: import("zod").ZodOptional<import("zod").ZodString>;
280
346
  }, import("zod/v4/core").$strip>>;
@@ -302,6 +368,10 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
302
368
  type: import("zod").ZodOptional<import("zod").ZodString>;
303
369
  languages: import("zod").ZodArray<import("zod").ZodString>;
304
370
  iswcs: import("zod").ZodArray<import("zod").ZodString>;
371
+ attributes: import("zod").ZodArray<import("zod").ZodObject<{
372
+ type: import("zod").ZodOptional<import("zod").ZodString>;
373
+ value: import("zod").ZodOptional<import("zod").ZodString>;
374
+ }, import("zod/v4/core").$strip>>;
305
375
  aliases: import("zod").ZodArray<import("zod").ZodObject<{
306
376
  name: import("zod").ZodString;
307
377
  sortName: import("zod").ZodOptional<import("zod").ZodString>;
@@ -320,6 +390,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
320
390
  targetType: import("zod").ZodString;
321
391
  targetId: import("zod").ZodOptional<import("zod").ZodString>;
322
392
  targetName: import("zod").ZodOptional<import("zod").ZodString>;
393
+ targetDisambiguation: import("zod").ZodOptional<import("zod").ZodString>;
394
+ orderingKey: import("zod").ZodOptional<import("zod").ZodNumber>;
323
395
  begin: import("zod").ZodOptional<import("zod").ZodString>;
324
396
  end: import("zod").ZodOptional<import("zod").ZodString>;
325
397
  }, import("zod/v4/core").$strip>>;
@@ -354,6 +426,9 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
354
426
  labelCode: import("zod").ZodOptional<import("zod").ZodNumber>;
355
427
  country: import("zod").ZodOptional<import("zod").ZodString>;
356
428
  area: import("zod").ZodOptional<import("zod").ZodString>;
429
+ areaId: import("zod").ZodOptional<import("zod").ZodString>;
430
+ ipis: import("zod").ZodArray<import("zod").ZodString>;
431
+ isnis: import("zod").ZodArray<import("zod").ZodString>;
357
432
  lifeSpan: import("zod").ZodOptional<import("zod").ZodObject<{
358
433
  begin: import("zod").ZodOptional<import("zod").ZodString>;
359
434
  end: import("zod").ZodOptional<import("zod").ZodString>;
@@ -374,6 +449,18 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
374
449
  type: import("zod").ZodString;
375
450
  resource: import("zod").ZodString;
376
451
  }, import("zod/v4/core").$strip>>;
452
+ relationships: import("zod").ZodArray<import("zod").ZodObject<{
453
+ type: import("zod").ZodString;
454
+ direction: import("zod").ZodOptional<import("zod").ZodString>;
455
+ attributes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
456
+ targetType: import("zod").ZodString;
457
+ targetId: import("zod").ZodOptional<import("zod").ZodString>;
458
+ targetName: import("zod").ZodOptional<import("zod").ZodString>;
459
+ targetDisambiguation: import("zod").ZodOptional<import("zod").ZodString>;
460
+ orderingKey: import("zod").ZodOptional<import("zod").ZodNumber>;
461
+ begin: import("zod").ZodOptional<import("zod").ZodString>;
462
+ end: import("zod").ZodOptional<import("zod").ZodString>;
463
+ }, import("zod/v4/core").$strip>>;
377
464
  }, import("zod/v4/core").$strip>, readonly [{
378
465
  readonly reason: "invalid_mbid";
379
466
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -429,8 +516,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
429
516
  }, {
430
517
  readonly reason: "invalid_identifier";
431
518
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
432
- readonly when: "The ISRC/ISWC is malformed (the dedicated endpoint returns HTTP 400), or the barcode contains anything other than digits once spaces and hyphens are removed.";
433
- readonly recovery: "ISRC is 12 chars (e.g. USRC17607839); ISWC is T- then three dot-separated 3-digit groups and a check digit, T-DDD.DDD.DDD-C (e.g. T-010.140.236-1); a barcode is the UPC/EAN digits only (e.g. 075678164125 — spaces and hyphens are ignored, wildcards are not accepted). Verify the format.";
519
+ readonly when: "The ISRC/ISWC fails its accepted grammar locally or the dedicated endpoint rejects it with HTTP 400, or the barcode contains anything other than digits once spaces and hyphens are removed.";
520
+ readonly recovery: "ISRC accepts CCXXXYYNNNNN or CC-XXX-YY-NNNNN (e.g. USRC17607839), ignoring case and surrounding whitespace. ISWC accepts T plus ten digits, with optional hyphen after T, optional dots between three-digit groups, and optional hyphen/dot before the check digit; whitespace and case are ignored (e.g. T-010.140.236-1 or T0101402361). A barcode is UPC/EAN digits (e.g. 075678164125 — spaces and hyphens ignored, wildcards rejected). Verify the format; check digits are not repaired.";
434
521
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
435
522
  target_type: import("zod").ZodEnum<{
436
523
  artist: "artist";
@@ -442,6 +529,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
442
529
  }>;
443
530
  link: import("zod").ZodObject<{
444
531
  artist: import("zod").ZodOptional<import("zod").ZodString>;
532
+ track_artist: import("zod").ZodOptional<import("zod").ZodString>;
445
533
  label: import("zod").ZodOptional<import("zod").ZodString>;
446
534
  'release-group': import("zod").ZodOptional<import("zod").ZodString>;
447
535
  release: import("zod").ZodOptional<import("zod").ZodString>;
@@ -451,7 +539,9 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
451
539
  work: import("zod").ZodOptional<import("zod").ZodString>;
452
540
  area: import("zod").ZodOptional<import("zod").ZodString>;
453
541
  }, import("zod/v4/core").$catchall<import("zod").ZodUnknown>>;
454
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
542
+ type: import("zod").ZodOptional<import("zod").ZodString>;
543
+ status: import("zod").ZodOptional<import("zod").ZodString>;
544
+ limit: import("zod").ZodDefault<import("zod").ZodLazy<import("zod").ZodNumber>>;
455
545
  offset: import("zod").ZodDefault<import("zod").ZodNumber>;
456
546
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
457
547
  targetType: import("zod").ZodString;
@@ -467,18 +557,27 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
467
557
  date: import("zod").ZodOptional<import("zod").ZodString>;
468
558
  country: import("zod").ZodOptional<import("zod").ZodString>;
469
559
  length: import("zod").ZodOptional<import("zod").ZodString>;
560
+ secondaryTypes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
561
+ firstReleaseDate: import("zod").ZodOptional<import("zod").ZodString>;
470
562
  }, import("zod/v4/core").$strip>>;
471
563
  offset: import("zod").ZodNumber;
564
+ type: import("zod").ZodOptional<import("zod").ZodString>;
565
+ status: import("zod").ZodOptional<import("zod").ZodString>;
472
566
  }, import("zod/v4/core").$strip>, readonly [{
567
+ readonly reason: "invalid_filter";
568
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
569
+ readonly when: "A nonempty type/status filter has an unknown token, an empty pipe-list member, or is unsupported for the target and parent.";
570
+ readonly recovery: "Use type only for release-group by artist or release by artist/label/recording/track_artist; use status only for release by artist/label/recording/release-group/track_artist. Separate valid tokens with | and omit unsupported filters. Types: album, single, ep, broadcast, other, audio drama, audiobook, compilation, demo, dj-mix, field recording, interview, live, mixtape/street, remix, soundtrack, spokenword. Statuses: official, promotion, bootleg, pseudo-release, withdrawn, cancelled.";
571
+ }, {
473
572
  readonly reason: "invalid_link";
474
573
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
475
574
  readonly when: "A parent key is unknown, aliases collide, not exactly one nonempty parent is supplied, or the MBID/parent combination is invalid.";
476
- readonly recovery: "Provide exactly one parent key: artist, label, release-group, release, recording, work, or area. releaseGroup and release_group alias release-group; never combine aliases. Supply a 36-character hexadecimal UUID MBID valid for target_type.";
575
+ readonly recovery: "Provide exactly one parent key with a nonzero hexadecimal UUID MBID. Accepted parents by target: artist → area, recording, release, release-group, work; label → area, release; release-group → artist, release; release → area, artist, label, recording, release-group, track_artist; recording → artist, release, work; work → artist. releaseGroup and release_group alias release-group; never combine aliases. track_artist uses an artist MBID; verify it with musicbrainz_get_artist.";
477
576
  }, {
478
577
  readonly reason: "entity_not_found";
479
578
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
480
579
  readonly when: "The link MBID is well-formed but no such parent entity exists (HTTP 404).";
481
- readonly recovery: "No parent entity exists with that MBID. Verify the ID with the matching musicbrainz_get_* tool or musicbrainz_search_entities.";
580
+ readonly recovery: "No parent entity exists with that MBID. For area links, obtain areaId from musicbrainz_get_artist or musicbrainz_get_label for a known artist or label; these tools do not resolve arbitrary areas. For track_artist links, verify the artist with musicbrainz_get_artist or musicbrainz_search_entities. For other parents, verify the ID with the matching musicbrainz_get_* tool or musicbrainz_search_entities.";
482
581
  }], {
483
582
  readonly totalCount: import("zod").ZodNumber;
484
583
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW9B,CAAC"}
@@ -53,7 +53,7 @@ export declare const lookupIdentifierTool: import("@cyanheads/mcp-ts-core").Tool
53
53
  }, {
54
54
  readonly reason: "invalid_identifier";
55
55
  readonly code: JsonRpcErrorCode.ValidationError;
56
- readonly when: "The ISRC/ISWC is malformed (the dedicated endpoint returns HTTP 400), or the barcode contains anything other than digits once spaces and hyphens are removed.";
57
- readonly recovery: "ISRC is 12 chars (e.g. USRC17607839); ISWC is T- then three dot-separated 3-digit groups and a check digit, T-DDD.DDD.DDD-C (e.g. T-010.140.236-1); a barcode is the UPC/EAN digits only (e.g. 075678164125 — spaces and hyphens are ignored, wildcards are not accepted). Verify the format.";
56
+ readonly when: "The ISRC/ISWC fails its accepted grammar locally or the dedicated endpoint rejects it with HTTP 400, or the barcode contains anything other than digits once spaces and hyphens are removed.";
57
+ readonly recovery: "ISRC accepts CCXXXYYNNNNN or CC-XXX-YY-NNNNN (e.g. USRC17607839), ignoring case and surrounding whitespace. ISWC accepts T plus ten digits, with optional hyphen after T, optional dots between three-digit groups, and optional hyphen/dot before the check digit; whitespace and case are ignored (e.g. T-010.140.236-1 or T0101402361). A barcode is UPC/EAN digits (e.g. 075678164125 — spaces and hyphens ignored, wildcards rejected). Verify the format; check digits are not repaired.";
58
58
  }], undefined>;
59
59
  //# sourceMappingURL=lookup-identifier.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lookup-identifier.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/lookup-identifier.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAsD3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiM/B,CAAC"}
1
+ {"version":3,"file":"lookup-identifier.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/lookup-identifier.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAsD3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyN/B,CAAC"}
@@ -70,8 +70,8 @@ export const lookupIdentifierTool = tool('musicbrainz_lookup_identifier', {
70
70
  {
71
71
  reason: 'invalid_identifier',
72
72
  code: JsonRpcErrorCode.ValidationError,
73
- when: 'The ISRC/ISWC is malformed (the dedicated endpoint returns HTTP 400), or the barcode contains anything other than digits once spaces and hyphens are removed.',
74
- recovery: 'ISRC is 12 chars (e.g. USRC17607839); ISWC is T- then three dot-separated 3-digit groups and a check digit, T-DDD.DDD.DDD-C (e.g. T-010.140.236-1); a barcode is the UPC/EAN digits only (e.g. 075678164125 — spaces and hyphens are ignored, wildcards are not accepted). Verify the format.',
73
+ when: 'The ISRC/ISWC fails its accepted grammar locally or the dedicated endpoint rejects it with HTTP 400, or the barcode contains anything other than digits once spaces and hyphens are removed.',
74
+ recovery: 'ISRC accepts CCXXXYYNNNNN or CC-XXX-YY-NNNNN (e.g. USRC17607839), ignoring case and surrounding whitespace. ISWC accepts T plus ten digits, with optional hyphen after T, optional dots between three-digit groups, and optional hyphen/dot before the check digit; whitespace and case are ignored (e.g. T-010.140.236-1 or T0101402361). A barcode is UPC/EAN digits (e.g. 075678164125 — spaces and hyphens ignored, wildcards rejected). Verify the format; check digits are not repaired.',
75
75
  },
76
76
  ],
77
77
  input: z.object({
@@ -81,7 +81,16 @@ export const lookupIdentifierTool = tool('musicbrainz_lookup_identifier', {
81
81
  value: z
82
82
  .string()
83
83
  .min(1)
84
- .describe('The identifier value. ISRC e.g. "USRC17607839"; ISWC e.g. "T-010.140.236-1"; barcode = the UPC/EAN digits, e.g. "075678164125" (spaces and hyphens are ignored; any other character, including a wildcard, is rejected).'),
84
+ .describe('ISRC: compact CCXXXYYNNNNN or grouped CC-XXX-YY-NNNNN (e.g. GBAYE9701274 or GB-AYE-97-01274), case-insensitive with surrounding whitespace. ISWC: T plus ten digits, optional hyphen after T, optional dots between three-digit groups, optional hyphen/dot before the check digit (e.g. T-010.140.236-1 or T0101402361); whitespace and case are ignored. Echoes canonical uppercase ISRC or T-DDD.DDD.DDD-C ISWC. Barcode: UPC/EAN digits, e.g. 075678164125; spaces and hyphens are ignored, other characters rejected.')
85
+ .meta({
86
+ examples: [
87
+ 'GBAYE9701274',
88
+ 'GB-AYE-97-01274',
89
+ 'T-010.140.236-1',
90
+ 'T0101402361',
91
+ '075678164125',
92
+ ],
93
+ }),
85
94
  }),
86
95
  // The resolved entity type varies by id_type, so `result` is a discriminated
87
96
  // union on `kind`. Wrapped in an object because the tool() output slot is a
@@ -121,9 +130,14 @@ export const lookupIdentifierTool = tool('musicbrainz_lookup_identifier', {
121
130
  ctx.log.info('musicbrainz_lookup_identifier', { id_type: input.id_type, value: input.value });
122
131
  const service = getMusicBrainzService();
123
132
  if (input.id_type === 'isrc') {
133
+ const supplied = input.value.trim().toUpperCase();
134
+ if (!/^(?:[A-Z]{2}[A-Z0-9]{3}\d{7}|[A-Z]{2}-[A-Z0-9]{3}-\d{2}-\d{5})$/.test(supplied)) {
135
+ throw ctx.fail('invalid_identifier', 'ISRC must be CCXXXYYNNNNN or CC-XXX-YY-NNNNN.');
136
+ }
137
+ const identifier = supplied.replaceAll('-', '');
124
138
  let envelope;
125
139
  try {
126
- envelope = await service.resolveIsrc(input.value, ctx, { signal: ctx.signal });
140
+ envelope = await service.resolveIsrc(identifier, ctx, { signal: ctx.signal });
127
141
  }
128
142
  catch (error) {
129
143
  const reason = classifyIdentifierError(error);
@@ -145,12 +159,17 @@ export const lookupIdentifierTool = tool('musicbrainz_lookup_identifier', {
145
159
  if (recordings.length === 0) {
146
160
  throw ctx.fail('identifier_not_found', `No recording carries ISRC ${input.value}.`);
147
161
  }
148
- return { result: { kind: 'recordings', identifier: input.value, recordings } };
162
+ return { result: { kind: 'recordings', identifier, recordings } };
149
163
  }
150
164
  if (input.id_type === 'iswc') {
165
+ const groups = /^T-?(\d{3})\.?(\d{3})\.?(\d{3})[-.]?(\d)$/.exec(input.value.replace(/\s/g, '').toUpperCase());
166
+ if (!groups) {
167
+ throw ctx.fail('invalid_identifier', 'ISWC must be T plus ten digits with optional group punctuation, e.g. T-010.140.236-1.');
168
+ }
169
+ const identifier = `T-${groups[1]}.${groups[2]}.${groups[3]}-${groups[4]}`;
151
170
  let envelope;
152
171
  try {
153
- envelope = await service.resolveIswc(input.value, ctx, { signal: ctx.signal });
172
+ envelope = await service.resolveIswc(identifier, ctx, { signal: ctx.signal });
154
173
  }
155
174
  catch (error) {
156
175
  const reason = classifyIdentifierError(error);
@@ -168,7 +187,7 @@ export const lookupIdentifierTool = tool('musicbrainz_lookup_identifier', {
168
187
  if (works.length === 0) {
169
188
  throw ctx.fail('identifier_not_found', `No work carries ISWC ${input.value}.`);
170
189
  }
171
- return { result: { kind: 'works', identifier: input.value, works } };
190
+ return { result: { kind: 'works', identifier, works } };
172
191
  }
173
192
  // barcode — Lucene search filter on releases (ranked, not a dedicated endpoint).
174
193
  // The value is interpolated into a Lucene query, so it must be pure digits: