Agent like a regular tool.
Quick Start
1
Simple: web search
2
With a vector store
3
Combine hosted and local tools
How It Works
A hosted tool has no local callable — the provider executes it and returns the result.Available Hosted Tools
Four factories, all re-exported frompraisonaiagents.tools.
HostedMCPTool is not the same as from praisonaiagents.mcp import MCP. MCP runs an MCP client in your process; HostedMCPTool tells the provider to connect to the server for you.Configuration Options
All parameters are keyword-only.WebSearchTool
CodeInterpreterTool
FileSearchTool
HostedMCPTool
When to Pick Which
Common Patterns
Mix a hosted tool with your own Python function in one Agent.Best Practices
Prefer hosted when the provider implements it
Prefer hosted when the provider implements it
Use a hosted tool when the provider already runs the capability — you avoid shipping and maintaining the code yourself.
HostedMCPTool is not the local MCP client
HostedMCPTool is not the local MCP client
HostedMCPTool asks the provider to connect to an MCP server. from praisonaiagents.mcp import MCP runs the client in your process. Choose the local MCP when you need it on your own machine or with your own callable.Mix hosted and local tools freely
Mix hosted and local tools freely
Hosted specs and normal Python functions live together in the same
tools=[…] list. The Agent forwards each to the right place.Each hosted config is distinct
Each hosted config is distinct
FileSearchTool(vector_store_ids=["vs_1"]) and ["vs_2"] are different tool specs. No workaround needed — they are treated separately.Related
Deep Research Agent
The specialised agent that uses these hosted specs internally.
MCP (local client)
Run an MCP client in your own process — for contrast with
HostedMCPTool.Unified Web Search
The local
search_web tool — for contrast with hosted WebSearchTool.
