Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from datetime import datetime
from pathlib import Path
import re
from mcp.types import ToolAnnotations

load_dotenv()

Expand Down Expand Up @@ -267,7 +268,16 @@ async def dispatch(self, request: Request, call_next):
"""


@mcp.tool(description=search_tool_description)
@mcp.tool(
description=search_tool_description,
annotations=ToolAnnotations(
title="SerpApi search",
readOnlyHint=True, # search is read-only; no state mutation
destructiveHint=False, # nothing deleted or modified
idempotentHint=False, # SERP can change between calls; cache is 1h
openWorldHint=True, # talks to external search engines
),
)
async def search(params: dict[str, Any] = None, mode: str = "complete") -> str:
"""Universal search tool supporting all SerpApi engines and result types.

Expand Down
Loading