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;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action without details on permissions, rate limits, pagination behavior, or error handling. It doesn't mention whether this is a read-only operation, what the output format looks like, or any constraints beyond the implied search functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose ('Search for sounds on Freesound') and specifies the method ('using text queries'), making it easy to parse quickly with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the return values, pagination behavior, error cases, or how results are structured, leaving significant gaps for an AI agent to understand the tool's full context and usage.

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?

The description adds no parameter-specific information beyond what's already in the schema, which has 100% coverage with detailed descriptions for all 5 parameters. Since the schema fully documents parameters like 'query', 'filter', 'sort', 'page', and 'page_size', the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 clearly states the action ('Search for sounds') and resource ('on Freesound') with the method ('using text queries'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_similar_sounds' or 'get_user_sounds' that might also retrieve sounds, missing explicit distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_similar_sounds' for similarity-based retrieval or 'get_user_sounds' for user-specific sounds. It lacks context about use cases, prerequisites, or exclusions, offering only a basic functional statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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