Skip to main content

preinvocation_payload

Function preinvocation_payload 

Source
pub fn preinvocation_payload() -> PreInvocationOutput
Expand description

Build the injected instruction that steers the model onto the MCP tool.

Antigravity’s PreToolUse hook cannot rewrite tool arguments, so the model has to be told to call the MCP tool instead of its native run_command. The server and tool names are interpolated from the constants above rather than spelled out, so this message cannot drift from what the server actually advertises.