Skip to main content
Install Caesar with the LlamaIndex package set you already use:

Function tools

Pass tools into your agent workflow. Keep the JSON response intact unless you have a reason to trim it; the doc_id, search_id, and provenance fields are the useful part of the result.

Search, then read

The strongest pattern is a two-step loop:
  1. web_search(query, max_results=5) to find candidates.
  2. Pick the most relevant doc_id.
  3. web_fetch(doc_id, query="what the agent needs") to fetch clean markdown.
  4. Send feedback through the SDK if a result helped.

For agents

  • Return JSON from the tool when possible. It preserves snake_case fields and prevents accidental loss of doc_id.
  • Prefer verbosity="compact" for the search tool. Read the selected document for longer evidence.
  • On truncated reads, continue with the returned start_char value instead of asking for a larger max_chars.
  • If your LlamaIndex runtime can consume MCP tools directly, use the remote MCP server and skip custom wrappers.