readarr_get_tags
Retrieve all organizational tags from Readarr to filter and categorize your book collection for better media management.
Instructions
Get all tags defined in Readarr (Books). Tags can be used to organize and filter content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:154-161 (registration)Tool schema and registration definition for '*_get_tags' tools (including readarr_get_tags). Defines name, description, and empty input schema. Used dynamically for each configured service.
name: `${serviceName}_get_tags`, description: `Get all tags defined in ${displayName}. Tags can be used to organize and filter content.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, - src/index.ts:178-178 (registration)Conditional registration of Readarr configuration tools, including 'readarr_get_tags', if Readarr client is configured.
if (clients.readarr) addConfigTools('readarr', 'Readarr (Books)'); - src/index.ts:930-947 (handler)Main tool handler for 'readarr_get_tags'. Extracts service from tool name, retrieves ReadarrClient, calls getTags(), formats and returns tag list as JSON response.
case "sonarr_get_tags": case "radarr_get_tags": case "lidarr_get_tags": case "readarr_get_tags": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const tags = await client.getTags(); return { content: [{ type: "text", text: JSON.stringify({ count: tags.length, tags: tags.map(t => ({ id: t.id, label: t.label })), }, null, 2), }], }; } - src/arr-client.ts:571-573 (helper)Core implementation of getTags() method in base ArrClient class (inherited by ReadarrClient). Makes API request to '/tag' endpoint to fetch all tags.
async getTags(): Promise<Tag[]> { return this.request<Tag[]>('/tag'); } - src/arr-client.ts:833-836 (helper)ReadarrClient constructor sets API version to 'v1' (used for /tag endpoint), ensuring correct API path for Readarr.
constructor(config: ArrConfig) { super('readarr', config); this.apiVersion = 'v1'; }