Skip to main content
Glama
timjrobinson

Freesound MCP Server

by timjrobinson

get_sound

Retrieve detailed metadata and content descriptors for audio samples from Freesound.org using sound IDs to analyze and access sound information.

Instructions

Get detailed information about a specific sound

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sound_idYesThe ID of the sound
descriptorsNoComma-separated list of content-based descriptors to include

Implementation Reference

  • src/index.ts:66-83 (registration)
    Registration of the 'get_sound' tool in the MCP tools list, including name, description, and input schema.
    {
      name: "get_sound",
      description: "Get detailed information about a specific sound",
      inputSchema: {
        type: "object",
        properties: {
          sound_id: {
            type: "number",
            description: "The ID of the sound",
          },
          descriptors: {
            type: "string",
            description: "Comma-separated list of content-based descriptors to include",
          },
        },
        required: ["sound_id"],
      },
    },
  • Input schema definition for the 'get_sound' tool.
    inputSchema: {
      type: "object",
      properties: {
        sound_id: {
          type: "number",
          description: "The ID of the sound",
        },
        descriptors: {
          type: "string",
          description: "Comma-separated list of content-based descriptors to include",
        },
      },
      required: ["sound_id"],
    },
  • MCP CallToolRequest handler for 'get_sound' that calls freesoundClient.getSound and returns JSON.
    case "get_sound": {
      const sound = await freesoundClient.getSound(
        args.sound_id as number,
        args.descriptors as string | undefined
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(sound, null, 2),
          },
        ],
      };
    }
  • Core implementation of getSound in FreesoundClient, fetching sound details via Freesound API.
    async getSound(soundId: number, descriptors?: string): Promise<Sound> {
      const response = await this.axiosInstance.get(`/sounds/${soundId}/`, {
        params: {
          descriptors: descriptors,
        },
      });
      return response.data;
    }
  • TypeScript interface defining the Sound object structure returned by getSound.
    export interface Sound {
      id: number;
      url: string;
      name: string;
      tags: string[];
      description: string;
      geotag: string | null;
      created: string;
      license: string;
      type: string;
      channels: number;
      filesize: number;
      bitrate: number;
      bitdepth: number;
      duration: number;
      samplerate: number;
      username: string;
      pack: string | null;
      pack_name: string | null;
      download: string;
      bookmark: string;
      previews: {
        [key: string]: string;
      };
      images: {
        waveform_m: string;
        waveform_l: string;
        spectral_m: string;
        spectral_l: string;
      };
      num_downloads: number;
      avg_rating: number;
      num_ratings: number;
      rate: string;
      comments: string;
      num_comments: number;
      comment: string;
      similar_sounds: string;
      analysis: string;
      analysis_frames: string;
      analysis_stats: string;
      [key: string]: any;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/timjrobinson/FreesoundMCPServer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server