Skip to main content
Glama

Analyze audio

analyze_audio
Read-only

Analyze an audio file. Modes:

  • transcript: Speech-to-text with word-level timestamps — returns {language, full_text, words} where each word is {word, start_ms, end_ms, punctuated_word}. ⚠ MILLISECONDS here; get_clip's voiceover_words gives the same words in SECONDS as {word, start, end}. Use for caption timing, script editing, or word-level visual sync. Works on narration and on sung lyrics: the provider is picked from the content, and if it returns nothing the other one is tried automatically. So an empty words means the audio genuinely has no intelligible speech, not that the wrong engine ran.

  • silences: returns {silences, total_silence_ms}, each span {start_ms, end_ms, peak_db}. Use for auto-trim, smart-split, or pause-aware editing.

  • beats: returns {tempo_bpm, beats_ms} — beats_ms is an array of MILLISECOND positions. Empty for non-music. Use to align animations/zooms to a beat.

  • features: returns {duration_ms, peak_db, rms_db, lufs, has_music, has_speech, speech_share} — loudness plus two INDEPENDENT hints — has_music (beats hold a steady period) and has_speech (at least 40% of the audible seconds sound like talking; speech_share is that share, 0-1). Instrumentals read false; so do sung vocals and narration under a loud bed, so when the words matter, use transcript. Cheap dispatcher — call once to pick a mode, or for duration_ms to pass as add_audio's source_duration.

  • energy: loudness over time — {samples_per_second, start_ms, db}, db one RMS dBFS value per 1/samples_per_second s from start_ms (default 4 a second; energy_options.samples_per_second 1-20). Read builds, dips and hits from it.

  • sections: how a track is built — {loud_db, sections: [{label, start_ms, end_ms, db, onsets_per_s}], drops: [{t_ms, rise_db, quiet_start_ms?, quiet_end_ms?}]}, label intro | build | drop | main | breakdown | outro; a drop's t_ms is the hit (within ~10 ms), quiet_* the dip just before it. Set animation cues on beats (beats mode) or drops.

  • describe: what the audio IS — {kind: speech|music|mixed, classification_confidence, duration_seconds, music?: {tempo_bpm, key, mood, genre, energy, instruments, description, suggested_search_query}, speech?: {...}}. Pass suggested_search_query to find(type='music') for a similar track. Speech is not transcribed here; use transcript for the words.

Source: provide exactly one of mcp_upload_id (from upload tool) or file_url (already-public URL, e.g. a find(type='music') result or Clueso CDN file). Optional time range: range_start_ms / range_end_ms crops the analysis window.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>"
    },
    "name": "analyze_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesWhich analysis to run.
file_urlNoPublic http(s) URL to the audio. Use when the file is already accessible (e.g. find(type='music') result, Clueso CDN). Validated against private/loopback ranges.
range_end_msNoEnd of analysis window in milliseconds. Default: whole file.
mcp_upload_idNomcp_upload_id from upload_file, or a Clueso upload_id. Use this OR file_url, not both.
energy_optionsNoOptions for mode='energy'.
range_start_msNoStart of analysis window in milliseconds. Default 0 (beginning).
silences_optionsNoOptions for mode='silences'.
transcript_optionsNoOptions for mode='transcript'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / mcp_upload_id / description
      Previous value: -"MCP upload ID from the upload_file tool. Use this OR file_url, not both."New value: +"mcp_upload_id from upload_file, or a Clueso upload_id. Use this OR file_url, not both."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "transcript",
      -  "silences",
      -  "beats",
      -  "features",
      -  "energy",
      -  "sections"
      -]New value: +[
      +  "transcript",
      +  "silences",
      +  "beats",
      +  "features",
      +  "energy",
      +  "sections",
      +  "describe"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / energy_options
      Added value: +{
      +  "description": "Options for mode='energy'.",
      +  "properties": {
      +    "samples_per_second": {
      +      "description": "Loudness values per second. Default 4.",
      +      "maximum": 20,
      +      "minimum": 1,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "transcript",
      -  "silences",
      -  "beats",
      -  "features"
      -]New value: +[
      +  "transcript",
      +  "silences",
      +  "beats",
      +  "features",
      +  "energy",
      +  "sections"
      +]
  3. Changed4 schema fields changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
    • removedInput schema / properties / conversation_id
      Removed value: -{
      -  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      -  "type": "string"
      -}
    • removedInput schema / properties / llm_model
      Removed value: -{
      -  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "mode",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "mode"
      +]
  4. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "mode"
      -]New value: +[
      +  "mode",
      +  "context",
      +  "llm_model"
      +]
  5. Changed7 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / range_end_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / range_start_ms / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / silences_options / additionalProperties
      Removed value: -false
    • addedInput schema / properties / silences_options / properties / min_pause_ms / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / transcript_options / additionalProperties
      Removed value: -false
  6. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish read-only, non-destructive behavior, but the description goes well beyond: provider auto-fallback so an empty `words` is genuine silence, the 40% speech-share threshold and its known false negatives, ~10ms drop accuracy, empty beats_ms for non-music, and the cheap-dispatcher note. These are exactly the caveats an agent would otherwise misread as failure.

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?

Front-loaded with the verb and a 'Modes:' header, then one bullet per mode that pairs output shape with the decision it enables — no filler. It is long, but the length is bought by seven modes and a missing output schema; the only slack is a few rhetorical asides that could be trimmed.

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?

With no output schema and seven return shapes, the description compensates fully: each mode documents its fields, units, and edge cases (empty words, empty beats, false instrumentals). Source selection and time-window cropping are both covered, so nothing needed to call it correctly is missing.

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 coverage is already 100%, so the baseline is 3; the description still adds meaning by stating that range_start_ms/range_end_ms crop the analysis window and that exactly one of mcp_upload_id or file_url must be supplied, with file_url scoped to public/Clueso CDN sources. It also ties energy_options.samples_per_second to the resulting db array resolution rather than just restating the bound.

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?

States a specific verb (analyze) and resource (audio file), then enumerates all seven modes with their distinct outputs. An agent can tell exactly which capability this covers and distinguish it from upload_file, extract_audio, or get_clip without opening the 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?

Every mode carries its own 'use for' statement (caption timing, auto-trim, beat-aligned zooms, picking a mode, animation cues). It also names alternatives and the conditions that select them: get_clip's voiceover_words for seconds instead of ms, find(type='music') for the suggested search query, transcript instead of features when words matter, and add_audio for source_duration.

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.