A tool definition is an interface contract. Its name and argument schema tell the application what operation the model is proposing. Keep a read capability narrow, reject unexpected fields and separate the proposal from execution. Declaring a tool does not authorize every possible use of it.
Return a Responses function tool named lookup_invoice. Its parameters are case.tool_schema and strict is true. Do not grant a mutation tool or replace the parameter schema with a description.
The notebook executes your Python against an original local mock. Use the supplied case rather than copying visible values. The hidden checks change identities, revisions and boundary inputs; no provider endpoint or external tool is contacted.
An example implementation of the function contract.