Skip to main content
Glama

search_objects

Find objects in Huawei OBS buckets using filters like prefix, suffix, file type, size, and modification date to locate specific files.

Instructions

Search for objects in a bucket from the 'huawei_obs' source. Supports filtering by prefix, suffix, extensions, glob patterns, file size, and modification date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesThe name of the bucket to search in
prefixNoFilter objects by key prefix
suffixNoFilter objects by key suffix
extensionsNoFilter by file extensions (e.g., ['.jpg', '.png'])
patternNoGlob pattern to match object keys (e.g., '*.txt', 'folder/**/file.json')
min_sizeNoMinimum file size in bytes
max_sizeNoMaximum file size in bytes
modified_afterNoFilter objects modified after this date (ISO 8601 format)
modified_beforeNoFilter objects modified before this date (ISO 8601 format)
max_resultsNoMaximum number of results to return (default: 100)

Implementation Reference

  • The handler function that executes the logic for the 'search_objects' tool. Currently a placeholder returning structured error info for unimplemented search.
    async (args) => {
      // TODO: Implement actual object search with storage provider
      return createToolSuccessResponse({
        message: `Object search in '${sourceId}' not yet implemented`,
        bucket: args.bucket,
        filter: {
          prefix: args.prefix,
          suffix: args.suffix,
          extensions: args.extensions,
          pattern: args.pattern,
          min_size: args.min_size,
          max_size: args.max_size,
          modified_after: args.modified_after,
          modified_before: args.modified_before,
          max_results: args.max_results || 100,
        },
        source_id: sourceId,
        note: "Storage provider integration pending",
      });
    }
  • Input schema using Zod validation for the search_objects tool parameters.
    {
      bucket: z.string().describe("The name of the bucket to search in"),
      prefix: z.string().optional().describe("Filter objects by key prefix"),
      suffix: z.string().optional().describe("Filter objects by key suffix"),
      extensions: z.array(z.string()).optional().describe("Filter by file extensions (e.g., ['.jpg', '.png'])"),
      pattern: z.string().optional().describe("Glob pattern to match object keys (e.g., '*.txt', 'folder/**/file.json')"),
      min_size: z.number().optional().describe("Minimum file size in bytes"),
      max_size: z.number().optional().describe("Maximum file size in bytes"),
      modified_after: z.string().optional().describe("Filter objects modified after this date (ISO 8601 format)"),
      modified_before: z.string().optional().describe("Filter objects modified before this date (ISO 8601 format)"),
      max_results: z.number().optional().describe("Maximum number of results to return (default: 100)"),
    },
  • src/server.ts:251-286 (registration)
    Registration of the search_objects tool using McpServer.tool(), dynamically suffixed per storage source. Includes description, schema, and handler.
    server.tool(
      `search_objects${toolSuffix}`,
      `Search for objects in a bucket from the '${sourceId}' source. Supports filtering by prefix, suffix, extensions, glob patterns, file size, and modification date.`,
      {
        bucket: z.string().describe("The name of the bucket to search in"),
        prefix: z.string().optional().describe("Filter objects by key prefix"),
        suffix: z.string().optional().describe("Filter objects by key suffix"),
        extensions: z.array(z.string()).optional().describe("Filter by file extensions (e.g., ['.jpg', '.png'])"),
        pattern: z.string().optional().describe("Glob pattern to match object keys (e.g., '*.txt', 'folder/**/file.json')"),
        min_size: z.number().optional().describe("Minimum file size in bytes"),
        max_size: z.number().optional().describe("Maximum file size in bytes"),
        modified_after: z.string().optional().describe("Filter objects modified after this date (ISO 8601 format)"),
        modified_before: z.string().optional().describe("Filter objects modified before this date (ISO 8601 format)"),
        max_results: z.number().optional().describe("Maximum number of results to return (default: 100)"),
      },
      async (args) => {
        // TODO: Implement actual object search with storage provider
        return createToolSuccessResponse({
          message: `Object search in '${sourceId}' not yet implemented`,
          bucket: args.bucket,
          filter: {
            prefix: args.prefix,
            suffix: args.suffix,
            extensions: args.extensions,
            pattern: args.pattern,
            min_size: args.min_size,
            max_size: args.max_size,
            modified_after: args.modified_after,
            modified_before: args.modified_before,
            max_results: args.max_results || 100,
          },
          source_id: sourceId,
          note: "Storage provider integration pending",
        });
      }
    );
  • Type definition for SearchObjectsStorageToolConfig interface used in tool configuration.
    export interface SearchObjectsStorageToolConfig {
      name: "search_objects";
      source: string;
      /** Maximum search results */
      max_results?: number;
    }
  • Listing of 'search_objects' as a built-in storage tool name in BUILTIN_STORAGE_TOOLS array.
    "search_objects",
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the supported filtering parameters but doesn't describe important behavioral aspects like pagination behavior (only mentions 'max_results' default), error conditions, authentication requirements, rate limits, or what the output format looks like. For a search tool with 10 parameters, this leaves significant gaps.

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

Conciseness4/5

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

The description is efficiently structured as a single sentence that immediately states the core purpose and enumerates the filtering capabilities. It's appropriately sized for the tool's complexity, though it could potentially be more front-loaded with critical behavioral information given the lack of annotations.

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?

For a search tool with 10 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (object metadata, full objects, or just keys), doesn't mention pagination beyond the 'max_results' parameter default, and provides no information about error handling or authentication requirements. The description leaves too many open questions for effective tool use.

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 lists the supported filtering capabilities (prefix, suffix, extensions, glob patterns, file size, modification date), which provides context about what the parameters do collectively. However, with 100% schema description coverage where each parameter is already well-documented in the schema, the description adds only marginal value beyond what's already in the structured data.

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 objects') and resource ('in a bucket from the 'huawei_obs' source'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from its sibling 'list_objects', which appears to serve a similar listing function, preventing a perfect score.

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 'list_objects' or 'search_db_objects'. It mentions supported filtering capabilities but doesn't indicate whether this is the primary tool for object searches or if there are specific scenarios where other tools should be preferred.

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/zq940222/hybrid-mcp'

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