Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

AI Agents / Tool contracts and execution

AI Agents: Required argument schemas

Declare required fields, types and allowed values and validate them before dispatch.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Model tool calling with a validated application dispatcher; Ollama is a local-runtime example.

When to use it

The model proposes a tool call; application code decides whether and how it executes. Test the contract at the dispatcher boundary so a fluent model response cannot conceal an invalid argument or an uncommitted operation.

Practical example

Illustrative JSON Schema for a lookup-only tool. Ownership must still be checked by the authenticated executor.

{
  "type": "object",
  "properties": {
    "ticket_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "ticket_id"
  ],
  "additionalProperties": false
}

Check the result

Submit missing fields, unexpected properties and wrong types and verify rejection before execution.

Save and compare results

Save the test input, configuration and result. Fix the failing boundary, repeat the same test and compare it with the saved working configuration.

Scope and limits

These exercises have not been tested on your systems. Check feature support and configuration names against the installed release and linked documentation.

Share this article

Back to all articles