Pawa AI Tools Calling lets you expose safe actions (functions/APIs) that the model can invoke with JSON arguments. Use it to search, query databases, fetch weather, run payments, or orchestrate internal services—while you stay in control of execution and access.
Pawa AI Tool Calling Example

When to use Tools Calling
- You have deterministic operations the model should trigger (search, lookups, CRUD, RAG retrieval)
- You want grounded answers that incorporate real‑time data
- You need multi‑step workflows where the model plans, calls tools, and synthesizes results
Example use cases
Get today’s weather for a location, then craft user‑facing summaries.
Access account details by user ID and enforce role‑based checks.
Issue refunds, re‑ship items, or create tickets after verification.
Types of tools in Pawa AI
- ◆Built‑in tools (
pawa_tool
) such asweb_search_tool
andpesa_pay_tool
- ◆Custom tools you define and pass in the chat request using JSON schema
Tools Calling Models in Pawa AI.
Currently we have one tool calling model:- pawa-v1-blaze-20250318: A powerful small language model (SLM) optimized for reasoning, complex generation, multimodal, tools understanding, agentic workflow, and advanced knowledge tasks.
Built‑in Tools
Pawa provides platform tools you can enable without hosting your own code. Include them in thetools
array with type pawa_tool
.
- Built‑in tools are executed by Pawa; you typically receive the final summarized answer without sending a second request.
- Some tools may accept options; consult the tool’s reference for supported fields.
Custom Tools
Custom tools are the tools you define on yourself and send through chat request. This normally has the following steps:- Define the tool in JSON schema
- Make a request to the model with the tools it can call
- Receive a tool call from the model
- Execute your code with the provided arguments
- Send a second request including the tool result
- Receive the final response (or additional tool calls)
Step‑by‑step example on custom tools.
Describe your function with JSON Schema. This shapes the arguments the model will produce.
function
object uses JSON Schema to precisely describe the arguments you expect.type: Must be function
for custom tools.
function.name: Short, unique identifier the model will reference in tool_calls
.
strict
function.description: One sentence describing when to use the tool; critical for good tool selection.
function.parameters.type: Usually object
(a set of named arguments).
properties: Map of argument names to schemas. Use type
, description
, and constraints (enum
, minimum
, maxLength
, etc.).
required: Array of argument names that must be present.
tool_choice
additionalProperties: Set to false
to prevent unexpected fields.
Optional fields like default, examples, and format help the model produce better arguments.Provide the tool definition and a user question. The model decides whether to call the tool.
The assistant replies with tool_calls
including the tool name and arguments.
Your backend runs the function safely and prepares a compact JSON result.
Post a follow‑up message with role tool
, the tool name
, and the JSON output.
The model grounds its response on the tool output. It may request more tools if needed.
Best practices for authoring schemas
- Use clear, action‑oriented names (e.g.,
get_weather
,refund_order
) - Write concise descriptions that specify when to use the tool and what it returns.
- Constrain arguments with
enum
, ranges, andadditionalProperties: false
to reduce errors. - Prefer simple primitives (string/number/boolean) over deeply nested shapes unless required.
- Return compact JSON from your tool for the model to reason over; avoid verbose prose.
Multiple tools in one request
You can provide several tools at the same time (custom and built‑in). The model may call one or more in sequence, or even in parallel.tool
messages with the results. The final model message will synthesize both.
With Pawa AI tool calling, you get the most powerful up to date techninique to build advanced agentic AI bot that solves complex problems by using and integrating with the external sources or systems.