Tool execution lets an AI application move from generating text to requesting externally defined functions, APIs, or services. The model selects a function from a JSON description; the application or platform executes it. Because actions can book appointments or trigger insurance processes, execution requires stronger controls than ordinary response generation. section 6.0
A managed Tool Service acts as the execution boundary. Applications discover authorized tools and submit execution requests through an SDK instead of calling external systems directly. The service validates arguments, injects credentials, performs the external API call, and standardizes results while keeping secrets out of application code and logs. section 6.1.1
A tool execution contract separates discovery, checking, and runtime execution:
- RegisterTool adds a tool definition and metadata to the registry; RegisterMcpServer imports tools exposed by an MCP server. section 6.1.1
- DiscoverTools returns definitions and capabilities that applications can pass to model APIs for function calling. section 6.1.1
- ValidateTool checks schemas and business constraints before an action reaches an external system. section 6.1.1
- ExecuteTool performs the call; ExecuteToolAsync starts long-running work, and GetTask reports its progress. section 6.1.1
Listing 6.1 The tool service gRPC contract
service ToolService {
rpc RegisterTool(RegisterToolRequest)
returns (RegisterToolResponse); #A
rpc DiscoverTools(DiscoverToolsRequest)
returns (DiscoverToolsResponse); #B
rpc ExecuteTool(ExecuteToolRequest)
returns (ExecuteToolResponse); #C
rpc ValidateTool(ValidateToolRequest)
returns (ValidateToolResponse); #D
// Long-running executions
rpc ExecuteToolAsync(ExecuteToolRequest)
returns (ExecuteToolAsyncResponse); #E
rpc GetTask(GetTaskRequest) returns (GetTaskResponse); #E
// MCP integration
rpc RegisterMcpServer(RegisterMcpServerRequest)
returns (RegisterMcpServerResponse); #F
}The gRPC contract makes the service boundary concrete by listing registration, discovery, validation, synchronous execution, asynchronous execution, task retrieval, and MCP integration. section 6.1.1

