Skip to main content
Glama
timjrobinson

Freesound MCP Server

by timjrobinson

get_pack_sounds

Retrieve audio samples from a specific sound pack on Freesound.org using the pack ID. Specify page number and results per page to navigate large collections.

Instructions

Get sounds from a specific pack

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pack_idYesThe ID of the pack
pageNoPage number (default: 1)
page_sizeNoNumber of results per page (default: 15)

Implementation Reference

  • MCP CallToolRequest handler case for 'get_pack_sounds': parses arguments, calls FreesoundClient.getPackSounds, and returns results as JSON-formatted text content.
    case "get_pack_sounds": {
      const sounds = await freesoundClient.getPackSounds(
        args.pack_id as number,
        {
          page: args.page as number | undefined,
          page_size: args.page_size as number | undefined,
        }
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(sounds, null, 2),
          },
        ],
      };
    }
  • src/index.ts:182-203 (registration)
    Registration of the 'get_pack_sounds' tool in the ListTools response, defining its name, description, and input schema.
    {
      name: "get_pack_sounds",
      description: "Get sounds from a specific pack",
      inputSchema: {
        type: "object",
        properties: {
          pack_id: {
            type: "number",
            description: "The ID of the pack",
          },
          page: {
            type: "number",
            description: "Page number (default: 1)",
          },
          page_size: {
            type: "number",
            description: "Number of results per page (default: 15)",
          },
        },
        required: ["pack_id"],
      },
    },
  • Helper method in FreesoundClient that performs the API request to retrieve paginated list of sounds from a specific pack.
    async getPackSounds(
      packId: number,
      params?: PaginationParams
    ): Promise<PaginatedResults<Sound>> {
      const response = await this.axiosInstance.get(`/packs/${packId}/sounds/`, {
        params: {
          page: params?.page || 1,
          page_size: params?.page_size || 15,
        },
      });
      return response.data;
    }

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