Skip to main content
Glama

search_and_fetch

Search the web, rerank results, and fetch full content from top pages as clean markdown for research, reading, and analysis.

Instructions

Search the web, rerank results, then fetch the full content of the top result(s). GitHub repo, file, directory and release URLs are fetched via the GitHub API; all other URLs (including GitHub issues, PRs and commits) go through a fetch cascade: Firecrawl → Crawl4AI → raw HTTP. Results and fetched pages are cached. Blocked domains are filtered. Returns the result list plus clean markdown of the fetched pages.

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": {
      "query": "<query>"
    },
    "name": "search_and_fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoRestrict results to one domain or a list of domains (e.g. 'github.com'). Best-effort — applied as a site: query operator; most engines honor it but some ignore it.
queryYesSearch query
expandNoUse local LLM to generate 2-3 query variants and merge results for a wider search surface (default: off). Adds ~3s latency.
enginesNoComma-separated SearXNG engine names to restrict the search to (e.g. 'google,duckduckgo'). Forwarded verbatim; unknown/disabled engines degrade to fewer results rather than erroring.
categoryNoSearch category: general, news, it, or science (default general)general
languageNoBCP-47 language code (e.g. 'en', 'de') or 'all' for all languages. Omit to use the SearXNG instance default.
min_scoreNoDrop results whose reranker relevance score is below this threshold (0-1, omit for no filtering). Filters on the RAW cross-encoder relevance score, not the recency-adjusted score used for ordering. Scores are strongly bimodal — relevant results cluster near 1.0 and irrelevant ones near 0, with little in between — so any value in roughly 0.01-0.9 behaves about the same; 0.01-0.1 is the useful range and 0.5 is not a midpoint. A high score means topically related, NOT correct: an Apache mod_proxy page scores 0.967 on an nginx query. Thresholds are model-dependent and not comparable across rerankers. No-op (with a logged warning) when the reranker is unavailable, since no scores exist to filter on.
time_rangeNoLimit results to: day, week, month, or year (omit for all time)
fetch_countNoNumber of top results to fetch full content for (default 1, max 3)
domain_profileNoNamed domain profile to apply: 'homelab', 'dev', or omit for default filters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.32.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changedv3.23.0
    • addedInput schema / properties / min_score
      Added value: +{
      +  "description": "Drop results whose reranker relevance score is below this threshold (0-1, omit for no filtering). Filters on the RAW cross-encoder relevance score, not the recency-adjusted score used for ordering. Scores are strongly bimodal — relevant results cluster near 1.0 and irrelevant ones near 0, with little in between — so any value in roughly 0.01-0.9 behaves about the same; 0.01-0.1 is the useful range and 0.5 is not a midpoint. A high score means topically related, NOT correct: an Apache mod_proxy page scores 0.967 on an nginx query. Thresholds are model-dependent and not comparable across rerankers. No-op (with a logged warning) when the reranker is unavailable, since no scores exist to filter on.",
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
  3. Changed2 schema fields changedv3.15.1
    • addedInput schema / properties / engines
      Added value: +{
      +  "description": "Comma-separated SearXNG engine names to restrict the search to (e.g. 'google,duckduckgo'). Forwarded verbatim; unknown/disabled engines degrade to fewer results rather than erroring.",
      +  "type": "string"
      +}
    • addedInput schema / properties / site
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Restrict results to one domain or a list of domains (e.g. 'github.com'). Best-effort — applied as a site: query operator; most engines honor it but some ignore it."
      +}
  4. First observedv3.12.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the GitHub-API special case versus the Firecrawl → Crawl4AI → HTTP cascade, caching, blocked-domain filtering, and the shape of the return value. Gaps remain around authentication expectations for the GitHub path, rate limits, and what happens when every fetch backend fails.

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 main action is front-loaded in the first sentence, and the remaining sentences each add a distinct operational fact (GitHub routing, fetch cascade, caching, filtering, return value). It is dense but no sentence is filler; the cascade arrow notation is a slightly compact way to convey behavior.

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 10-parameter tool with no output schema, the description covers the outcome (result list plus clean markdown pages) and the routing logic well. It could say more about failure modes and per-backend limits, but nothing essential for invoking it correctly is missing.

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% and the parameter descriptions are already very detailed (min_score in particular), so the schema does the heavy lifting. The description adds only the notion of 'top result(s)', implicitly mapping to the fetch_count default, and says nothing extra about expand, engines, domain_profile, or site scoping.

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 names a concrete pipeline (search, rerank, fetch top result(s)) and its return content, which is specific enough to separate it from a plain search or a fetch-only tool. It never names a sibling such as search_and_summarize or fetch_url, so the differentiation is implied rather than stated.

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?

Usage is implied by the verb sequence: this is the tool to reach for when the agent wants search results plus page content in one call. There is no explicit when-to-use/when-not guidance, no advice on choosing this over search, search_and_summarize or fetch_url, and no stated prerequisites.

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