Skip to main content
Glama

Get Audio Features

get_audio_features
Read-onlyIdempotent

Audio features for a track: tempo (BPM), key, mode (major/minor), time_signature, energy, danceability, valence, acousticness, instrumentalness, liveness, speechiness, loudness. Spotify restricts this endpoint to apps with extended access; without it the call is refused with a plain permission message.

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": {
      "track_id": "11dFghVXANMlKmJXsNCQvb"
    },
    "name": "get_audio_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
track_idYesSpotify track ID

Output Schema

NameRequiredDescriptionDefault
idNoTrack ID
keyNoKey 0-11 (C=0 to B=11)
uriNoSpotify URI
modeNoMode: 1=major, 0=minor
tempoNoTempo in BPM
energyNoEnergy 0-1 (intensity/activity)
valenceNoValence 0-1 (musicality positivity)
livenessNoLiveness 0-1 (audience presence)
loudnessNoLoudness in dB
track_hrefNoTrack API endpoint
speechinessNoSpeechiness 0-1 (spoken words)
acousticnessNoAcousticness 0-1
analysis_urlNoDetailed audio analysis endpoint
danceabilityNoDanceability 0-1
time_signatureNoTime signature (4/4 = 4)
instrumentalnessNoInstrumentalness 0-1 (no vocals)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "track_id": "11dFghVXANMlKmJXsNCQvb"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Audio features for a track: tempo, key, energy, danceability, valence, etc.",
      +  "properties": {
      +    "acousticness": {
      +      "description": "Acousticness 0-1",
      +      "type": "number"
      +    },
      +    "analysis_url": {
      +      "description": "Detailed audio analysis endpoint",
      +      "type": "string"
      +    },
      +    "danceability": {
      +      "description": "Danceability 0-1",
      +      "type": "number"
      +    },
      +    "energy": {
      +      "description": "Energy 0-1 (intensity/activity)",
      +      "type": "number"
      +    },
      +    "id": {
      +      "description": "Track ID",
      +      "type": "string"
      +    },
      +    "instrumentalness": {
      +      "description": "Instrumentalness 0-1 (no vocals)",
      +      "type": "number"
      +    },
      +    "key": {
      +      "description": "Key 0-11 (C=0 to B=11)",
      +      "type": "number"
      +    },
      +    "liveness": {
      +      "description": "Liveness 0-1 (audience presence)",
      +      "type": "number"
      +    },
      +    "loudness": {
      +      "description": "Loudness in dB",
      +      "type": "number"
      +    },
      +    "mode": {
      +      "description": "Mode: 1=major, 0=minor",
      +      "type": "number"
      +    },
      +    "speechiness": {
      +      "description": "Speechiness 0-1 (spoken words)",
      +      "type": "number"
      +    },
      +    "tempo": {
      +      "description": "Tempo in BPM",
      +      "type": "number"
      +    },
      +    "time_signature": {
      +      "description": "Time signature (4/4 = 4)",
      +      "type": "number"
      +    },
      +    "track_href": {
      +      "description": "Track API endpoint",
      +      "type": "string"
      +    },
      +    "uri": {
      +      "description": "Spotify URI",
      +      "type": "string"
      +    },
      +    "valence": {
      +      "description": "Valence 0-1 (musicality positivity)",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds value beyond that by disclosing a hard external restriction — the endpoint is refused with a permission message for apps without extended access — which the agent cannot learn from annotations or schema. It does not mention rate limits or empty/failure payload shape, keeping it short of 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: an attribute list followed by the access caveat. The important constraint is placed prominently and there is no filler. The field enumeration is long but functional since it defines the return surface, though it partially overlaps with the existing output schema.

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?

For a single-parameter read tool with annotations and an output schema, the description covers purpose, return fields, and the one real operational gotcha (access eligibility). Nothing critical is missing; only the failure shape and any alternative track identifier handling are unaddressed.

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

Parameters3/5

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

There is a single parameter (track_id) with 100% schema description coverage, so the schema already carries the semantics. The description adds nothing about the ID format or where to obtain one; baseline 3 applies.

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?

The description names the resource (audio features for a track) and enumerates the specific attributes returned (tempo, key, mode, energy, danceability, etc.), so an agent knows precisely what comes back. It does not explicitly distinguish itself from the sibling get_track, which would be the natural confusion point, but the field list makes the scope unambiguous.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer it should call this when it needs musical attributes about a track. There is no explicit when-to-use vs. get_track guidance, but the note about extended-access apps is a genuine callability prerequisite that helps the agent anticipate failure.

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.