Skip to main content
Nito speaks the OpenAI tool-calling protocol. It passes your tool declarations to the model, returns the model’s tool-call requests, and forwards the results you send back. Nito does not run your function tools; your code does.

Two Tool Families

  1. Function tools. You define them, the model requests them, you run them and return the result. This page.
  2. Hosted tools. Run upstream with no round trip: web_search and web_fetch. See Server-Side Tools.

Declaring a Tool

Each function.name must be unique in the request and parameters must be a JSON Schema object. The description is how the model decides when to call the tool. tool_choice: "auto" (default when tools are present), "none", "required", or {"type": "function", "function": {"name": "get_weather"}}.

The Loop

A tool call is at least two requests.

The model asks for a tool

The reply carries tool_calls and finish_reason: "tool_calls":
arguments is a JSON string; parse it. The id ties this request to the result you send back. Your code runs get_weather("Austin").

You send the result back

Append the assistant’s tool-call message and a tool message with the matching tool_call_id:
A model may request several tools in one turn or more after seeing results. Append a tool message per tool_call_id and call again until finish_reason is stop.

Streaming

With stream: true, tool calls arrive in fragments. The first chunk for a call carries tool_calls with index, id, type: "function", and function.name; later chunks carry function.arguments fragments under the same index. Concatenate per index, then run the loop as above. See the streaming format reference.

Privacy

Function tools work at Anonymous, Private, and Confidential on models that advertise function_tools. At Encrypted, function tools work with nito-encrypted-encrypt-all-fields: 1, with tool definitions and results sent as ciphertext.

Chat Completions

The endpoint.

Streaming

Token by token.

Web Search

A hosted tool.

Privacy Levels

The four levels.

Chat Completions Endpoint

Schema reference.