Skip to main content
Glama

search_assets

Find WebSim assets by entering a search query to browse projects, discover content, and access community resources.

Instructions

Search for WebSim assets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
limitNoNumber of results to return (default: 20)
offsetNoNumber of results to skip (default: 0)

Implementation Reference

  • The main execution handler for the search_assets MCP tool. Validates input parameters using Zod's SearchParamsSchema, invokes the API client's searchAssets helper, formats the response as MCP content, and includes success metadata.
    handler: async (args) => {
      const { query, limit = 20, offset = 0 } = SearchParamsSchema.parse(args);
      const result = await apiClient.searchAssets(query, limit, offset);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            data: result,
            message: `Found ${result.items?.length || 0} assets matching "${query}"`
          }, null, 2)
        }]
      };
    }
  • JSON schema defining the input parameters for the search_assets tool as required by MCP protocol (query required, limit/offset optional).
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query"
        },
        limit: {
          type: "number",
          description: "Number of results to return (default: 20)",
          default: 20
        },
        offset: {
          type: "number",
          description: "Number of results to skip (default: 0)",
          default: 0
        }
      },
      required: ["query"]
    },
  • server.js:786-823 (registration)
    Complete tool registration object added to the tools array, specifying name 'search_assets', description, input schema, and inline handler function.
    {
      name: "search_assets",
      description: "Search for WebSim assets",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query"
          },
          limit: {
            type: "number",
            description: "Number of results to return (default: 20)",
            default: 20
          },
          offset: {
            type: "number",
            description: "Number of results to skip (default: 0)",
            default: 0
          }
        },
        required: ["query"]
      },
      handler: async (args) => {
        const { query, limit = 20, offset = 0 } = SearchParamsSchema.parse(args);
        const result = await apiClient.searchAssets(query, limit, offset);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              data: result,
              message: `Found ${result.items?.length || 0} assets matching "${query}"`
            }, null, 2)
          }]
        };
      }
    },
  • API client helper method that constructs the search query parameters and makes an HTTP GET request to WebSim's /api/v1/search/assets endpoint.
    async searchAssets(query, limit = 20, offset = 0) {
      const params = new URLSearchParams({ 
        q: query, 
        limit: limit.toString(), 
        offset: offset.toString() 
      });
      return this.makeRequest(`/api/v1/search/assets?${params}`);
    }
  • Zod schema used for runtime input validation within the tool handler, matching the MCP inputSchema.
    const SearchParamsSchema = z.object({
      query: z.string().describe('Search query'),
      limit: z.number().optional().default(20).describe('Number of results to return (default: 20)'),
      offset: z.number().optional().default(0).describe('Number of results to skip (default: 0)')
    });
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 of behavioral disclosure. While 'Search' implies a read-only operation, the description doesn't mention any behavioral traits such as rate limits, authentication requirements, pagination behavior, or what constitutes a 'WebSim asset'. For a search tool with zero annotation coverage, this is a significant gap in transparency.

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 wasted words. It's appropriately sized and front-loaded with the core purpose, making it easy for an AI agent to parse quickly. Every word earns its place by conveying essential information without redundancy.

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 complexity of a search operation with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'WebSim assets' are, how results are structured, or behavioral aspects like pagination or error handling. For a tool with multiple siblings and no structured output documentation, more context is needed to ensure proper 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 input schema has 100% description coverage, with clear documentation for 'query', 'limit', and 'offset' parameters. The description adds no additional semantic meaning beyond what the schema provides (e.g., it doesn't explain query syntax, result ordering, or what 'assets' include). With high schema coverage, a baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.

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 WebSim assets' clearly states the verb ('Search') and resource ('WebSim assets'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'search_feed', 'search_relevant_assets', or 'bulk_asset_search', leaving ambiguity about when to use this specific search tool versus alternatives.

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. With multiple search-related siblings (e.g., 'search_feed', 'search_relevant_assets', 'bulk_asset_search'), there's no indication of context, prerequisites, or exclusions. This lack of differentiation could lead to incorrect tool selection by an AI agent.

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