Key facts
| Status | Live on supported models |
| API shape | OpenAI-compatible tools, tool_choice and tool_calls |
| Streaming | Tool calls work with streamed responses |
| JSON mode | Live for structured output alongside tools |
| Model coverage | Varies per model — check the capability matrix |
| Parallel calls | Supported where the model supports it |
| Agents | Build agent loops with function calling plus your executor |
| Free tier | 2 free AI models (plugsky-micro, plugsky-lite), no card |
TL;DR
- Tool calling is live and keeps the OpenAI request and response shape.
- Schemas are ordinary JSON Schema; your code remains the executor.
- Model coverage varies — confirm before you design around one model.
- Streaming and tool calls work together for responsive agent UIs.
- Test with malformed inputs and timeouts, not just the happy path.
How it works, step by step
- Define each tool as a JSON Schema with tight property descriptions and required fields.
- Send the tool list with the request and parse tool_calls from the response.
- Execute the tool in your backend, then return the result as a tool message.
- Loop until the model answers without requesting a tool, with a step cap for safety.
- Test error paths: invalid arguments, tool timeouts, empty results and repeated calls.
- Pin the model in configuration and re-run evals when you change it.
Try it yourself
Open the function calling tester →
How function calling works on Plugsky
The flow matches the OpenAI pattern, so existing agent code ports directly:
- Send the user message plus a
toolsarray of JSON Schemas. - The model responds with
tool_callsnaming a function and its arguments instead of a final answer. - Your code executes the function — the model never calls anything itself.
- You append the tool result and call the API again; repeat until the model produces a normal completion.
Set tool_choice when you need to force or forbid a tool. JSON mode is available when you need structured output without the tool loop, and streaming carries tool-call deltas for responsive interfaces.
Where models differ
Not every model is equally good at tools, and pretending otherwise causes production surprises:
- Argument accuracy: smaller models may emit plausible but schema-invalid arguments; validate before executing.
- Parallel calls: some models request several tools at once, others one at a time — your loop should handle both.
- Instruction following: reliable tool selection improves with stronger models, which matters as the tool count grows.
- Latency: multi-step loops multiply response time; cap steps and stream where the UX needs it.
Use cheap models for simple, single-tool tasks and stronger models for planning and multi-tool reasoning. The model catalogue is the reference.
What we do and what we do not do
What we do: expose function calling through the OpenAI-compatible API, support JSON mode and streaming alongside it, and document per-model capabilities. What we do not do: execute your tools, sandbox them, or guarantee identical tool behaviour across models — the executor, validation and safety checks are yours. Treat tool arguments as untrusted input: validate against the schema, authorise every call, and never wire a tool directly to a destructive action without confirmation.
Honest comparison
| Aspect | Plugsky function calling | OpenAI function calling | Prompting for JSON |
|---|---|---|---|
| API shape | OpenAI-compatible | Native | Plain text instructions |
| Schema enforcement | JSON Schema in request | JSON Schema in request | None |
| Streaming tool calls | Supported | Supported | Not applicable |
| Model coverage | Varies by model | Varies by model | Any model |
| Executor | Your code | Your code | Your code |
| Reliability | Good with validation | Good with validation | Fragile |
Frequently asked questions
Is function calling available on all models?
No — coverage varies by model. Check the capability matrix before designing around a specific model, and keep a default that supports tools.
Do I need a special SDK?
No. Function calling uses the standard tools payload in the OpenAI-compatible API, so existing SDKs and agent frameworks work.
Can I force the model to use a tool?
Yes, tool_choice supports forcing or forbidding tool use, subject to the model's capabilities.
Does streaming work with tool calls?
Yes — tool-call deltas are streamed, which lets you show progress while arguments assemble.
How many tools can I expose?
There is no hard product limit, but reliability drops as the set grows. Group related actions and keep schemas descriptive and narrow.
What if the model returns invalid arguments?
Validate against your schema before execution, return a structured error as the tool result, and let the model retry — or fail the step gracefully.
Can I build agents with this?
Yes. Function calling plus your own tool executor is the standard agent loop, and RAG is available alongside it for knowledge-grounded tools.