lidarr_add_artist
Add an artist to Lidarr using its MusicBrainz ID, quality profile, metadata profile, and root folder. Requires IDs from Lidarr search and profile lookups.
Instructions
Add an artist to Lidarr. Use lidarr_search first to find the foreignArtistId, and lidarr_get_root_folders / lidarr_get_quality_profiles / lidarr_get_metadata_profiles to get valid values. Use lidarr_get_tags to get valid tag IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| foreignArtistId | Yes | Foreign artist ID (MusicBrainz ID) from lidarr_search results | |
| artistName | Yes | Artist name | |
| qualityProfileId | Yes | Quality profile ID from lidarr_get_quality_profiles | |
| metadataProfileId | Yes | Metadata profile ID from lidarr_get_metadata_profiles | |
| rootFolderPath | Yes | Root folder path from lidarr_get_root_folders | |
| monitored | No | Whether to monitor the artist (default: true) | |
| tags | No | Array of tag IDs from lidarr_get_tags (optional) |
Implementation Reference
- src/index.ts:622-659 (registration)Registration of lidarr_add_artist tool definition with input schema. Defines required fields: foreignArtistId, artistName, qualityProfileId, metadataProfileId, rootFolderPath. Optional: monitored, tags.
name: "lidarr_add_artist", description: "Add an artist to Lidarr. Use lidarr_search first to find the foreignArtistId, and lidarr_get_root_folders / lidarr_get_quality_profiles / lidarr_get_metadata_profiles to get valid values. Use lidarr_get_tags to get valid tag IDs.", inputSchema: { type: "object" as const, properties: { foreignArtistId: { type: "string", description: "Foreign artist ID (MusicBrainz ID) from lidarr_search results", }, artistName: { type: "string", description: "Artist name", }, qualityProfileId: { type: "number", description: "Quality profile ID from lidarr_get_quality_profiles", }, metadataProfileId: { type: "number", description: "Metadata profile ID from lidarr_get_metadata_profiles", }, rootFolderPath: { type: "string", description: "Root folder path from lidarr_get_root_folders", }, monitored: { type: "boolean", description: "Whether to monitor the artist (default: true)", }, tags: { type: "array", items: { type: "number" }, description: "Array of tag IDs from lidarr_get_tags (optional)", }, }, required: ["foreignArtistId", "artistName", "qualityProfileId", "metadataProfileId", "rootFolderPath"], }, }, - src/index.ts:1896-1917 (handler)Handler for lidarr_add_artist tool call. Extracts arguments from request, calls clients.lidarr.addArtist(), and returns success response with artist details.
case "lidarr_add_artist": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const { foreignArtistId, artistName, qualityProfileId, metadataProfileId, rootFolderPath, monitored, tags } = args as { foreignArtistId: string; artistName: string; qualityProfileId: number; metadataProfileId: number; rootFolderPath: string; monitored?: boolean; tags?: number[]; }; const added = await clients.lidarr.addArtist({ foreignArtistId, artistName, qualityProfileId, metadataProfileId, rootFolderPath, monitored, tags: tags ?? [], }); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: `Added "${added.artistName}" to Lidarr`, id: added.id, path: added.path, monitored: added.monitored, }, null, 2), }], }; } - src/arr-client.ts:728-739 (helper)LidarrClient.addArtist() - the actual API call that sends a POST to /artist endpoint with the artist data and addOptions.searchForMissingAlbums=true.
async addArtist(artist: Partial<Artist> & { foreignArtistId: string; rootFolderPath: string; qualityProfileId: number; metadataProfileId: number }): Promise<Artist> { return this['request']<Artist>('/artist', { method: 'POST', body: JSON.stringify({ ...artist, monitored: artist.monitored ?? true, addOptions: { searchForMissingAlbums: true, }, }), }); } - src/arr-client.ts:189-218 (schema)Artist interface - the data type used by addArtist return value and internal representation.
export interface Artist { id: number; artistName: string; sortName: string; status: string; overview: string; artistType: string; disambiguation: string; links: Array<{ url: string; name: string }>; images: Array<{ coverType: string; url: string }>; path: string; qualityProfileId: number; metadataProfileId: number; monitored: boolean; monitorNewItems: string; genres: string[]; cleanName: string; foreignArtistId: string; tags: number[]; added: string; ratings: { votes: number; value: number }; statistics: { albumCount: number; trackFileCount: number; trackCount: number; totalTrackCount: number; sizeOnDisk: number; percentOfTracks: number; }; }