Skip to main content
Glama

User Top Tracks

user_top_tracks
Read-onlyIdempotent

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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user": "rj"
    },
    "name": "user_top_tracks"
  }
}

Input Schema

NameRequiredDescriptionDefault
userYesA Last.fm username the CALLER provided, never guessed, never copied from an example.
limitNo
periodNo

Output Schema

NameRequiredDescriptionDefault
toptracksNoUser top tracks container

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / user / description
      Previous value: -"A Last.fm username the CALLER provided — never guessed, never copied from an example."New value: +"A Last.fm username the CALLER provided, never guessed, never copied from an example."
  2. Changed1 schema field changed
    • addedInput schema / properties / user / description
      Added value: +"A Last.fm username the CALLER provided — never guessed, never copied from an example."
  3. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "user": "rj"
      +  },
      +  {
      +    "limit": 20,
      +    "period": "7day",
      +    "user": "lastfmuser"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "toptracks": {
      +      "description": "User top tracks container",
      +      "properties": {
      +        "@attr": {
      +          "properties": {
      +            "page": {
      +              "type": "string"
      +            },
      +            "perPage": {
      +              "type": "string"
      +            },
      +            "period": {
      +              "type": "string"
      +            },
      +            "total": {
      +              "type": "string"
      +            },
      +            "totalPages": {
      +              "type": "string"
      +            },
      +            "user": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "track": {
      +          "description": "Array of user top tracks",
      +          "items": {
      +            "properties": {
      +              "artist": {
      +                "properties": {
      +                  "name": {
      +                    "type": "string"
      +                  },
      +                  "url": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "image": {
      +                "items": {
      +                  "properties": {
      +                    "#text": {
      +                      "type": "string"
      +                    },
      +                    "size": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "name": {
      +                "description": "Track name",
      +                "type": "string"
      +              },
      +              "playcount": {
      +                "description": "User's play count",
      +                "type": "string"
      +              },
      +              "url": {
      +                "description": "Track URL",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, and the description adds the valid period set and the shape of the response (track names, artists, play counts). It also discloses the failure-relevant constraint that the username must come from the caller and must not be guessed or taken from examples, which goes beyond the structured fields. It does not discuss rate limits or what happens with an invalid/unknown username, keeping it below a 5.

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

Conciseness4/5

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

Two sentences, front-loaded with the core purpose before the exclusion, with no wasted clauses. The CAPS emphasis and nested parentheticals make it slightly noisy to read, but each element adds decision-relevant information.

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

Completeness5/5

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

For a three-parameter read tool with annotations and an output schema, the description covers purpose, period options, input provenance rules, and return contents. Nothing an agent needs to select or invoke it correctly is missing, aside from the minor unexplained limit parameter.

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?

With schema description coverage at 33% and no enums, the description carries real weight: it enumerates the allowed period values (overall/7day/1month/3month/6month/12month) and strongly constrains the semantics of the required user parameter. The limit parameter is never explained in the description, leaving one gap.

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 names a specific verb and resource ("Fetch a SPECIFIC NAMED Last.fm user's most-scrobbled tracks") plus the time-period dimension. It also explicitly separates this tool from chart_top_artists and tag_top_artists, so an agent can distinguish it from siblings without opening any schema.

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

Usage Guidelines5/5

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

It gives an explicit positive condition (only when the question names a Last.fm username), an explicit exclusion (NEVER for general "popular songs / top music" questions), and names the correct alternatives for the excluded case. It also states an anti-pattern (never with a guessed or example username), which the schema alone would not convey.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.