Skip to main content
Glama

web_context

Search the web and return extracted page content—passages, tables, and code—instead of links, so you can gather source material for a topic without a URL.

Instructions

Search the web and return the pages' extracted content - passages, tables, code - instead of links or snippets. Fast and cheap, and the best default when you need material on a topic but have no URL yet. max_tokens and max_urls control how much comes back; both are approximate budgets. Each source comes with its URL and its page date when Brave knows one.

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": "web_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe search query (1-400 characters, at most 50 words).
countryNoCountry code such as US or CN (default US).
max_urlsNoSources to return (1-50, default 20).
freshnessNoAge filter: pd (day), pw (week), pm (month), py (year), or YYYY-MM-DDtoYYYY-MM-DD.
thresholdNoRelevance filter: strict returns fewer but more relevant sources, lenient (default) returns more, disabled applies no filtering.
max_tokensNoApproximate context budget in tokens (1024-32768, default 8192).
search_langNoLanguage preference, e.g. en, zh-hans (default en).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does meaningfully well: it discloses cost/speed characteristics ('Fast and cheap'), the nature of returned content, that max_tokens/max_urls are 'approximate budgets' rather than hard limits, and that page dates are only present 'when Brave knows one.' It does not cover authentication, rate limits, result ordering, or error behavior.

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?

Four short sentences, front-loaded with what the tool returns and why it beats alternatives, then budget semantics, then the date caveat. No sentence is redundant or filler.

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 7-parameter tool with no annotations and no output schema, the description communicates the essentials an agent needs before calling: what comes back, what the budgets mean, and the conditional date field. Gaps remain around result ordering, truncation of long pages, and failure modes, but nothing critical to 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 description coverage is 100%, so params like query length, country default, freshness codes, and threshold semantics are already documented in the schema. The description's only added nuance is framing max_tokens and max_urls as 'approximate budgets,' which the schema largely already conveys ('Approximate context budget in tokens'). Baseline 3 applies.

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 uses a specific verb ('Search the web') and, crucially, defines the return shape: 'passages, tables, code - instead of links or snippets.' That contrast implicitly separates it from link/snippet-returning siblings like web_search, so an agent can distinguish the tools without inspecting 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 Guidelines4/5

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

'the best default when you need material on a topic but have no URL yet' gives an explicit positive when-to-use condition and implicitly signals the exclusion (if you already have a URL, this is not the tool). It stops short of naming the alternative sibling (e.g., web_fetch) or stating when-not to use it outright.

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

Deploy Server

Other Tools