Skip to content

[FEATURE]: add optional filtering parameters to get_service_log tool #213

Description

@josewweee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions