A tool is a capability outside the model that an agent may ask for. The model only writes a request: a name and some arguments. Application code validates it, authorizes it, executes it and reports back. This site starts from one plain function and climbs, one idea at a time, to schemas, result contracts, the Model Context Protocol, safe execution, retries and tests, asking one question at each step: who is allowed to do what, and what happens when it fails?
An underwriting agent can fetch a roof assessment, search the underwriting guidance and record a recommendation. The first two only read; the third changes what the underwriter sees. If all three look the same to the model and the code that runs them, a malformed argument, a timeout or a retry can write twice or write the wrong thing. Tools engineering separates what the model asks for from what the application is willing to do.
Arguments, return values and side effects; how a model asks for a tool and the loop that answers; JSON Schema, type hints, Pydantic and Java records.
Success, error and partial results; naming and progressive disclosure; MCP hosts, clients and servers, transports and authorization, per the current revision.
Least privilege, parameter validation, idempotency and sandboxing, and why a write tool needs stronger authorization than a read tool.
Retries, timeouts, rate limits and circuit breakers; contract tests, fault injection and trace-based checks for every tool.