Tool: run_home_actions
Executes a list of actions on one or more resources. Should follow command format from DiscoverHomeResources.
The following code sample shows how to use curl to call the run_home_actions MCP tool.
| Curl Request |
|---|
curl --location 'https://home.googleapis.com/mcp' \ --header 'Authorization: Bearer {oauth-access-token}' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "run_home_actions", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for ExecuteHomeActions.
ExecuteHomeActionsRequest
| JSON representation |
|---|
{
"structureId": string,
"homeActionRequests": [
{
object ( |
| Fields | |
|---|---|
structureId |
Required. The unique identifier for the structure to execute the actions in. |
homeActionRequests[] |
The list of actions to execute. |
HomeActionRequest
| JSON representation |
|---|
{
"id": string,
"type": string,
"command": string,
"parameters": {
object
},
"challengeResponse": {
object ( |
| Fields | |
|---|---|
id |
Required. The ID of the resource on which to execute the action on. |
type |
Required. The type of the resource. This is the type returned from DiscoverHomeResources. |
command |
Required. The name of the command to execute (e.g. "OnOff.On"). |
parameters |
Optional. The parameters for the action, as a struct. The keys must match the parameter names in the metadata's CommandDefinition. Example: {"level": 50} |
challengeResponse |
Optional. The credential provided by the user in response to a 2FA challenge. |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
Value
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a JSON |
numberValue |
Represents a JSON number. Must not be |
stringValue |
Represents a JSON string. |
boolValue |
Represents a JSON boolean ( |
structValue |
Represents a JSON object. |
listValue |
Represents a JSON array. |
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
ChallengeResponse
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field credential. The specific credential payload based on the challenge type. credential can be only one of the following: |
|
pin |
Optional. For PIN_NEEDED or CHALLENGE_FAILED_PIN_NEEDED. |
ack |
Optional. For ACK_NEEDED. |
passphrase |
Optional. For PASSPHRASE_NEEDED or CHALLENGE_FAILED_PASSPHRASE_NEEDED. |
NullValue
Represents a JSON null.
NullValue is a sentinel, using an enum with only one value to represent the null value for the Value type union.
A field of type NullValue with any value other than 0 is considered invalid. Most ProtoJSON serializers will emit a Value with a null_value set as a JSON null regardless of the integer value, and so will round trip to a 0 value.
| Enums | |
|---|---|
NULL_VALUE |
Null value. |
Output Schema
Response for ExecuteHomeActions.
ExecuteHomeActionsResponse
| JSON representation |
|---|
{
"homeActionResponses": [
{
object ( |
| Fields | |
|---|---|
homeActionResponses[] |
The responses from the action execution requests. |
HomeActionResponse
| JSON representation |
|---|
{ "id": string, // Union field |
| Fields | |
|---|---|
id |
Output only. The ID of the resource on which the action executed. |
Union field response_type. The result of the action execution. response_type can be only one of the following: |
|
response |
The successful response payload. |
error |
The error details if the action execution failed. |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
Value
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a JSON |
numberValue |
Represents a JSON number. Must not be |
stringValue |
Represents a JSON string. |
boolValue |
Represents a JSON boolean ( |
structValue |
Represents a JSON object. |
listValue |
Represents a JSON array. |
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
NullValue
Represents a JSON null.
NullValue is a sentinel, using an enum with only one value to represent the null value for the Value type union.
A field of type NullValue with any value other than 0 is considered invalid. Most ProtoJSON serializers will emit a Value with a null_value set as a JSON null regardless of the integer value, and so will round trip to a 0 value.
| Enums | |
|---|---|
NULL_VALUE |
Null value. |
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ✅ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ✅