Skip to main content
Glama
Cifero74

mcp-apple-music

get_library_songs

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

Instructions

List songs saved in your Apple Music library.

Args: limit: Number of songs to return, 1–100 (default 25). offset: Pagination offset for retrieving subsequent pages (default 0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function 'get_library_songs' implements the logic for fetching and returning library songs via the Apple Music API client.
    async def get_library_songs(limit: int = 25, offset: int = 0) -> str:
        """List songs saved in your Apple Music library.
    
        Args:
            limit: Number of songs to return, 1–100 (default 25).
            offset: Pagination offset for retrieving subsequent pages (default 0).
        """
        client = _get_client()
        data = await client.get(
            "/me/library/songs",
            params={"limit": min(max(1, limit), 100), "offset": max(0, offset)},
        )
        songs = data.get("data", [])
        total = data.get("meta", {}).get("total", "?")
    
        if not songs:
            return "No songs found in your library."
    
        lines = [f"🎵 Library Songs — showing {offset + 1}–{offset + len(songs)} of {total}:\n"]
        for i, s in enumerate(songs, offset + 1):
            lines.append(_fmt_song(s, i))
        return "\n".join(lines)
    
    
    # ------------------------------------------------------------------ #
    #  Tool: get_library_albums                                           #
Behavior3/5

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

No annotations provided, so description carries full burden. Explains the pagination mechanism (offset for subsequent pages) and default values, but omits read-only nature, rate limits, failure behaviors, or output format details (though output schema exists).

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?

Efficient two-part structure: single declarative sentence for purpose, followed by concise Args documentation. No redundant text or unnecessary verbosity.

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?

Appropriate for a simple read operation with 2 optional parameters. Output schema exists to document return values. Minor gap: doesn't explicitly confirm read-only status or mention total result set availability.

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

Parameters5/5

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

Schema has 0% description coverage (only titles and types). The Args section fully compensates by documenting semantics, valid ranges (1–100), default values (25, 0), and purpose (pagination) for both parameters.

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

Purpose4/5

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

Clear verb (List) and specific resource (songs in Apple Music library). Implicitly distinguishes from siblings by specifying 'songs' versus albums/artists/playlists and 'library' versus catalog/recommendations, though it lacks explicit comparative guidance.

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?

No guidance provided on when to prefer this over search_library, get_recently_played, or get_playlist_tracks. No mention of pagination strategy or maximum result limits beyond the parameter range.

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