Tool: generate_discovered_resources_topology
Generate the topology for all discovered (including non-registrable) resources for given project based on the view option and filters.
The following code sample shows how to use curl to call the generate_discovered_resources_topology MCP tool.
| Curl Request |
|---|
curl --location 'https://apptopology.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "generate_discovered_resources_topology", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for GenerateDiscoveredResourcesTopology.
GenerateDiscoveredResourcesTopologyRequest
| JSON representation |
|---|
{ "name": string, "topologyDomains": [ string ], // Union field |
| Fields | |
|---|---|
name |
Required. The project to query discoverable resources on. Expected format: |
topologyDomains[] |
Required. The full resource name of the domain of the app topology. Format: |
Union field query. Query the topology by building a graph pattern filter or pre-defined topology view. query can be only one of the following: |
|
filter |
Filters for the topology nodes and edges; Detail format see GraphPattern proto. A separate 'LookupSchema' method will be added that will return the necessary information to be able to construct these filters. |
GraphPattern
| JSON representation |
|---|
{ "startingNode": { object ( |
| Fields | |
|---|---|
startingNode |
Required. Pattern matcher to select the starting nodes in the graph. |
neighbors[] |
Optional. Pattern matcher to match the connected subgraphs; all of these are ANDed. |
NodePattern
| JSON representation |
|---|
{
"alias": string,
"labelPropertiesPattern": {
object ( |
| Fields | |
|---|---|
alias |
Optional. Represents an identifier to be referenced in |
labelPropertiesPattern |
Optional. Matcher for labels/properties. |
LabelPropertiesPattern
| JSON representation |
|---|
{ "labelMatcherExpr": string, "propertyMatcherExpr": string } |
| Fields | |
|---|---|
labelMatcherExpr |
Required. Matcher expression for labels. Allow OR / AND operators; The syntax is defined by the following grammar: - The label expression can use either |
propertyMatcherExpr |
Optional. The syntax of the filter is defined by the following grammar: https://google.aip.dev/160. Referencing properties of graph elements using traversal operator The following properties are supported for all node and edge types:
Other properties types can be found at https://apptopology.googleapis.com/v1/GetSchema The following operators are supported on properties: 1. Checking if a non-repeated property of a graph element is equal to a scalar value using the equality operator
NOTE: - For Alert nodes, only the equality operator |
ConnectedNodePattern
| JSON representation |
|---|
{ "edge": { object ( |
| Fields | |
|---|---|
edge |
Required. To match the edge connected the neighbor subgraph. |
graph |
Required. Recursive matcher to match the neighbor subgraph. |
EdgePattern
| JSON representation |
|---|
{ "direction": enum ( |
| Fields | |
|---|---|
direction |
Required. The direction of the edge to match. |
labelPropertiesPattern |
Required. Matcher for labels/properties. |
alias |
Optional. Represents an identifier to be referenced in |
Direction
The direction of the edge to match.
| Enums | |
|---|---|
DIRECTION_UNSPECIFIED |
Defaults to DIRECTION_UNSPECIFIED. |
ANY |
Match any edge direction. |
TO |
Match the edge direction from source to destination. |
FROM |
Match the edge direction from destination to source. |
Output Schema
Response for GenerateDiscoveredResourcesTopology.
GenerateDiscoveredResourcesTopologyResponse
| JSON representation |
|---|
{
"graph": {
object ( |
| Fields | |
|---|---|
graph |
The generated topology graph. |
Graph
| JSON representation |
|---|
{ "nodes": [ { object ( |
| Fields | |
|---|---|
nodes[] |
A collection of unique nodes that make up the graph. |
edges[] |
Collection of unique edges connecting the |
Node
| JSON representation |
|---|
{
"properties": {
object
},
"name": string,
"labels": [
string
],
"context": {
object ( |
| Fields | |
|---|---|
properties |
Properties associated with the node. Refer to https://apptopology.googleapis.com/v1/GetSchema for a detailed list of node properties. |
name |
The global unique name of the node. For standard Google Cloud Platform resources, this MUST be the canonical Full Resource Name. Examples:
|
labels[] |
Labels attached to the node. Composable, namespaced building blocks that define core attributes through associated properties. Multiple labels aggregate to fully specify the functional traits and property schema of the node type. |
context |
The context of the node. |
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. |
EntityContext
| JSON representation |
|---|
{ "type": string } |
| Fields | |
|---|---|
type |
The primary, namespaced type dictating the node naming format and supported labels, and defined in the |
Edge
| JSON representation |
|---|
{
"properties": {
object
},
"sourceNodeName": string,
"destinationNodeName": string,
"labels": [
string
],
"context": {
object ( |
| Fields | |
|---|---|
properties |
Properties associated with the edge. Refer to https://apptopology.googleapis.com/v1/GetSchema for a detailed list of edge properties. |
sourceNodeName |
The name of the source node for this edge. This is the |
destinationNodeName |
The name of the destination node for this edge. This is the |
labels[] |
Labels attached to the edge. Composable, namespaced building blocks that define core attributes through associated properties. Multiple labels aggregate to fully specify the functional traits and property schema of the edge type. |
context |
The context of the edge. |
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: ❌