Skip to main content
Glama

search_relevant_assets

Find assets related to your search query to support project development and content discovery.

Instructions

Search for assets relevant to a query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
limitNoNumber of results to return (default: 10)

Implementation Reference

  • MCP tool handler that parses arguments, calls the API client's searchRelevantAssets method, and returns formatted JSON response with search results.
    handler: async (args) => {
      const { query, limit = 10 } = args;
      const result = await apiClient.searchRelevantAssets(query, limit);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            data: result,
            message: `Found ${result.items?.length || 0} relevant assets for "${query}"`
          }, null, 2)
        }]
      };
  • Input schema defining required 'query' string and optional 'limit' number for the search_relevant_assets tool.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query"
        },
        limit: {
          type: "number",
          description: "Number of results to return (default: 10)",
          default: 10
        }
      },
      required: ["query"]
    },
  • server.js:867-898 (registration)
    Full tool registration object in the tools array, including name, description, inputSchema, and handler reference.
    {
      name: "search_relevant_assets",
      description: "Search for assets relevant to a query",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query"
          },
          limit: {
            type: "number",
            description: "Number of results to return (default: 10)",
            default: 10
          }
        },
        required: ["query"]
      },
      handler: async (args) => {
        const { query, limit = 10 } = args;
        const result = await apiClient.searchRelevantAssets(query, limit);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              data: result,
              message: `Found ${result.items?.length || 0} relevant assets for "${query}"`
            }, null, 2)
          }]
        };
      }
  • API client helper method that performs the HTTP request to WebSim's relevant assets search endpoint.
    async searchRelevantAssets(query, limit = 10) {
      const params = new URLSearchParams({ q: query, limit: limit.toString() });
      return this.makeRequest(`/api/v1/search/assets/relevant?${params}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool searches for assets, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, has rate limits, returns paginated results, or what 'relevant' means in terms of ranking. This leaves significant gaps for an agent.

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 with zero waste. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary details, earning its place concisely.

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's complexity (search operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral context, making it inadequate for an agent to fully understand the tool's 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?

Schema description coverage is 100%, with clear documentation for 'query' and 'limit' parameters. The description adds no meaning beyond the schema, as it doesn't explain parameter semantics like query syntax or limit constraints. Baseline score of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for assets relevant to a query' clearly states the verb ('search') and resource ('assets'), but it's vague about what 'assets' are and doesn't distinguish from siblings like 'search_assets' or 'bulk_asset_search'. It provides a basic purpose but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives such as 'search_assets' or 'bulk_asset_search'. The description implies usage for searching assets with a query, but there's no explicit context, exclusions, or comparison to sibling tools.

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/gigachadtrey/websimm'

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