user_top_tracks

Pack: last-fm · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/user_top_tracks for the schema, then POST the same URL with its arguments for the data.

Fetch a SPECIFIC NAMED Last.fm user’s most-scrobbled tracks for a given period (overall/7day/1month/3month/6month/12month), only when the question names a Last.fm username; NEVER for general “popular songs / top music” questions (use chart_top_artists or tag_top_artists for those) and never with a guessed or example username. Returns track names, artists, and play counts.

Parameters

NameTypeRequiredDescription
userstringyesA Last.fm username the CALLER provided, never guessed, never copied from an example.
periodstringno
limitnumberno

Example call

Arguments

{
  "user": "rj"
}

curl

curl -X POST https://gateway.pipeworx.io/last-fm/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"user_top_tracks","arguments":{"user":"rj"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('user_top_tracks', {
  "user": "rj"
});

More examples

{
  "user": "lastfmuser",
  "period": "7day",
  "limit": 20
}

Response shape

FieldTypeDescription
toptracksobjectUser top tracks container
Full JSON Schema
{
  "type": "object",
  "properties": {
    "toptracks": {
      "type": "object",
      "description": "User top tracks container",
      "properties": {
        "track": {
          "type": "array",
          "description": "Array of user top tracks",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Track name"
              },
              "playcount": {
                "type": "string",
                "description": "User's play count"
              },
              "url": {
                "type": "string",
                "description": "Track URL"
              },
              "artist": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "image": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "size": {
                      "type": "string"
                    },
                    "#text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "@attr": {
          "type": "object",
          "properties": {
            "user": {
              "type": "string"
            },
            "period": {
              "type": "string"
            },
            "page": {
              "type": "string"
            },
            "perPage": {
              "type": "string"
            },
            "totalPages": {
              "type": "string"
            },
            "total": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the last-fm pack
{
  "mcpServers": {
    "last-fm": {
      "url": "https://gateway.pipeworx.io/last-fm/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 19, 2026