Tool: list_home_resources
Retrieves a list of home resources including devices. This is the primary tool for discovering what resources are available.
The following code sample shows how to use curl to call the list_home_resources 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": "list_home_resources", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for DiscoverHomeResources.
DiscoverHomeResourcesRequest
| JSON representation |
|---|
{ "structureId": string, "view": enum ( |
| Fields | |
|---|---|
structureId |
Optional. The HomeGraph |
view |
Optional. The view to apply to the returned resources. |
filter |
Optional. An optional search filter for the resource metadata. When any of the fields match, the resource is returned. |
pageSize |
Optional. The maximum number of devices to return. The service may return fewer than this value. |
pageToken |
Optional. A page token, received from a previous |
Filter
| JSON representation |
|---|
{ "resourceIds": [ string ], "shortenedResourceTypes": [ string ], "shortenedResourceTraits": [ string ], "shortenedResourceEvents": [ string ], "fieldPaths": [ string ] } |
| Fields | |
|---|---|
resourceIds[] |
Optional. The resource id for filtering. (e.g. device@device_id, automation@automation_id) |
shortenedResourceTypes[] |
Optional. The resource types to filter resources by. Example: "GoogleLightDevice", "GoogleDisplayDevice", "SpeakerDevice", "VideoRemoteControlDevice" (and not "action.devices.types.LIGHT"). Not case sensitive. |
shortenedResourceTraits[] |
Optional. The resource traits to filter resources by. Component prefixes should not be included and should be specified in the shortened_resource_types field instead. Example: "OnOff", "Volume" (and not either "home.uddm.traits.matter.OnOffTrait" or "GoogleTvDevice/OnOff"). Not case sensitive. |
shortenedResourceEvents[] |
Optional. The resource events to filter history events by. Must be in "TraitName.EventName" format (e.g. |
fieldPaths[] |
Optional. Paths to filter by. These are case sensitive. Traits and events should be properly PascalCased and fields should be camelCased. Format: - For traits: "[Trait].[fieldPath]" - For events: "[Trait].[Event].[fieldPath]" Examples: - "OnOff.onOff" (or "OnOff.state.onOff") - "CameraHistory.HistoryItem.eventTracks.zones" For the path filter to take effect, the trait or event type must also be specified in shortened_resource_traits or shortened_resource_events respectively. |
ResourceView
An enum to control the level of detail in resource responses.
| Enums | |
|---|---|
RESOURCE_VIEW_UNSPECIFIED |
Default value, will be treated as VIEW_SUMMARY. |
VIEW_SUMMARY |
Includes all fields except for the volatile states field. Useful for high-level lists and dashboards where current state isn't needed. |
VIEW_FULL |
Includes all fields, including the complete states map. Useful when you need to know the exact current state before acting on a device. |
VIEW_FULL_WITH_AUTOMATION_GENERATION |
Includes all fields, including the complete states map with all automation traits (e.g., Time). This view MUST be used when discovering resources for the purpose of creating or generating automations. Does not include unstructured devices. |
Output Schema
Response for DiscoverHomeResources.
DiscoverHomeResourcesResponse
| JSON representation |
|---|
{ "resources": [ { object ( |
| Fields | |
|---|---|
resources[] |
The list of home resources. |
resourceMetadata[] |
The metadata for the home resources. |
nextPageToken |
The next page token to use for the next request. |
Resource
| JSON representation |
|---|
{
"id": string,
"type": string,
"supportedTraits": [
string
],
"displayName": string,
"parentIds": [
string
],
"metadataId": string,
"resourceInfo": {
object ( |
| Fields | |
|---|---|
id |
Identifier. The unique identifier of the resource. |
type |
Output only. The type of the resource. |
supportedTraits[] |
Output only. A list of all traits this resource supports. |
displayName |
Output only. The user-friendly, mutable name of the resource. |
parentIds[] |
Output only. A list of all resource ids this resource is a member of. |
metadataId |
Output only. The metadata id for this resource. |
resourceInfo |
Output only. Metadata about the device hardware and software. |
isPart |
Output only. True if this resource is part of a multi-faceted device. |
ResourceInfo
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field resource_info. The type of resource this metadata is for. resource_info can be only one of the following: |
|
deviceInfo |
Output only. Metadata about the device. |
structureInfo |
Output only. Metadata about the structure. |
DeviceInfo
| JSON representation |
|---|
{ "vendorName": string, "productName": string, "hardwareVersionString": string, "softwareVersionString": string } |
| Fields | |
|---|---|
vendorName |
Output only. The name of the manufacturer/vendor of the resource. |
productName |
Output only. The model/product name of the resource. |
hardwareVersionString |
Output only. The hardware version of the resource. |
softwareVersionString |
Output only. The software version of the resource. |
StructureInfo
| JSON representation |
|---|
{ "timeZone": string, "address": string, "temperatureUnit": string } |
| Fields | |
|---|---|
timeZone |
Output only. The time zone of the structure. |
address |
Output only. The address of the structure. |
temperatureUnit |
Output only. The preferred temperature unit of the structure (e.g. "CELSIUS", "FAHRENHEIT"). |
ResourceMetadata
| JSON representation |
|---|
{
"id": string,
"type": string,
"traits": {
string: {
object ( |
| Fields | |
|---|---|
id |
Output only. The unique identifier of the resource metadata. |
type |
Output only. The type of resource this metadata is for. |
traits |
Output only. A map of all functional traits this resource supports. The key is the normalized trait name (e.g., "OnOff", "Brightness"). An object containing a list of |
TraitsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
TraitDefinition
| JSON representation |
|---|
{ "description": string, "uddmDeviceTypes": [ string ], "resourceTypes": [ string ], "states": { string: { object ( |
| Fields | |
|---|---|
description |
Output only. The description of the trait. |
uddmDeviceTypes[] |
Output only. The UDDM device types that this trait is applicable to. |
resourceTypes[] |
Output only. The resource types that this trait is applicable to. |
states |
Output only. The states of the trait. Key: state name (e.g., "onOff", "brightness") An object containing a list of |
commands |
Output only. The commands of the trait. Key: command name (e.g., "onOff", "brightness") An object containing a list of |
events |
Output only. The events of the trait. Key: event name (e.g., "onOffChange", "brightnessChange") An object containing a list of |
experimental |
Output only. Whether the trait is experimental. |
StatesEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
ParameterDefinition
| JSON representation |
|---|
{ "description": string, "required": boolean, "unit": string, "unitScale": number, // Union field |
| Fields | |
|---|---|
description |
Output only. The description of the parameter. |
required |
Output only. Whether the parameter is required. |
unit |
Output only. The unit of the parameter, e.g. "C" for Celsius, "%" for percentage, etc. |
unitScale |
Output only. The scale of the parameter, e.g. 0.01 for percentage, etc. |
Union field parameter_type. The type of the parameter. parameter_type can be only one of the following: |
|
booleanParameter |
Output only. The parameter is a boolean. |
numberParameter |
Output only. The parameter is a number. |
stringParameter |
Output only. The parameter is a string. |
structParameter |
Output only. The parameter is a struct. |
listParameter |
Output only. The parameter is a list of the same type of elements. |
bitmapParameter |
Output only. The parameter is a bitmap. |
NumberParameter
| JSON representation |
|---|
{ "numberType": enum ( |
| Fields | |
|---|---|
numberType |
Output only. The type of the number parameter, which can be an integer or a floating point number. |
Union field constraint. The constraint on the number parameter, if any. constraint can be only one of the following: |
|
allowedRange |
Output only. The range of values that the parameter can be. |
allowedValues |
Output only. The list of values that the parameter can be. |
RangeConstraint
| JSON representation |
|---|
{ "min": number, "max": number } |
| Fields | |
|---|---|
min |
Output only. The minimum value of the range. |
max |
Output only. The maximum value of the range. |
ValuesConstraint
| JSON representation |
|---|
{
"values": [
{
object ( |
| Fields | |
|---|---|
values[] |
Output only. The list of values that the parameter can be. |
ValueConstraint
| JSON representation |
|---|
{ "value": number, "synonyms": [ string ] } |
| Fields | |
|---|---|
value |
Output only. The value allowed for the parameter. |
synonyms[] |
Output only. Users may refer to this value by these synonyms. |
StringParameter
| JSON representation |
|---|
{
"allowedValues": [
{
object ( |
| Fields | |
|---|---|
allowedValues[] |
Output only. The list of allowed values for the parameter, if empty, the parameter can be any string. |
ValueConstraint
| JSON representation |
|---|
{ "value": string, "synonyms": [ string ] } |
| Fields | |
|---|---|
value |
Output only. The value allowed for the parameter. |
synonyms[] |
Output only. Users may refer to this value by these synonyms. |
StructParameter
| JSON representation |
|---|
{
"fields": {
string: {
object ( |
| Fields | |
|---|---|
fields |
Output only. The fields of the struct. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
BitmapParameter
| JSON representation |
|---|
{
"combinedBits": [
{
object ( |
| Fields | |
|---|---|
combinedBits[] |
Output only. The list of combined bits. |
typeId |
Output only. The type id of the bitmap constraint. |
CombinedBitsDescriptor
| JSON representation |
|---|
{ "bitPositionStart": integer, "bitPositionEnd": integer, "name": string } |
| Fields | |
|---|---|
bitPositionStart |
Output only. The starting bit position of the combined bits. |
bitPositionEnd |
Output only. The ending bit position of the combined bits. |
name |
Output only. The name of the combined bits. |
CommandsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
CommandDefinition
| JSON representation |
|---|
{ "description": string, "sensitivityLevel": enum ( |
| Fields | |
|---|---|
description |
Output only. The description of the command. |
sensitivityLevel |
Output only. The sensitivity level of the command. |
parameters |
Output only. The parameters of the command. Key: parameter name (e.g., "level", "color") An object containing a list of |
ParametersEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
EventsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
EventDefinition
| JSON representation |
|---|
{
"description": string,
"parameters": {
string: {
object ( |
| Fields | |
|---|---|
description |
Output only. The description of the event. |
parameters |
Output only. The parameters of the event. Key: parameter name (e.g., "level", "color") An object containing a list of |
ParametersEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
NumberType
The type of the number parameter.
| Enums | |
|---|---|
NUMBER_TYPE_UNSPECIFIED |
If unspecified, the parameter will be treated as NUMBER_TYPE_NUMBER. |
NUMBER_TYPE_INTEGER |
The parameter is an integer. |
NUMBER_TYPE_NUMBER |
The parameter is a floating point number. |
SensitivityLevel
The sensitivity level of a command or state.
| Enums | |
|---|---|
SENSITIVITY_LEVEL_UNSPECIFIED |
The default value. This value is used if the sensitivity level is omitted. |
SENSITIVITY_LEVEL_L1 |
The sensitivity level is L1, which is the lowest sensitivity level. |
SENSITIVITY_LEVEL_L2 |
The sensitivity level is L2, which is the second lowest sensitivity level. |
SENSITIVITY_LEVEL_L3 |
The sensitivity level is L3, which is the third lowest sensitivity level. |
SENSITIVITY_LEVEL_L4 |
The sensitivity level is L4, which is the highest sensitivity level. |
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: ✅