track_search
Pack: last-fm · Endpoint: https://gateway.pipeworx.io/last-fm/mcp
Search Last.fm for tracks matching a keyword query; returns ranked results with artist, track name, and listener counts.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | |
limit | number | no |
Example call
Arguments
{
"query": "imagine john lennon"
}
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":"track_search","arguments":{"query":"imagine john lennon"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('track_search', {
"query": "imagine john lennon"
});
More examples
{
"query": "stairway to heaven",
"limit": 5
}
Response shape
| Field | Type | Description |
|---|---|---|
results | object | Search results container |
Full JSON Schema
{
"type": "object",
"properties": {
"results": {
"type": "object",
"description": "Search results container",
"properties": {
"trackmatches": {
"type": "object",
"properties": {
"track": {
"type": "array",
"description": "Array of matching tracks",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Track name"
},
"artist": {
"type": "string",
"description": "Artist name"
},
"url": {
"type": "string",
"description": "Track URL"
},
"listeners": {
"type": "string",
"description": "Number of listeners"
},
"image": {
"type": "array",
"items": {
"type": "object",
"properties": {
"size": {
"type": "string"
},
"#text": {
"type": "string"
}
}
}
}
}
}
}
}
},
"@attr": {
"type": "object",
"properties": {
"for": {
"type": "string"
},
"page": {
"type": "string"
},
"perPage": {
"type": "string"
},
"totalPages": {
"type": "string"
},
"total": {
"type": "string"
}
}
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"last-fm": {
"url": "https://gateway.pipeworx.io/last-fm/mcp"
}
}
}
See Getting Started for client-specific install steps.