Every argument has to come from somewhere
Language models are good at plausible IDs and dates. Bluwing requires each argument value to appear in the request, the conversation, your facts or an earlier tool result.
The most expensive bug in tool calling is not the wrong tool. It is the right tool with a made-up argument. An invoice ID that looks real, a date one day off, a customer email assembled from the company name. The call succeeds, the damage is done downstream.
Bluwing treats arguments as a grounding problem before it treats them as a generation problem.
Where a value is allowed to come from
Every argument value in a call has one of four sources:
- The user's message, in any phrasing. four becomes
4, tomorrow at 7pm becomes a timestamp. - Earlier turns in the same conversation.
- Facts your application supplies for the request, such as an account's timezone or a known customer ID.
- The result of a tool call that already ran in this task.
If a required value has no source, the engine does not fill the slot. It returns needs_input with the field name and its description, and your app asks the user. That is guarantee G3, and it is deliberately boring.
Transcribing is not generating
The engine's job with arguments is closer to transcription than to writing. It has to find the phrase, normalise it into the schema's type, and leave everything else alone. party_size: 4 is allowed because the sentence said four. party_size: 2 is not allowed because nothing said two.
Normalisation is where most of the real work lives. Dates, currencies, enums and identifiers all need care:
- tomorrow at 7pm needs a timezone and a reference date.
- $12.50 needs a currency and a numeric type.
- the latest invoice from Acme is a query, not an ID; the engine should call the search tool, not invent the invoice number.
When a normalisation is ambiguous, the honest answer is a question. When it is unambiguous but the source is missing, the honest answer is needs_input.
A small example
A schema asks for three fields:
| Field | Required | In the sentence |
|---|---|---|
restaurant | yes | "Nok" |
datetime | yes | "tomorrow at 7pm" |
party_size | yes | — |
The sentence Book a table at Nok tomorrow at 7pm has two of the three. The engine returns the call shape but flags the third instead of guessing:
{
"finish_reason": "needs_input",
"missing": [{
"name": "party_size",
"description": "How many people the table is for."
}]
}The user answers four. The next turn has all three values, each with a visible source, and the call goes out.
Why this is a guarantee and not a setting
It is tempting to offer a "best effort" mode that fills missing fields with defaults. We do not, because the failure is silent. A default party size of two books the wrong table and looks like success in the logs. A refusal to guess looks like a pause in the conversation, which is exactly what it is.
The same rule applies to IDs. If your application knows the account ID, pass it as a fact. Do not make the engine infer it from an email address or a display name. Facts are cheap; wrong IDs are not.
What you still have to validate
Grounding does not replace validation. The engine guarantees that a value came from somewhere, not that the source was correct. Your application still owns:
- whether the user is allowed to act on that record;
- whether the timestamp is in the future;
- whether the amount is within policy.
Those checks belong next to the function you run, not in the prompt. Bluwing's job is to stop the invented value before it reaches you.
Frequently asked questions
Can I provide defaults for optional arguments?
Yes. Optional values follow the schema's default. The guarantee is about required values: they are either grounded or reported, never invented.
Does grounding apply to tool results too?
Yes. A value taken from an earlier tool result is grounded, and the engine records which call it came from. Tool output is still data, not instructions — see tool output is data.
What if the user gives a value in a later message?
Then it is grounded in the conversation and can be used on the next turn. The engine reads the whole exchange, not only the latest message.