Tool: list_log_names
Use this as the primary tool to list the log names in a Google Cloud project. This is useful for discovering what logs are available for a project. Only logs which have log entries will be listed.
The following sample demonstrate how to use curl to invoke the list_log_names MCP tool.
| Curl Request |
|---|
curl --location 'https://logging.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_log_names", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
The parameters to ListLogs.
ListLogsRequest
| JSON representation |
|---|
{ "parent": string, "resourceNames": [ string ], "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
parent |
Required. The resource name to list logs for:
|
resourceNames[] |
Optional. List of resource names to list logs for:
To support legacy queries, it could also be:
The resource name in the |
pageSize |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
pageToken |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
Output Schema
Result returned from ListLogs.
ListLogsResponse
| JSON representation |
|---|
{ "logNames": [ string ], "nextPageToken": string } |
| Fields | |
|---|---|
logNames[] |
A list of log names. For example, |
nextPageToken |
If there might be more results than those appearing in this response, then |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌