GCP Platform Engineer

v0.4.0
io.github.deBilla/platform-mcp Checked 1 day ago Published 3 months ago

Read-only GCP tools for debugging incidents and finding cost savings

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_environments

List the GCP environments this server can query and which is the default. Pass one of the returned names as the `environment` argument of any other tool to target that project (e.g. environment='production'). Omitting the argument uses the default environment shown here. Common shorthands such as 'prod' and 'stg' are accepted, as is a bare project id.

query_logs

Query Cloud Logging with an advanced-filter expression. Args: filter: Cloud Logging advanced filter (e.g. 'severity>=WARNING AND resource.type="cloud_run_revision"'). Leave empty to match all logs. freshness: How far back to look, e.g. '30m', '1h', '2d'. Default '1h'. limit: Maximum number of entries to return (newest first). environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment. Call list_environments to see what is configured.

ParameterTypeDescription
environmentstring
filterstring
freshnessstring
limitinteger

get_recent_errors

Return recent log entries at severity ERROR or higher. Args: service: Optional service name to narrow to (matched against resource.labels.service_name and logName). hours: How many hours back to search. Default 1. limit: Maximum number of entries to return (newest first). environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
hoursinteger
limitinteger
servicestring

list_error_groups

List grouped application errors from Error Reporting with counts. Args: hours: Lookback window; snapped to the nearest supported period (1h, 6h, 1d, 1w, 30d). Default 24. service: Optional service name filter (Error Reporting "service" label). limit: Maximum number of error groups to return (most frequent first). environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
hoursinteger
limitinteger
servicestring

query_metric

Query a Cloud Monitoring metric time series. Args: metric_type: Metric type, e.g. 'compute.googleapis.com/instance/cpu/utilization'. resource_filter: Optional extra filter, e.g. 'resource.labels.instance_id="123"'. window: How far back to query, e.g. '1h', '6h', '1d'. Default '1h'. aligner: Aggregation across the alignment period: MEAN, MAX, MIN, SUM, COUNT, RATE, PERCENTILE_99. Default MEAN. alignment_period: Bucket size for aggregation, e.g. '1m', '5m'. Default '5m'. limit: Maximum number of time series to return. envir…

ParameterTypeDescription
metric_type *string
alignerstring
alignment_periodstring
environmentstring
limitinteger
resource_filterstring
windowstring

list_alert_policies

List Cloud Monitoring alert policies and whether they are enabled. Args: limit: Maximum number of policies to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger

list_uptime_checks

List Cloud Monitoring uptime check configurations. Args: limit: Maximum number of uptime checks to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger

list_cost_recommendations

Aggregate GCP cost-optimization recommendations (idle/rightsizing/etc). Fans out the cost recommenders across the locations where the project has resources. Recommenders/locations that are empty or not enabled are skipped. Args: locations: Optional comma-separated zones/regions to scan (e.g. 'us-central1,us-central1-a'). If empty, auto-discovers from Asset Inventory (requires the Cloud Asset API). limit_per_call: Max recommendations to pull per recommender+location. environment: Which configured GCP environment to query, e.g. 'stagi…

ParameterTypeDescription
environmentstring
limit_per_callinteger
locationsstring

list_recommendations

List recommendations from a specific recommender at a specific location. Args: recommender_id: Recommender id, e.g. 'google.compute.instance.MachineTypeRecommender' or 'google.iam.policy.Recommender'. location: Zone (e.g. 'us-central1-a'), region (e.g. 'us-central1'), or 'global' depending on the recommender. Default 'global'. limit: Maximum number of recommendations to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
recommender_id *string
environmentstring
limitinteger
locationstring

get_cost_breakdown

Summarize recent spend from the BigQuery billing export. By default this reports spend for the selected environment's project only. A billing export table covers every project on the billing account, and several environments commonly share one table, so an unfiltered query would return identical account-wide totals for staging and production. Only the environment holding the export needs 'billing_export_table' set: one billing account exports to one project, and that export already covers every project on the account. Asking any other environment for costs returns…

ParameterTypeDescription
all_projectsboolean
daysinteger
environmentstring
group_bystring
limitinteger

get_billing_info

Return the billing account linked to the project and its status. Args: environment: Which configured GCP environment to inspect, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring

search_assets

Search all cloud resources in the project via Cloud Asset Inventory. Args: asset_types: Optional comma-separated asset types to filter, e.g. 'compute.googleapis.com/Instance,run.googleapis.com/Service'. query: Optional free-text/structured query, e.g. 'state:RUNNING' or 'location:us-central1'. limit: Maximum number of resources to return. Default 50; raise it when you know you need a full inventory, since each resource costs context. include_labels: Include resource labels. Off by default because d…

ParameterTypeDescription
asset_typesstring
environmentstring
include_labelsboolean
limitinteger
querystring

list_compute_instances

List Compute Engine VM instances with location and status. Args: limit: Maximum number of instances to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger

list_cloud_run_services

List Cloud Run services. Args: limit: Maximum number of services to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger

list_gke_clusters

List GKE (Kubernetes Engine) clusters. Args: limit: Maximum number of clusters to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger

list_sql_instances

List Cloud SQL instances. Args: limit: Maximum number of instances to return. environment: Which configured GCP environment to query, e.g. 'staging' or 'production'. Omit to use the default environment.

ParameterTypeDescription
environmentstring
limitinteger