Skip to main content
Glama
Cifero74

mcp-apple-music

get_library_albums

Retrieve albums from your Apple Music library with pagination controls to manage large collections efficiently.

Instructions

List albums saved in your Apple Music library.

Args: limit: Number of albums to return, 1–100 (default 25). offset: Pagination offset (default 0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'get_library_albums' handler function which fetches and formats library albums from Apple Music.
    @mcp.tool()
    async def get_library_albums(limit: int = 25, offset: int = 0) -> str:
        """List albums saved in your Apple Music library.
    
        Args:
            limit: Number of albums to return, 1–100 (default 25).
            offset: Pagination offset (default 0).
        """
        client = _get_client()
        data = await client.get(
            "/me/library/albums",
            params={"limit": min(max(1, limit), 100), "offset": max(0, offset)},
        )
        albums = data.get("data", [])
        total = data.get("meta", {}).get("total", "?")
    
        if not albums:
            return "No albums found in your library."
    
        lines = [f"💿 Library Albums — showing {offset + 1}–{offset + len(albums)} of {total}:\n"]
        for i, a in enumerate(albums, offset + 1):
            lines.append(_fmt_album(a, i))
        return "\n".join(lines)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implicitly conveys read-only behavior through the word 'List' and explains pagination via the offset parameter description. However, it lacks explicit safety declarations, rate limit warnings, auth requirements, or error behavior that would be critical for a tool accessing a user's personal library.

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?

The description is optimally structured with a single clear sentence stating purpose, followed by a standard Args docstring block. No sentences are wasted; every line earns its place by providing essential parameter constraints immediately after the purpose statement.

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

Completeness3/5

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

Given the tool's simplicity (standard pagination pattern) and existence of an output schema, the description adequately covers the core functionality. However, with no annotations covering auth or safety, the description should have mentioned that this requires Apple Music authentication/authorization, which is missing. It meets minimum viability but has clear gaps.

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

Parameters4/5

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

Despite 0% schema description coverage (properties only have titles, no descriptions), the Args section compensates effectively by documenting the limit constraint (1–100, default 25) and explaining offset as pagination context. This adds meaningful semantic value beyond the bare schema types.

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?

The description opens with the specific verb 'List' followed by the resource 'albums' and clear scope 'saved in your Apple Music library'. It effectively distinguishes from siblings like get_library_songs, get_library_artists, and search_catalog by specifying this retrieves saved/library albums rather than catalog search or other media types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention when to prefer this over search_library for filtering, or how it relates to get_recently_played. The Args section documents parameters but does not constitute usage guidelines.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cifero74/mcp-apple-music'

If you have feedback or need assistance with the MCP directory API, please join our Discord server