Skip to main content

Action and integration

Tools connect model decisions to external observations and effects. Google's function-calling documentation explicitly assigns function execution to the application, while the model selects calls and arguments. This separation makes the tool boundary a place for validation and authority checks. gemini-function-calling

Contracts for model-selected actions​

A useful contract identifies the operation, argument meaning, result meaning, errors and effects. Distinct names and bounded, informative results help the model choose and interpret tools; Anthropic describes evaluating these interface choices. tool-design

Schema-constrained output, illustrated by Gemini's structured-output support, constrains representation. It cannot establish that a selected account is the intended account or that a requested change is authorized. Check business invariants in execution code. gemini-structured-output

Recommended design separates transport failure, rejected input, failed operation and successful operation with an unexpected business outcome. Return actionable errors without leaking secrets. Preserve an operation identifier when a response is delayed or uncertain, so the caller can reconcile it.

Choosing the action surface​

SurfaceUseful propertyEngineering obligation
Typed APIExplicit operation and data contractMaintain schemas and authorization rules
Code or shellFlexible composition and computationConstrain filesystem, processes and network effects
Browser or GUIReach workflows without a suitable APIObserve state changes and recover from interface drift

SWE-agent demonstrates that a purpose-built agent-computer interface affects coding performance in its studied environment. It does not establish one best surface for every task. swe-agent

Evaluate realistic sequences, including malformed calls, large results and ambiguous outcomes. Screenshots and text outputs are observations, not proof that the desired state persisted. Tool-result truncation should be visible, with a route to the remaining evidence.

External integration​

Interoperability addresses discovering and calling capabilities across implementations. Keep tool semantics independently testable even when a protocol transports them. Recovery of side effects belongs in durable execution; permission enforcement belongs in isolation and authorization.

References​