Tool: list_agents
Lists agents in the given app.
The following sample demonstrate how to use curl to invoke the list_agents MCP tool.
| Curl Request |
|---|
curl --location 'https://ces.[REGION].rep.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_agents", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for AgentService.ListAgents.
ListAgentsRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string, "filter": string, "orderBy": string } |
| Fields | |
|---|---|
parent |
Required. The resource name of the app to list agents from. |
pageSize |
Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
pageToken |
Optional. The |
filter |
Optional. Filter to be applied when listing the agents. See https://google.aip.dev/160 for more details. |
orderBy |
Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details. |
Output Schema
Response message for AgentService.ListAgents.
ListAgentsResponse
| JSON representation |
|---|
{
"agents": [
{
object ( |
| Fields | |
|---|---|
agents[] |
The list of agents. |
nextPageToken |
A token that can be sent as |
Agent
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "modelSettings": { object ( |
| Fields | |
|---|---|
name |
Identifier. The unique identifier of the agent. Format: |
displayName |
Required. Display name of the agent. |
description |
Optional. Human-readable description of the agent. |
modelSettings |
Optional. Configurations for the LLM model. |
instruction |
Optional. Instructions for the LLM model to guide the agent's behavior. |
tools[] |
Optional. List of available tools for the agent. Format: |
childAgents[] |
Optional. List of child agents in the agent tree. Format: |
beforeAgentCallbacks[] |
Optional. The callbacks to execute before the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterAgentCallbacks[] |
Optional. The callbacks to execute after the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
beforeModelCallbacks[] |
Optional. The callbacks to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterModelCallbacks[] |
Optional. The callbacks to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
beforeToolCallbacks[] |
Optional. The callbacks to execute before the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterToolCallbacks[] |
Optional. The callbacks to execute after the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
createTime |
Output only. Timestamp when the agent was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Timestamp when the agent was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
guardrails[] |
Optional. List of guardrails for the agent. Format: |
etag |
Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. |
toolsets[] |
Optional. List of toolsets for the agent. |
generatedSummary |
Output only. If the agent is generated by the LLM assistant, this field contains a descriptive summary of the generation. |
transferRules[] |
Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used. |
Union field agent_type. The type of agent. agent_type can be only one of the following: |
|
llmAgent |
Optional. The default agent type. |
remoteDialogflowAgent |
Optional. The remote Dialogflow agent to be used for the agent execution. If this field is set, all other agent level properties will be ignored. Note: If the Dialogflow agent is in a different project from the app, you should grant |
RemoteDialogflowAgent
| JSON representation |
|---|
{ "agent": string, "flowId": string, "environmentId": string, "inputVariableMapping": { string: string, ... }, "outputVariableMapping": { string: string, ... }, "respectResponseInterruptionSettings": boolean } |
| Fields | |
|---|---|
agent |
Required. The Dialogflow agent resource name. Format: |
flowId |
Optional. The flow ID of the flow in the Dialogflow agent. |
environmentId |
Optional. The environment ID of the Dialogflow agent to be used for the agent execution. If not specified, the draft environment will be used. |
inputVariableMapping |
Optional. The mapping of the app variables names to the Dialogflow session parameters names to be sent to the Dialogflow agent as input. An object containing a list of |
outputVariableMapping |
Optional. The mapping of the Dialogflow session parameters names to the app variables names to be sent back to the CES agent after the Dialogflow agent execution ends. An object containing a list of |
respectResponseInterruptionSettings |
Optional. Indicates whether to respect the message-level interruption settings configured in the Dialogflow agent.
|
InputVariableMappingEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
OutputVariableMappingEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
ModelSettings
| JSON representation |
|---|
{ "model": string, // Union field |
| Fields | |
|---|---|
model |
Optional. The LLM model that the agent should use. If not set, the agent will inherit the model from its parent agent. |
Union field
|
|
temperature |
Optional. If set, this temperature will be used for the LLM model. Temperature controls the randomness of the model's responses. Lower temperatures produce responses that are more predictable. Higher temperatures produce responses that are more creative. |
Callback
| JSON representation |
|---|
{ "description": string, "disabled": boolean, "proactiveExecutionEnabled": boolean, // Union field |
| Fields | |
|---|---|
description |
Optional. Human-readable description of the callback. |
disabled |
Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent. |
proactiveExecutionEnabled |
Optional. If enabled, the callback will also be executed on intermediate model outputs. This setting only affects after model callback. ENABLE WITH CAUTION. Typically after model callback only needs to be executed after receiving all model responses. Enabling proactive execution may have negative implication on the execution cost and latency, and should only be enabled in rare situations. |
Union field callback. The callback to execute. callback can be only one of the following: |
|
pythonCode |
Required. The python code to execute for the callback. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
AgentToolset
| JSON representation |
|---|
{ "toolset": string, "toolIds": [ string ] } |
| Fields | |
|---|---|
toolset |
Required. The resource name of the toolset. Format: |
toolIds[] |
Optional. The tools IDs to filter the toolset. |
TransferRule
| JSON representation |
|---|
{ "childAgent": string, "direction": enum ( |
| Fields | |
|---|---|
childAgent |
Required. The resource name of the child agent the rule applies to. Format: |
direction |
Required. The direction of the transfer. |
Union field rule_type. The rule type. rule_type can be only one of the following: |
|
deterministicTransfer |
Optional. A rule that immediately transfers to the target agent when the condition is met. |
disablePlannerTransfer |
Optional. Rule that prevents the planner from transferring to the target agent. |
DeterministicTransfer
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field condition_type. The condition to evaluate. condition_type can be only one of the following: |
|
expressionCondition |
Optional. A rule that evaluates a session state condition. If the condition evaluates to true, the transfer occurs. |
pythonCodeCondition |
Optional. A rule that uses Python code block to evaluate the conditions. If the condition evaluates to true, the transfer occurs. |
ExpressionCondition
| JSON representation |
|---|
{ "expression": string } |
| Fields | |
|---|---|
expression |
Required. The string representation of cloud.api.Expression condition. |
PythonCodeCondition
| JSON representation |
|---|
{ "pythonCode": string } |
| Fields | |
|---|---|
pythonCode |
Required. The python code to execute. |
DisablePlannerTransfer
| JSON representation |
|---|
{
"expressionCondition": {
object ( |
| Fields | |
|---|---|
expressionCondition |
Required. If the condition evaluates to true, planner will not be allowed to transfer to the target agent. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌