Skip to main content
Agent Development Kit projects usually need only two Caesar tools: search and read. If your runtime can consume MCP tools, connect the remote MCP server. If you prefer local function tools, wrap the Python SDK:
pip install caesar-search

Function implementations

from typing import Any

from caesar_search import Caesar

client = Caesar()  # reads CAESAR_API_KEY; anonymous works without a key


def caesar_search(query: str, max_results: int = 5) -> dict[str, Any]:
    """Search the web with Caesar and return compact, citable results."""
    response = client.search(query, max_results=max_results, verbosity="compact")
    return response.model_dump()


def caesar_read(target: str, query: str | None = None, max_chars: int = 12000) -> dict[str, Any]:
    """Read a Caesar doc_id or URL as clean markdown."""
    response = client.read(target, query=query, max_chars=max_chars)
    return response.model_dump()


CAESAR_TOOLS = [caesar_search, caesar_read]
Register CAESAR_TOOLS with your kit’s function-tool helper. Keep the public tool names as caesar_search and caesar_read so prompts, logs, and MCP fallbacks use the same vocabulary.

MCP alternative

Use the hosted streamable-HTTP endpoint when the kit supports MCP:
https://search-api-staging-779189860552.europe-west1.run.app/mcp
Send Authorization: Bearer $CAESAR_API_KEY when you need keyed rate limits. Omit the header for anonymous access.

Tool behavior

ToolPurposeDefault
caesar_searchFind ranked documents and return doc_id handlescompact result shape
caesar_readRead a doc_id or URL as markdown12,000 character cap
Feedback is not exposed over MCP. For local function tools, keep the SDK client available and call client.feedback(...) after the agent acts on a result.

For agents

  • Prefer the remote MCP server when your kit supports it. It keeps tool schemas aligned with the deployed API.
  • If you wrap local functions, return full SDK model dumps instead of hand-shaped strings. Agents need doc_id, search_id, and truncation fields.
  • Use one search, then read selected documents. Repeated broad searches waste rate-limit tokens and context.
  • Never pass a literal key through an agent prompt. Use CAESAR_API_KEY or anonymous access.