Skip to main content
Glama

filter_by_genre

Read-onlyIdempotent

Filter your saved Spotify tracks or albums by artist genre tag and return URIs ready for playlist creation or addition.

Instructions

List URIs of your saved tracks or albums whose artists carry a given genre tag (case-insensitive tag-name match against your sidecar). Output is directly usable as create_playlist / add_to_playlist input. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich saved collection to filter
genreYesGenre tag to match (case-insensitive, e.g. "pop")
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. Addedv1.26.1

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, so the description's 'Read-only' line is redundant but not contradictory. It does add genuine beyond-annotation context: the tag match is case-insensitive and resolved against 'your sidecar' (a local data source), which tells the agent the filtering semantics differ from a live API query. It stops short of covering result limits or error behavior, but the annotation baseline is already met.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with zero filler, front-loading what is returned (URIs) and where they can be used before the read-only note. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema present, the description usefully explains the return value (URIs) and its downstream use, which the agent needs. It omits mention of the max_results cap behavior and result ordering, but for a filtered-list tool the essentials are covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents kind, genre, max_results, and response_format including enums and the env-var default. The description only reinforces the case-insensitive genre matching already noted in the schema, adding little beyond it. Baseline 3 applies when the schema carries the full burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List URIs of your saved tracks or albums') plus the filtering criterion (artists carrying a genre tag). The scope is narrow and clearly distinct from siblings like search_saved_tracks or library_genre_report, and it even names what the output feeds into (create_playlist / add_to_playlist).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by noting the output is 'directly usable as create_playlist / add_to_playlist input', which hints at a build-a-playlist workflow. However, it never states when to prefer this over alternatives such as search_saved_tracks or library_genre_report, leaving the routing decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools