<!--
name: 'Tool Description: WebSearch'
description: Default SDK built-in tool description and input schema for WebSearch.
sdkPackage: '@anthropic-ai/claude-agent-sdk@0.3.168'
claudeCodeVersion: '2.1.168'
tool: "WebSearch"
-->
# Tool Description: WebSearch

## Metadata

- Request location: `tools[]`
- Tool name: `WebSearch`
- Input schema properties: `query`, `allowed_domains`, `blocked_domains`

## Description

Search the web. Returns result blocks with titles and URLs. US-only.

- The current month is June 2026 — use this when searching for recent information.
- `allowed_domains` / `blocked_domains` filter results.
- After answering from results, end with a "Sources:" list of the URLs you used as markdown links.

## Input Schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "The search query to use",
      "type": "string",
      "minLength": 2
    },
    "allowed_domains": {
      "description": "Only include search results from these domains",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "blocked_domains": {
      "description": "Never include search results from these domains",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

## Token Impact

<!-- TOKEN_COUNT_START -->
- Complete definition estimated tokens: **292**
- Measurement: captured tool object serialized independently as JSON text against the common baseline
- Additivity: independent, non-additive estimate
<!-- TOKEN_COUNT_END -->
