Summary
Add optional filtering parameters to get_service_log tool to help reduce API quota usage when fetching Cloud Run logs.
New Parameters
| Parameter |
Type |
Description |
severity |
enum |
Minimum log level (DEFAULT, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY) |
freshnessMinutes |
number |
Only fetch logs from the last N minutes |
textFilter |
string |
Regex match on textPayload |
limit |
number |
Entries per page (default: 100, max: 1000) |
maxPages |
number |
Limit number of API requests/pages |
Motivation
The current implementation fetches all logs without any filtering, which can quickly exhaust the Cloud Logging API quota ("Read requests per minute"). These optional parameters allow users to narrow down results and reduce API usage.
Backward Compatibility
All new parameters are optional. Default behavior remains unchanged - without any filters, the tool fetches all available logs as before.
Pull request with the changes
#212
Summary
Add optional filtering parameters to
get_service_logtool to help reduce API quota usage when fetching Cloud Run logs.New Parameters
severityfreshnessMinutestextFilterlimitmaxPagesMotivation
The current implementation fetches all logs without any filtering, which can quickly exhaust the Cloud Logging API quota ("Read requests per minute"). These optional parameters allow users to narrow down results and reduce API usage.
Backward Compatibility
All new parameters are optional. Default behavior remains unchanged - without any filters, the tool fetches all available logs as before.
Pull request with the changes
#212