Skip to main content
Glama

search_assets

Search pre-cleared, commercially licensed AI-generated assets matched to a creative brief. Returns a ranked shortlist with compliance status, format, platform, and rationale.

Instructions

Search PixelVault for pre-cleared, commercially licensed AI-generated assets matched to a creative brief. Every asset is sourced from licensed AI platforms (Adobe Firefly, Moonvalley) and carries a compliance-cleared status. Returns a ranked shortlist with compliance status, format, platform, and rationale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
briefYesNatural language description of the visual asset needed.
license_typeNoLicense type required. Auto-detected from brief if omitted.
formatNoAsset format filter.
verticalNoVertical: post production, editorial, or ecommerce.
territoryNoDistribution territory (e.g. Worldwide, US Only).

Implementation Reference

  • The main handler function `handleSearchAssets` that executes the search_assets tool logic. It parses the brief/filters, calls the PixelVault API via apiFetch, formats the results, and returns the response.
    async function handleSearchAssets(args) {
      const { brief, license_type, format, vertical, territory } = args;
      const filters = briefToFilters(brief, { license_type, format, vertical });
      let data;
      try {
        data = await apiFetch('/assets?' + new URLSearchParams(filters).toString());
      } catch (err) {
        return { content: [{ type: 'text', text: `Error querying PixelVault: ${err.message}\n\nVisit ${SITE_URL} directly.` }], isError: true };
      }
      const assets = (data.assets || []).slice(0, 10);
      if (assets.length === 0) {
        return { content: [{ type: 'text', text: `No assets found for: "${brief}"\n\nTry a broader brief or visit ${SITE_URL}` }] };
      }
      const text = [
        `PixelVault — Pre-Cleared Asset Shortlist`,
        `Brief: "${brief}"`,
        territory ? `Territory: ${territory}` : null,
        `License: ${filters.use_case || 'All'} | Status: All Cleared`,
        ``,
        `${assets.length} candidates found:`,
        ``,
        ...assets.map((a, i) => formatAsset(a, i)),
        ``,
        `All assets are pre-cleared. Human approval required. Use generate_usage_agreement after approval.`,
        `Checkout: ${SITE_URL}`,
      ].filter(l => l !== null).join('\n');
      return { content: [{ type: 'text', text }] };
    }
  • Input schema for search_assets tool, defining the 'brief' (required), 'license_type', 'format', 'vertical', and 'territory' parameters with types and descriptions.
    inputSchema: {
      type: 'object',
      properties: {
        brief: { type: 'string', description: 'Natural language description of the visual asset needed.' },
        license_type: { type: 'string', enum: ['Film & TV', 'Editorial', 'Commercial'], description: 'License type required. Auto-detected from brief if omitted.' },
        format: { type: 'string', enum: ['video', 'image'], description: 'Asset format filter.' },
        vertical: { type: 'string', description: 'Vertical: post production, editorial, or ecommerce.' },
        territory: { type: 'string', description: 'Distribution territory (e.g. Worldwide, US Only).' },
      },
      required: ['brief'],
    },
  • src/index.js:55-69 (registration)
    Tool registration in the TOOLS array, defining the name 'search_assets', its description, and input schema.
    {
      name: 'search_assets',
      description: 'Search PixelVault for pre-cleared, commercially licensed AI-generated assets matched to a creative brief. Every asset is sourced from licensed AI platforms (Adobe Firefly, Moonvalley) and carries a compliance-cleared status. Returns a ranked shortlist with compliance status, format, platform, and rationale.',
      inputSchema: {
        type: 'object',
        properties: {
          brief: { type: 'string', description: 'Natural language description of the visual asset needed.' },
          license_type: { type: 'string', enum: ['Film & TV', 'Editorial', 'Commercial'], description: 'License type required. Auto-detected from brief if omitted.' },
          format: { type: 'string', enum: ['video', 'image'], description: 'Asset format filter.' },
          vertical: { type: 'string', description: 'Vertical: post production, editorial, or ecommerce.' },
          territory: { type: 'string', description: 'Distribution territory (e.g. Worldwide, US Only).' },
        },
        required: ['brief'],
      },
    },
  • src/index.js:180-188 (registration)
    The CallToolRequestSchema handler that routes the 'search_assets' tool name to the handleSearchAssets function via a switch statement.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      try {
        switch (name) {
          case 'search_assets': return await handleSearchAssets(args);
          case 'get_asset_details': return await handleGetAssetDetails(args);
          case 'generate_usage_agreement': return await handleGenerateUsageAgreement(args);
          default: throw new Error(`Unknown tool: ${name}`);
        }
  • Helper function `briefToFilters` used by handleSearchAssets to parse the natural language brief and extract relevant filters (use_case, format).
    function briefToFilters(brief = '', overrides = {}) {
      const b = brief.toLowerCase();
      let use_case = overrides.vertical || overrides.license_type || null;
      if (!use_case) {
        if (b.includes('film') || b.includes('tv') || b.includes('broadcast') || b.includes('streaming') || b.includes('b-roll')) {
          use_case = 'Film & TV';
        } else if (b.includes('editorial') || b.includes('news') || b.includes('magazine')) {
          use_case = 'Editorial';
        } else if (b.includes('ecommerce') || b.includes('brand') || b.includes('commercial')) {
          use_case = 'Commercial';
        }
      }
      const filters = {};
      if (use_case) filters.use_case = use_case;
      if (overrides.format) filters.type = overrides.format;
      return filters;
    }
  • Helper function `formatAsset` used by handleSearchAssets to format each asset into a human-readable string for the response.
    function formatAsset(asset, index) {
      const lines = [
        `[${index + 1}] ${asset.title || 'Untitled'} (ID: ${asset.asset_id || asset.id})`,
        `    Platform: ${asset.source_platform || 'Unknown'} | Status: ${asset.compliance_status || 'Cleared'} | Format: ${asset.type || 'Video'}`,
        `    Price: ${asset.price ? `$${asset.price}` : 'See site'}`,
      ];
      if (asset.description) lines.push(`    Description: ${asset.description}`);
      if (asset.emotional_tone) lines.push(`    Tone: ${asset.emotional_tone}`);
      lines.push(`    View: ${SITE_URL}`);
      return lines.join('\n');
    }
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses asset sourcing, compliance status, and output structure (ranked shortlist with specific fields). Lacks details on limitations, pagination, or rate limits, but sufficient for a search tool.

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?

Two sentences, front-loaded with purpose, second sentence adds output details. No wasted words, efficient and clear.

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

Completeness4/5

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

For a 5-parameter search tool with no output schema, description covers source, compliance, and output fields. Missing details on ranking criteria and empty results handling, but still fairly complete.

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 coverage is 100%, so baseline is 3. Description adds context about matching to a brief and output fields, but does not significantly enhance parameter understanding beyond schema.

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

Purpose5/5

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

Description clearly states the tool searches for pre-cleared, commercially licensed AI-generated assets matched to a creative brief, specifies source platforms and output fields. Distinguishes well from sibling tools (generate_usage_agreement, get_asset_details).

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives. Usage is implicitly clear from purpose, but lacks when-not or alternative tool references.

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/rsweeting1/pixelvault-mcp'

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