Skip to main content
Provider-hosted tools run on the provider (OpenAI, etc.) rather than in your process. Attach them to any 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 from praisonaiagents.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.
Search across multiple vector stores at once.
Point a hosted MCP tool at a server the provider can reach.

Best Practices

Use a hosted tool when the provider already runs the capability — you avoid shipping and maintaining the code yourself.
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.
Hosted specs and normal Python functions live together in the same tools=[…] list. The Agent forwards each to the right place.
FileSearchTool(vector_store_ids=["vs_1"]) and ["vs_2"] are different tool specs. No workaround needed — they are treated separately.

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.