HomeLearnCoursesHackathonsAccount
Tool Use & Function Calling
Writing Tools the Model Can Use · 1/2

Vague names and descriptions cause vague behavior

A function schema is the only information the model has about a tool. It cannot read your code, it cannot infer intent beyond what the name, description, and parameter definitions tell it. A function named handle_data with a description of 'processes stuff' gives the model almost nothing to decide whether this is the right tool for a given task, or what to put in its arguments. The model will guess, and guesses under ambiguity are exactly where wrong tool calls and malformed arguments come from.

Compare that to a function named cancel_subscription with the description 'Cancels a user's active subscription immediately. Requires the user's account_id. Does not issue a refund, refunds must be handled with issue_refund separately.' Every ambiguity that could cause a mistake, whether it refunds automatically, what ID it needs, is answered directly in the description. The model doesn't have to guess because the schema already told it.