Skip to main content
The ai package (version 5 or newer) is an optional peer dependency of caesar-search — optional for the rest of the SDK, required for this subpath. Importing caesar-search/ai without it fails at module resolution.
The default client reads CAESAR_API_KEY. Create a key in the Caesar app and set it in the runtime environment before the model calls these tools.

The tools

caesarTools() returns two enumerable tools: Use the TypeScript SDK client directly for other API actions. Legacy direct properties caesar_search and caesar_read remain available for existing code, but they are non-enumerable so they are not sent to models as tool choices. Runs client.search(query, { maxResults, verbosity }). The ids_only verbosity is deliberately omitted from the tool’s response_format enum — it exists at the client level, but is a poor fit for tool results. See response shaping.

web_fetch

Runs client.read(target, { query, maxChars, startChar }).

Configuring the client

Pass your own configured client to control auth, timeouts, and retries:
All TypeScript SDK constructor options apply. If your agent speaks MCP instead of the AI SDK, the remote MCP server exposes the same two tools.

For agents

  • Tool results default to compact to protect the context window. Ask for standard or full only when you need passages or provenance.
  • Thread doc_id values between tool calls: web_search returns a doc_id per result, and it is the most reliable target for web_fetch — more stable than re-passing the URL.