Search LA24X

Keyboard shortcut: Ctrl / ⌘ + K

Type two characters to search, or explore the library.

Open the topic library →

Privacy choices

Choose what suits you. Reading and tools work without analytics or optional saving.

Necessary — always active

Page delivery, language and privacy preferences.

Advertising

Storage details ↗

Function calling: the model proposes, your application authorizes

Design narrow tools, validate arguments and permissions, execute the allowed action and return its real result.

Illustration for Function calling: the model proposes, your application authorizes
✓ A proposed tool call and an executed action are different events.✓ Read-only and write actions should have different controls.

In brief

In function calling, the model proposes a tool and arguments. Your application decides whether to run it, performs the action and returns a result. A model-generated call is not evidence that the action happened.

Keeping these stages separate prevents a fluent answer from being mistaken for a completed booking, lookup or update.

Give tools one understandable job

A tool that reads an authorized order’s status is easier to constrain than a generic tool that executes arbitrary commands. Define allowed identifiers and inputs, and keep credentials on the server. Do not trust a resource identifier merely because the model supplied it.

Check before acting

Verify the signed-in user can access the target, validate argument ranges and reject unexpected fields. For a change such as sending or purchasing, use the appropriate deliberate user authorization. A prompt saying “be careful” is not an enforcement mechanism.

Return the real result

Include the successful result or actionable error, not a fabricated placeholder. Use idempotency or equivalent duplicate protection for write actions when available, and bound retries. A network timeout can leave the action’s state uncertain; inspect that state before blindly repeating a consequential call.

Before you act

Arguments can be valid JSON and still request an unauthorized resource. Permission, validation and confirmation for consequential changes belong in the application.

What to do next

  1. Describe a narrow tool with defined arguments and an explicit action.
  2. Validate the request, user access and any required confirmation before execution.
  3. Run the allowed action once, return its actual outcome and handle failure without inventing success.
You’ve reached the end. Save this guide for later.Back to top ↑