Skip to main content
Glama
timjrobinson

Freesound MCP Server

by timjrobinson

search_sounds

Search for audio samples on Freesound using text queries, filters, and sorting options to find specific sound effects or music clips.

Instructions

Search for sounds on Freesound using text queries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query terms
filterNoFilter query using Solr syntax (e.g., 'duration:[1 TO 5]')
sortNoSort results by: score, duration_desc, duration_asc, created_desc, created_asc, downloads_desc, downloads_asc, rating_desc, rating_asc
pageNoPage number (default: 1)
page_sizeNoNumber of results per page (default: 15, max: 150)

Implementation Reference

  • Core implementation of the search_sounds tool logic, making API call to Freesound search endpoint.
    async searchSounds(params: SearchParams): Promise<SearchResults> { const response = await this.axiosInstance.get('/search/text/', { params: { query: params.query, filter: params.filter, sort: params.sort, page: params.page || 1, page_size: params.page_size || 15, group_by_pack: params.group_by_pack ? 1 : 0, }, }); return response.data; }
  • MCP tool handler switch case that processes the call to search_sounds and returns results as JSON.
    case "search_sounds": { const results = await freesoundClient.searchSounds({ query: args.query as string, filter: args.filter as string | undefined, sort: args.sort as string | undefined, page: args.page as number | undefined, page_size: args.page_size as number | undefined, }); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; }
  • src/index.ts:35-65 (registration)
    Tool registration in ListTools handler, including name, description, and input schema.
    { name: "search_sounds", description: "Search for sounds on Freesound using text queries", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query terms", }, filter: { type: "string", description: "Filter query using Solr syntax (e.g., 'duration:[1 TO 5]')", }, sort: { type: "string", description: "Sort results by: score, duration_desc, duration_asc, created_desc, created_asc, downloads_desc, downloads_asc, rating_desc, rating_asc", enum: ["score", "duration_desc", "duration_asc", "created_desc", "created_asc", "downloads_desc", "downloads_asc", "rating_desc", "rating_asc"], }, page: { type: "number", description: "Page number (default: 1)", }, page_size: { type: "number", description: "Number of results per page (default: 15, max: 150)", }, }, required: ["query"], }, },
  • TypeScript interface defining the parameters for the searchSounds method.
    export interface SearchParams { query: string; filter?: string; sort?: string; page?: number; page_size?: number; group_by_pack?: boolean; }

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