One tool call
Note: Run on your machine with the server process up and OPENAI_API_KEY set.
Local tool first
A live MCP server runs on your machine. Try it Yourself uses a function tool with the same question shape.
Example
from praisonai import Agent
def tool_list() -> str:
"""Return a fake tool name."""
return "get_time"
agent = Agent(
instructions="Use tool_list when asked about tools.",
tools=[tool_list],
)
print(agent.start("What time tools do you have?"))Ask for one concrete tool use
Pick a question that forces the agent to call a tool from the server, not to guess.
If the server is not running, the agent cannot reach the tool. Start the server first, then run the agent.
Example
from praisonai import Agent, MCP
agent = Agent(
instructions="Use MCP tools when they help. Say which tool you used.",
tools=MCP("uvx mcp-server-time"),
)
print(agent.start("What time tools do you have? Use one if you can."))Reference: documentation