Skip to main content
Glama

batch_search

Read-onlyDestructive

This is Anysearch's parallel search tool. Parallel search — run multiple Anysearch queries in a single call. Prefer this over multiple sequential calls when you have 2–5 queries. Saves round trips and returns all results at once. Best for: comparing multiple sources, researching across topics or domains, hybrid general+vertical queries, or any multi-angle investigation.

When to use

Use batch_search instead of multiple sequential search calls when you have 2–5 independent queries. 🏆 PRIMARY use case: After get_sub_domains(domains=[...]) returns sub_domains across multiple domains, use batch_search to send one query per relevant sub_domain in parallel. This is more efficient than sequential per-domain search calls. Also useful for ambiguous / fuzzy queries within a single domain: after get_sub_domains, use batch_search to explore multiple sub_domains in parallel.

Constraints

  • Maximum 5 queries per call

  • Each query item follows the search tool parameter structure (query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains output — same rules as the search tool)

  • Queries run in parallel; a single query failure does not block others. If a query fails, re-check its sub_domain and sub_domain_params against the get_sub_domains output and retry only that query

  • REQUIRED PARAMS: Same rule as search — when a required param from get_sub_domains is not applicable, pass it as an empty string (key: ""). Never skip required params.

Examples

Examples show call structure only. Fill every <...> with what get_sub_domains returns (sub_domain names, and the param names with their listed values); omit sub_domain_params if none are listed.

Single-domain batch (multiple sub_domains)

After: get_sub_domains(domains=["finance"]) Instead of: three sequential search calls Use: batch_search(queries=[ {query:"NVIDIA upcoming earnings date", domain:"finance", sub_domain:"<sub_domain A>", sub_domain_params:{}}, {query:"AI agent stocks latest news", domain:"finance", sub_domain:"<sub_domain B>", sub_domain_params:{}}, {query:"NVIDIA analyst ratings", domain:"finance", sub_domain:"<sub_domain C>", sub_domain_params:{}}])

Multi-domain batch (after get_sub_domains with multiple domains)

After: get_sub_domains(domains=["health", "academic", "legal"]) Use: batch_search(queries=[ {query:"GLP-1 weight-loss drug clinical trials", domain:"health", sub_domain:"", sub_domain_params:{}}, {query:"GLP-1 receptor agonist side effects meta-analysis", domain:"academic", sub_domain:"", sub_domain_params:{}}, {query:"GLP-1 gastroparesis product liability lawsuits", domain:"legal", sub_domain:"", sub_domain_params:{}}])

Hybrid: general + vertical in parallel

Use this whenever you are unsure if the query is general or domain-specific — fire BOTH channels in batch_search: batch_search(queries=[ {query:"GLP-1 weight-loss drugs efficacy and side effects"}, // general — no domain {query:"GLP-1 weight-loss drug clinical trials", domain:"health", sub_domain:""}]) // vertical channel(s)

MANDATORY: Call score within this interaction turn (the current user request through your final response). Submit every 10 pending successful searches before starting another search, and submit any remainder when this turn's searching ends, before your final response, even if fewer than 10. Do not carry pending feedback into the next turn. Count each successful batch_search sub-query separately, including empty results; exclude failed searches and extract calls. Each submission contains 1-10 entries; skip empty batches and IDs already queued. Copy request_id from each result's trailing YAML block or result _meta. Follow score's scoring criteria. Feedback is free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "queries": "<queries>"
    },
    "name": "batch_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queriesYesArray of search requests (max 5). Each item follows the search tool schema: query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / queries / description
      Previous value: -"Array of search requests (max 5). Each item follows the search tool schema: query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains(domain=<domain>) output."New value: +"Array of search requests (max 5). Each item follows the search tool schema: query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains output."
  2. Changed1 schema field changed
    • changedInput schema / properties / queries / description
      Previous value: -"Array of search requests (max 5). Each item follows the search tool schema: query is required; domain+sub_domain are optional (omit for general web search, required for vertical search)."New value: +"Array of search requests (max 5). Each item follows the search tool schema: query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains(domain=<domain>) output."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations, it discloses real behavior: queries run in parallel, one failing query does not block the others, failures should be retried individually after re-checking sub_domain params, and the hard cap of 5 queries. It does not describe return shape or ordering beyond 'returns all results at once', and the annotations themselves are internally inconsistent (readOnlyHint=true alongside destructiveHint=true), which the description never reconciles.

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

Conciseness3/5

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

The purpose and when-to-use sections are well front-loaded and scannable with headers, but the three examples repeat essentially the same shape and could be compressed to two. The trailing 'MANDATORY: Call score…' block is several sentences of unrelated tooling policy that does not belong in this tool's definition and dilutes the call-relevant content.

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 single-parameter batch tool with no output schema, the definition covers invocation rules, per-item structure, limits, failure semantics, and retry guidance. What is thin is the response side — it only alludes to a 'trailing YAML block' and request_id without describing result ordering or the shape of per-query results/errors.

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

Parameters5/5

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

The input schema only types `queries` as an array of untyped objects (additionalProperties=true, no item properties), so the description carries the real burden and does: it documents each item's fields, that query is required, that domain fields must come from get_sub_domains, that general queries omit domain fields, and the empty-string rule for inapplicable required params. This is meaning well beyond the structured 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?

Opens with a specific verb+resource: 'parallel search tool — run multiple Anysearch queries in a single call', and explicitly positions it against the sequential alternative ('Prefer this over multiple sequential calls when you have 2–5 queries'). An agent can distinguish it from the sibling `search` without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule (2–5 independent queries), a named primary use case (after get_sub_domains across multiple domains), an additional case (ambiguous/fuzzy queries within a domain), and a hybrid general+vertical pattern. The alternative is named (`search`, sequential calls) along with the condition that selects batch_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources