Skip to main content
Upcoming release — Zylon 1.58These docs are published ahead of release so you can prepare your API integrations. The release image is not yet available. For installations running 1.57, use the 1.57 documentation.
Use Web Search when you need the assistant to run a quick web query and return results.

Prerequisites

Requirements

  • Tool spec: { "name": "web_search", "type": "web_search_v1" }
  • No tool_context required

Basic request and response

This example validates a request that enables the web search tool:
Example response:
To run the request, send the same body to POST /messages.

Response blocks

Zylon runs this tool on the server. The response contains a server_tool_use block with the call, followed by a web_search_tool_result block with the result. The call ID starts with srvtoolu_. Don’t send a tool_result back for it.
Zylon runs the search itself, so encrypted_content contains the result text as plain text, not encrypted data. Error:
These blocks have no is_error field. To detect a failure, check whether content.type ends in _error, then read content.error_code. With the Zylon extension enabled (system.extensions includes zylon), the result is returned as a plain tool_result block with text content instead. See Migrating from 1.57 to 1.58 for the full list of server tool blocks.

Tips

  • Use a focused query to reduce noisy results.
  • Combine with a system prompt to control summarization style.

Next steps

  • Learn how messages return tool blocks: Messages