A tool contract states an operation’s name, accepted arguments, returned result, and failure behavior. A function schema describes the argument structure in machine-readable form. For a file search, query can be a required nonempty string and limit a required integer from one through five. Unknown fields are rejected rather than silently interpreted as extra authority.
Consider a search_files tool. It searches only a configured exercise directory; callers cannot submit a new filesystem root. Its description explains that it returns matching filenames and snippets, not that it executes arbitrary commands. A model can choose query and limit, but the executor still validates both before calling the implementation.
Narrow contracts make mistakes visible. A tool named do_anything with a free-form command transfers too much interpretation to execution. A bounded arithmetic tool instead accepts operation, left, and right, with operation limited to add, subtract, or multiply. It computes those operations directly; it never evaluates a model-supplied Python expression. A valid schema is the beginning of validation, not proof that a request is authorized or meaningful.