Build an Agent
Connecting Tools & MCP
Model Context Protocol (MCP) integrations, custom function calling, and tool execution lifecycle.
Omni agents natively support tool execution via the Model Context Protocol (MCP) and standard OpenAI-compatible function calling schemas.
Tool Invocation Lifecycle
When a prompt triggers a tool, Omni handles execution through the stateful engine:
Initializing Diagram Engine...
Supplying Tools in Chat Completions
You can supply standard function tool schemas in your completion requests:
{
"model": "gpt-4o",
"messages": [
{ "role": "user", "content": "What is the weather in Singapore?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get current weather conditions for a given location",
"parameters": {
"type": "object",
"properties": {
"location": { "type": "string", "description": "City name" },
"unit": { "type": "string", "enum": ["celsius", "fahrenheit"] }
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}Built-In Agent Tools
Omni provides built-in tools that agents can execute autonomously:
| Tool Name | Scope Required | Description |
|---|---|---|
search_memories | memory:read | Performs semantic search across workspace memories and notes. |
read_document | memory:read | Loads raw markdown or structured blocks of a specific workspace document. |
calculate | chat | Deterministic mathematical calculator for complex multi-step reasoning. |