Skip to main content
Glama
Stankye

AssemblyLine 4 MCP Server

by Stankye

al4_search_files

Search the AssemblyLine file store with Lucene queries to find files by type, date, or other attributes. Use syntax like 'type:executable/windows' for targeted results.

Instructions

Search the AssemblyLine file store using Lucene query syntax (e.g. 'type:executable/windows AND seen.last:[now-7d TO now]').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
fieldsNo
rowsNo
offsetNo
sortNo

Implementation Reference

  • The MCP tool handler dispatches 'al4_search_files' to client.searchFiles() with parsed search options.
    case "al4_search_files":
      result = await client.searchFiles(buildSearchOptions(a));
      break;
  • Helper function that extracts and maps the tool's input arguments (query, fields, rows, offset, sort) into SearchOptions.
    function buildSearchOptions(args: Record<string, unknown>) {
      return {
        query: args.query as string,
        fl: args.fields as string | undefined,
        rows: args.rows as number | undefined,
        offset: args.offset as number | undefined,
        sort: args.sort as string | undefined,
      };
    }
  • The actual implementation: sends a GET request to /api/v4/search/file/ with the Lucene query as URL parameters.
    searchFiles(opts: SearchOptions): Promise<Record<string, unknown>> {
      return this.requestJson(
        "GET",
        `/api/v4/search/file/?${this.buildSearchParams(opts)}`,
        undefined,
        opts,
      );
    }
  • Builds URL search params from SearchOptions, converting 'fields' to 'fl' for the API.
    private buildSearchParams(opts: SearchOptions): string {
      if (!opts.query) throw new Error("SearchOptions.query is required");
      const p = new URLSearchParams({ query: opts.query });
      if (opts.fl) p.set("fl", opts.fl);
      if (opts.rows !== undefined)
        p.set("rows", String(Math.max(0, Math.floor(opts.rows))));
      if (opts.offset !== undefined)
        p.set("offset", String(Math.max(0, Math.floor(opts.offset))));
      if (opts.sort) p.set("sort", opts.sort);
      if (opts.filters) opts.filters.forEach((f) => p.append("filters", f));
      return p.toString();
    }
  • src/index.ts:241-256 (registration)
    The tool registration in the TOOLS array with its name, description, and JSON Schema input definition.
    {
      name: "al4_search_files",
      description:
        "Search the AssemblyLine file store using Lucene query syntax (e.g. 'type:executable/windows AND seen.last:[now-7d TO now]').",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string" },
          fields: { type: "string" },
          rows: { type: "number" },
          offset: { type: "number" },
          sort: { type: "string" },
        },
        required: ["query"],
      },
    },
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the use of Lucene query syntax but does not mention behavioral traits like read-only nature, authentication needs, rate limits, or pagination. It is adequate but not comprehensive.

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, well-structured sentence with an inline example. It is front-loaded and efficient, with no wasted words.

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 lack of output schema and poor parameter documentation, the description is incomplete. It does not explain the return format, how to interpret results, or provide details on most parameters, making it insufficient for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description should explain parameters. It only describes the 'query' parameter with an example, leaving 'fields', 'rows', 'offset', and 'sort' undocumented. This is insufficient for proper use.

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?

The description clearly specifies the action (Search), the resource (AssemblyLine file store), and the query syntax (Lucene) with an example. It distinguishes from sibling tools that search other resources (alerts, results, submissions).

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

Usage Guidelines4/5

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

The description states when to use this tool (search file store) and provides a usage example with Lucene syntax. However, it does not explicitly mention when not to use or name specific alternatives, though the sibling names imply those.

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/Stankye/vibe-assemblylinev4-mcp'

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