Cloud Guardian
Documentation menu

MCP Tools Reference

Complete reference for all 118 Cloud Guardian MCP tools. Auto-generated from the MCP server source code.

Regenerate with: npx tsx scripts/generate-mcp-docs.ts

Auth

cg_login

Sign in to Cloud Guardian via Google OAuth. Opens browser for authentication.

cg_whoami

Show current authenticated user info: email, UID, and org memberships.

Organizations

cg_list_organizations

List all organizations the current user belongs to, with member counts.

cg_create_organization

Create a new organization. Caller becomes the owner.

ParameterTypeRequiredDescription
namestringyesOrganization name

cg_delete_organization

Delete an organization and all its data (projects, members, invitations). Requires owner or admin role.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID to delete

cg_get_organization

Get organization details by ID.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID

Members

cg_list_members

List org members with roles and pending invitations.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_invite_member

Invite a user to the organization by email with a specified role.

ParameterTypeRequiredDescription
emailstringyesEmail address to invite
rolestringnoRole: viewer (default), member, admin, owner
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_member_role

Change a member's role in the organization.

ParameterTypeRequiredDescription
membership_idstringyesMembership ID (from cg_list_members)
rolestringyesNew role: viewer, member, admin, owner
org_idstringnoOrganization ID (uses default org if not specified)

cg_remove_member

Remove a member from the organization.

ParameterTypeRequiredDescription
membership_idstringyesMembership ID to remove
org_idstringnoOrganization ID (uses default org if not specified)

Projects & Connectors

cg_get_project_status

Get project status summary for the current org. Optionally filter by GCP project ID.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
gcp_project_idstringnoOptional GCP project ID filter

cg_list_connectors

List all GCP, AWS, Azure, DigitalOcean, Supabase, Hetzner, Vultr, and Neon connectors with provider identity and status.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_test_connector

Test a connector's connectivity and return verified permissions.

ParameterTypeRequiredDescription
connector_idstringyesConnector ID to test
org_idstringnoOrganization ID (uses default org if not specified)

cg_onboard_gcp_project

Fully automate GCP project onboarding: create service account, grant roles, generate key, create connector, test connectivity, and link to org. Requires gcloud CLI.

ParameterTypeRequiredDescription
gcp_project_idstringyesGCP project ID to onboard
org_idstringyesOrganization ID to link the project to
display_namestringnoDisplay name for the project (defaults to project ID)
gcloud_accountstringnogcloud account to use (for --account flag). Omit to use default.
remediation_scopesstringnoComma-separated remediation scopes to enable. Options: cloud_run:optimize, cloud_run:cleanup, secret_manager:cleanup, artifact_registry:cleanup, billing:alerts
auto_remediation_scopesstringnoComma-separated scopes that auto-execute after each scan cycle. Must be a subset of remediation_scopes.

cg_onboard_aws

Onboard an AWS account to Cloud Guardian. Creates connector, tests connectivity with retries, links project, and provides IAM role setup instructions. Composes CreateConnector → TestConnector → LinkProject.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID to link the account to
account_idstringyesAWS account ID (12 digits)
regionstringnoAWS region (default: us-east-1)
role_arnstringnoIAM role ARN for cross-account access. Auto-generated if not provided.
external_idstringnoExternal ID for STS AssumeRole. Auto-generated if not provided.
access_key_idstringnoStatic access key ID (alternative to IAM role)
secret_access_keystringnoStatic secret access key
provisionstringnoSet to 'true' to auto-provision a least-privilege 'cloudguardian-scanner' IAM user using this machine's local AWS credentials (~/.aws), then onboard with the generated key. Recommended over pasting admin keys.

cg_onboarding_start

Start a guided onboarding session. Returns a one-click link the user opens (AWS CloudFormation quick-create, or OAuth consent for GCP/DigitalOcean) — provider-side automation completes the connector without credential copy-paste. Poll cg_onboarding_status until complete.

ParameterTypeRequiredDescription
providerstringyesaws | gcp | digitalocean
account_idstringnoAWS account ID (optional — auto-detected by the stack)
project_idstringnoGCP project ID (required for gcp)
regionstringnoAWS region for the console link (default us-east-1)

cg_onboarding_status

Poll a guided onboarding session (from cg_onboarding_start) for completion.

ParameterTypeRequiredDescription
tokenstringyesSession token from cg_onboarding_start

cg_onboard_azure

Onboard an Azure subscription using service-principal credentials (tenant_id, client_id, client_secret). Creates connector, links subscription, verifies Reader access. For guided setup use cg_onboarding_start with provider='azure' — the user runs one line in Cloud Shell and the SP self-registers.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID
subscription_idstringyesAzure subscription ID
tenant_idstringyesEntra tenant ID
client_idstringyesService principal app/client ID
client_secretstringyesService principal secret
namestringnoConnector display name

cg_onboard_do

Onboard a DigitalOcean account to Cloud Guardian. Verifies API token, probes resource permissions, creates connector, links project. Composes VerifyAccount → CreateConnector → LinkProject → TestConnector.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID to link the account to
api_tokenstringyesDigitalOcean API token (starts with dop_v1_)
namestringnoConnector display name (auto-generated from team name if not provided)

cg_onboard_supabase

Onboard one Supabase organization to Cloud Guardian. Validates the PAT, picks the Supabase org (auto when unambiguous), creates a connector, and LinkProjects every Supabase project in that org. Next scan cycle populates per-project compute cost in the cost trend/breakdown.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian organization ID to link the Supabase org to
personal_access_tokenstringyesSupabase Personal Access Token (sbp_*). Create at https://supabase.com/dashboard/account/tokens
supabase_org_slugstringnoOptional Supabase org slug/ID. Required when the PAT can see more than one org; auto-selected when there's only one.
namestringnoConnector display name (defaults to supabase-<slug>)

cg_supabase_db_query

Run a read-only SQL query against a Supabase project's database via the Management API (SELECT/EXPLAIN/SHOW only). Use for db optimization: index usage, table sizes, pg_stat_statements.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
projectstringyesSupabase project name or ref
querystringyesRead-only SQL — SELECT/WITH/EXPLAIN/SHOW, single statement

cg_supabase_db_inspect

Canned DB optimization reports for a Supabase project: index_usage, table_sizes, cache_hit, top_queries, seq_scans, unused_indexes, bloat_estimate, extensions — or 'all'.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
projectstringyesSupabase project name or ref
reportstringnoReport kind (default index_usage; 'all' runs the full suite)

cg_neon_db_query

Run a read-only SQL query against a Neon project's database via the stored connection string (SELECT/EXPLAIN/SHOW only). Requires database_urls in the connector credentials.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
projectstringyesNeon project ID or display name
querystringyesRead-only SQL — SELECT/WITH/EXPLAIN/SHOW, single statement

cg_neon_db_inspect

Canned DB optimization reports for a Neon project (shared dbinspect suite): unused_indexes, seq_scan_heavy, dead_rows, missing_fk_indexes, cache_hit, top_queries, table_sizes — or 'all'.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
projectstringyesNeon project ID or display name
reportstringnoReport kind (default: all)

cg_neon_database_url

Attach or remove a per-project Postgres connection string on the Neon connector — enables DB inspect findings for that project. Use a read-only role's connection URI.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
projectstringyesNeon project ID or display name
urlstringnopostgres connection string — omit with remove=true
removebooleannoRemove the stored connection string

cg_db_optimize

LLM-driven Postgres optimization — pulls live pg_stat_* data and the app's SQL from its repo, then recommends indexes, query rewrites, and config changes with file references. provider=supabase|neon.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
providerstringyessupabase | neon
projectstringyesProject name or ref/ID
repostringnoOptional owner/repo override — else uses the OrgProject's linked repo

cg_repo_files

List files/dirs in a GitHub repo visible to the org's installation. Returns tree entries.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
repostringyesowner/name
pathstringnoDirectory path (default: repo root)

cg_repo_file

Read a file's content from a repo via the org's GitHub installation.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
repostringyesowner/name
pathstringyesFile path

cg_repo_search

GitHub code search across an org repo — e.g. 'users table_name', 'SELECT FROM runs'. Finds the files where queries live.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
repostringyesowner/name
qstringyesGitHub code-search terms (bare query — repo: qualifier auto-added)

cg_db_report

Run a deep Postgres inspection now — all stats sections + deep checks (connections, long-running queries, autovacuum, blocking, sizes) — persisted as a db_report snapshot and viewable in /admin/databases.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
providerstringyessupabase | neon
projectstringyesProject name or ref/ID

cg_db_report_latest

Fetch the last persisted deep report for a project.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian org ID
providerstringnosupabase | neon — optional filter
projectstringyesProject name or ref/ID

cg_onboard_neon

Onboard one Neon organization (or personal account) to Cloud Guardian. Without api_key, runs a browser OAuth grant (neonctl-style PKCE localhost flow) — the stored token set auto-refreshes on each scan. With api_key, uses it directly. Picks the Neon org (auto when unambiguous), creates a connector, and LinkProjects every Neon project in scope. Next scan cycle populates per-project usage-cost estimates and optimisation findings (always-on computes, over-provisioned CU floors, stale branches, PITR storage).

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian organization ID to link the Neon org to
api_keystringnoOptional Neon API key (neon_*). Omit to use the browser OAuth flow instead. Create keys at https://console.neon.tech/app/settings/api-keys or the org's Settings → API keys
neon_org_idstringnoOptional Neon org ID (org-...). Required for org-scoped keys; auto-selected when a personal key sees exactly one org.
namestringnoConnector display name (defaults to neon-<org_id>)
database_urlsstringnoOptional JSON object mapping Neon project ID → read-only Postgres connection string — enables the DB inspect pass

cg_remap_do_projects

Intelligently map already-onboarded DigitalOcean resources to GCP OrgProjects. Per-resource matching uses DO tags (strongest signal), resource name, OrgProject display_name, and Cloud Run service name. Read-only by default — pass apply=true to rename DO OrgProjects' display_name when one team unambiguously hosts a single GCP project's app.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
applystringnoSet to 'true' to apply display_name renames; default is read-only proposal

cg_compare_resource_cost

Compare a resource's current cost against equivalent shapes across AWS, GCP, Azure, DigitalOcean, Hetzner, Linode, and Vultr (full provider pricing catalogs, refreshed via catalogpull). Read-only advisory output — no migration is performed. Cloud Run resources work best; the advisor needs CPU/RAM/utilisation metadata which only Cloud Run snapshots fully populate today. Equivalent monthly cost is scaled by observed avg active instances.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (defaults to current user's org)
resource_namestringnoCompare a single named resource (e.g. 'shorts'). When omitted, returns the top-N most expensive resources matching the other filters.
projectstringnoRestrict to a single GCP project
snapshot_typestringnoSnapshot type filter (default 'cloud_run'). Pass empty string to consider all types — but most non-Cloud-Run types lack the shape metadata the advisor needs.
min_cost_usdstringnoSkip resources below this monthly USD threshold (default 0)
top_nstringnoMax comparisons to return (default 10, max 50)

cg_onboard_hetzner

Onboard one Hetzner Cloud project to Cloud Guardian. Validates the Project API token, creates a connector, LinkProjects, and runs intelligent matching against existing GCP OrgProjects so cost breakdowns group naturally. Hetzner project tokens are project-scoped — onboard each Hetzner project separately.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian organization ID to link the Hetzner project to
api_tokenstringyesHetzner Cloud Project API token. Create at https://console.hetzner.cloud/projects/<project>/security/tokens
project_namestringyesName of your Hetzner Cloud project (Hetzner does not expose this via API)
namestringnoConnector display name (defaults to hetzner-<project_name>)

cg_create_connector

Create a cloud connector for GCP, AWS, Azure, DigitalOcean, Supabase, Hetzner, Vultr, Neon, or Vercel. Vultr and Vercel are read-only and have no remediation scopes; prefer their provider onboarding tools.

ParameterTypeRequiredDescription
namestringyesDisplay name for the connector
project_idstringyesProvider project/account identity (for example GCP project ID, AWS account ID, DO team UUID, or opaque Vultr account key)
providerstringnoCloud provider: gcp (default), aws, azure, do, supabase, hetzner, vultr, neon, or vercel
regionstringnoCloud region
credentials_blobstringno
remediation_scopesstringnoComma-separated scopes. Options: cloud_run:optimize, cloud_run:cleanup, secret_manager:cleanup, artifact_registry:cleanup
auto_remediation_scopesstringnoComma-separated auto-execute scopes (subset of remediation_scopes)
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_connector

Delete a connector and its stored credentials.

ParameterTypeRequiredDescription
connector_idstringyesConnector ID to delete
org_idstringnoOrganization ID (uses default org if not specified)

cg_clone_credentials

Clone encrypted credentials from one connector to another without decrypting.

ParameterTypeRequiredDescription
source_connector_idstringyesSource connector ID
target_connector_idstringyesTarget connector ID
org_idstringnoOrganization ID (uses default org if not specified)

cg_list_org_projects

List linked provider projects/accounts with their Cloud Guardian IDs, provider mappings, GitHub repos, and any supported auto-remediation scopes. Vultr links are read-only and have no remediation scopes.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_org_project

Update an org project's settings: display name, auto-remediation scopes, GitHub repo, or connector.

ParameterTypeRequiredDescription
idstringyesOrg project ID (use cg_list_org_projects to find it)
auto_remediation_scopesstringnoComma-separated scopes to enable. Options: cloud_run:optimize, cloud_run:cleanup, secret_manager:cleanup, artifact_registry:cleanup
display_namestringnoNew display name
github_repostringnoGitHub repo in owner/repo format
connector_idstringnoConnector ID to associate
org_idstringnoOrganization ID (uses default org if not specified)

Infrastructure

cg_get_infrastructure_status

Query cached infrastructure status, including GCP resources and all Vultr VKE cluster, node-pool, linked load-balancer, and linked block-storage snapshots. Vultr output is read-only and includes run-rate completeness and staleness.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_list_guardian_rules

List all enforcement rules configured for the organization.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_create_guardian_rule

Create a CEL enforcement rule for automated policy checks.

ParameterTypeRequiredDescription
namestringyesRule name
match_expressionstringyesCEL expression to evaluate
descriptionstringnoRule description
resource_typestringnoResource type: cloud_run, artifact_registry, secret_manager
action_typestringnoAction to take on match: alert, remediate
severitystringnoRule severity: critical, high, medium, low
schedulestringnoCron schedule for rule evaluation
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_guardian_rule

Update a guardian rule's expression, severity, or settings.

ParameterTypeRequiredDescription
rule_idstringyesGuardian rule ID to update
namestringnoNew rule name
descriptionstringnoNew description
match_expressionstringnoNew CEL expression
action_typestringnoNew action type
severitystringnoNew severity
enabledstringnoSet to 'true' or 'false'
schedulestringnoNew cron schedule
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_guardian_rule

Delete a guardian enforcement rule.

ParameterTypeRequiredDescription
rule_idstringyesGuardian rule ID to delete
org_idstringnoOrganization ID (uses default org if not specified)

cg_validate_rule_expression

Validate a CEL rule expression without creating a rule. Checks syntax and returns parsed representation.

ParameterTypeRequiredDescription
expressionstringyesCEL expression to validate
resource_typestringnoResource type context for validation
org_idstringnoOrganization ID (uses default org if not specified)

cg_get_cost_trend

Get monthly run-rate trend data across monitored provider projects/accounts, including GCP BQ-derived categories and Vultr scanner-estimated VKE run-rate. Provider billing evidence remains separate.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
projectstringnoOptional provider project/account identity to filter by
daysnumbernoNumber of days of history (default 30)

cg_get_resource_cost_history

Get per-resource cost and utilization history over time for supported snapshots. Vultr resources expose run-rate evidence; utilization fields are primarily available for Cloud Run.

ParameterTypeRequiredDescription
resource_namestringyesName of the resource (e.g., Cloud Run service name)
projectstringnoOptional provider project/account identity filter
snapshot_typestringnoSnapshot type, including cloud_run, secret_manager, artifact_registry, supabase_compute, neon_project, neon_compute_endpoint, AWS/DO/Hetzner resource types, vultr_vke_cluster, vultr_vke_node_pool, vultr_load_balancer, or vultr_block_storage
org_idstringnoOrganization ID (uses default org if not specified)
daysnumbernoNumber of days of history (default 30)

cg_get_cost_breakdown

Get a ranked provider-resource run-rate breakdown with cost status, completeness, staleness, metadata, change, and available utilization. Incomplete Vultr estimates are labeled lower bounds; account invoices are separate.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
projectstringnoOptional provider project/account identity filter
snapshot_typestringnoSnapshot type, including cloud_run, secret_manager, artifact_registry, supabase_compute, neon_project, neon_compute_endpoint, AWS/DO/Hetzner resource types, vultr_vke_cluster, vultr_vke_node_pool, vultr_load_balancer, or vultr_block_storage
sort_bystringnoSort by: cost (default), cost_change
daysnumbernoComparison window in days (default 30)
top_nnumbernoNumber of top resources to return (default 20, max 100)

cg_list_service_metrics

Get per-service utilization metrics over time: CPU, memory, request count, RPS, active/idle instances, and cost. Use for traffic pattern analysis and identifying idle or over-utilized services.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
service_namestringnoFilter to a specific Cloud Run service name
projectstringnoFilter to a specific GCP project
daysnumbernoLookback window in days (default 7)

cg_get_service_metrics_summary

Get the latest utilization snapshot for all Cloud Run services: CPU, memory, requests, instance counts, and costs. Best for a quick overview of service health.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_get_savings_summary

Get verified savings summary: estimated vs actual savings from completed remediations.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
projectstringnoOptional GCP project ID filter
daysnumbernoLookback window in days (default 90)

Checks

cg_list_checks

List all available checks with their thresholds, categories, and override status.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
resource_typestringnoFilter by resource type: cloud_run, artifact_registry, secret_manager
categorystringnoFilter by category: cost_optimization, cleanup, security

cg_update_check_override

Customize a check's threshold, severity, or enabled status for your org.

ParameterTypeRequiredDescription
check_idstringyesCheck ID to override (from cg_list_checks)
enabledstringnoSet to 'true' or 'false'
severitystringnoCustom severity: critical, high, medium, low
org_idstringnoOrganization ID (uses default org if not specified)
thresholdnumbernoCustom threshold value

cg_delete_check_override

Reset a check to its default threshold and settings.

ParameterTypeRequiredDescription
check_idstringyesCheck ID to reset
org_idstringnoOrganization ID (uses default org if not specified)

Operations

cg_trigger_scan

Trigger an immediate read scan across connected GCP, AWS, Azure, DigitalOcean, Supabase, Hetzner, Vultr, and Neon projects/accounts. Vultr refreshes VKE inventory/run-rate and separate account billing evidence; it performs no remediation. Pass gcp_project_id to scan a single project, which returns in about a minute instead of around 15.

ParameterTypeRequiredDescription
gcp_project_idstringnoScan only this GCP project (e.g. pfinance-app-1748773335). Strongly preferred: a full cycle covers every connected project and takes around 15 minutes, longer than the gateway will hold the response open.
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_connector

Update a connector's settings: name, region, remediation scopes, or auto-remediation scopes.

ParameterTypeRequiredDescription
connector_idstringyesConnector ID to update
namestringnoNew display name
regionstringnoGCP region
remediation_scopesstringnoComma-separated scopes. Options: cloud_run:optimize, cloud_run:cleanup, secret_manager:cleanup, artifact_registry:cleanup
auto_remediation_scopesstringnoComma-separated scopes that auto-execute after each scan. Must be subset of remediation_scopes.
org_idstringnoOrganization ID (uses default org if not specified)

cg_get_operational_health

Get platform operational health across all connector providers: scan cycles, connector health, alerts/remediation, estimated run-rate, and separately reported Vultr account billing evidence.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_cost_forecast

Forecast the monthly run rate at month-end from closed UTC-day observations; show covered GCP month-to-date accrued usage separately with coverage and freshness. Project scanner estimates and smoothed organization rates have different bases.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses caller's org if omitted)

cg_kubernetes_costs

Kubernetes cost analysis per cluster from the in-cluster agent: per-node pricing, namespace cost attribution, utilization findings (overprovisioned requests, idle nodes, missing requests), and a same-workload price comparison across providers (aws/gcp/azure/vultr/digitalocean/hetzner/linode).

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses caller's org if omitted)
cluster_idstringnoLimit to one cluster ID

cg_kubernetes_services

List automatically discovered Kubernetes workload services or inspect one service's CPU/memory allocation and observed cost history. Worker catalog estimates include idle/unallocated capacity and coverage gaps; provider charges and credits are separate.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses caller's org if omitted)
cluster_idstringnoLimit to one cluster ID
service_idstringnoStable service ID from the list; returns cost and resource-hour history
qstringnoFilter workload name, namespace, kind, or cluster
namespacestringnoFilter to one namespace
kindstringnoFilter to one workload controller kind
daysnumbernoHistory window in days (default 7, integer 1-30)
limitnumbernoList page size (default 100, integer 1-500)
offsetnumbernoList offset (default 0, nonnegative integer)

cg_kubernetes_tenants

Compare per-tenant Kubernetes workload CPU/memory and provisioned PV costs. Uses existing tenant labels or namespaces; preserves shared infrastructure, idle and unallocated capacity, and identifies unknown storage rates. USD catalog estimates are a subledger, not additional cloud charges or applied credits.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (default organization when omitted)
cluster_idstringnoOptional cluster ID
tenant_idstringnoOptional tenant label value or namespace

cg_kubernetes_utilization

7-day percentile utilization model for a cluster: p95/avg CPU+memory, advisory node lower bound, estimated monthly savings, confidence and risk ratings.

ParameterTypeRequiredDescription
cluster_idstringyesCluster ID from cg_kubernetes_costs
org_idstringnoOrganization ID (uses caller's org if omitted)
daysnumbernoLookback window in days (default 7, max 30)

cg_kubernetes_scale

Plan or apply provider-level cluster scaling (Karpenter-style). mode=plan lists actions; mode=apply executes one action — dry-run unless confirm=true.

ParameterTypeRequiredDescription
cluster_idstringyesCluster ID
modestringnoplan | apply (default plan)
action_idstringnoAction ID from plan output (required for apply)
org_idstringnoOrganization ID
confirmbooleannoExecute the provider change (default: dry-run)

cg_kubernetes_scaler_config

View or set per-cluster scaler bounds — min/max nodes, max delta per apply, cooldown, cost ceiling, enabled. set=true writes.

ParameterTypeRequiredDescription
cluster_idstringyes
modestringnoobserve (propose only — default) | apply (execute)
org_idstringnoOrganization ID
min_nodesnumberno
max_nodesnumberno
max_deltanumberno
cooldown_minutesnumberno
max_monthly_centsnumberno
setbooleannoWrite mode (default: read)
enabledbooleanno

cg_metric_series

Read a rolled-up metric series — any source/scope/metric written to the rollup store (e.g. kubernetes node cpu.util, namespace cpu.usage_of_req). Returns hourly buckets with avg/p50/p95/min/max.

ParameterTypeRequiredDescription
sourcestringyesMetric source, e.g. kubernetes
scope_typestringyescluster | node | namespace | workload | service
scope_idstringnoKubernetes: cluster ID for cluster scope; cluster ID/node, cluster ID/namespace, cluster ID/ns/kind:name for others — empty for all
metricstringyescpu.util | mem.util | cpu.usage_of_req | nodes.count | …
org_idstringnoOrganization ID
daysnumbernoLookback days (default 7)

cg_commitment_coverage

Commitment coverage per provider: AWS Savings Plans / Reserved Instance coverage per account and GCP committed-use (CUD) recommendations with estimated monthly savings.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses caller's org if omitted)

cg_cost_anomalies

Detect recent spend anomalies — projects or categories whose run rate jumped vs the trailing baseline. Returns severity, baseline vs current, delta, and when it started.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses caller's org if omitted)

cg_list_scan_logs

List scan cycle history with per-project drill-down results: status, disabled APIs, extractor warnings, and cost per project.

ParameterTypeRequiredDescription
project_idstringnoFilter project rows to this project/account ID
org_idstringnoOrganization ID (uses default org if not specified)
limitnumbernoNumber of scan cycles to return (default 10)

cg_auto_discover_projects

Discover unlinked GCP projects accessible by a connector's service account.

ParameterTypeRequiredDescription
connector_idstringyesConnector whose credentials to use for discovery
org_idstringnoOrganization ID (uses default org if not specified)

cg_system_diagnostics

Get system diagnostics: connectivity status for Firestore, KMS, email, GitHub, Firebase Auth, Vertex AI, and scanner health.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_send_test_email

Send a test email to the currently logged-in user to verify email delivery.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_send_test_daily_report

Send a test daily cost report email to the currently logged-in user. Shows the full daily cost summary with trends, top resources, alerts, and savings.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

Remediation

cg_plan_remediation

Scan infrastructure for violations and create pending remediation actions based on enabled scopes. Shows estimated savings.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
gcp_project_idstringnoOptional GCP project ID to filter by
resource_namestringnoOptional resource name to filter to a single resource

cg_execute_remediation

Execute a specific pending remediation action. Use dry_run=true to validate without executing.

ParameterTypeRequiredDescription
action_idstringyesRemediation action ID to execute
dry_runstringnoSet to 'true' to validate without executing
force_directstringnoSet to 'true' to bypass github_pr mode and execute directly via GCP APIs
org_idstringnoOrganization ID (uses default org if not specified)

cg_batch_execute_remediation

Execute multiple pending remediation actions in one call. Returns per-action results.

ParameterTypeRequiredDescription
action_idsstringyesComma-separated action IDs to execute
dry_runstringnoSet to 'true' to validate without executing
force_directstringnoSet to 'true' to bypass github_pr mode and execute directly via GCP APIs
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_remediation_action

Delete a pending remediation action. Only pending actions can be deleted.

ParameterTypeRequiredDescription
action_idstringyesRemediation action ID to delete
org_idstringnoOrganization ID (uses default org if not specified)

cg_list_remediation_actions

List remediation actions with their status. Filter by project or status.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
gcp_project_idstringnoOptional GCP project ID to filter by
statusstringnoFilter by status: pending, executing, completed, failed

Alerts

cg_list_cost_alerts

List cost alerts with spend spikes, idle resources, and recommendations.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
statusstringnoFilter: active, acknowledged, resolved
severitystringnoFilter: critical, high, medium, low

cg_acknowledge_cost_alert

Acknowledge a cost alert to mark it as reviewed.

ParameterTypeRequiredDescription
alert_idstringyesCost alert ID to acknowledge
org_idstringnoOrganization ID (uses default org if not specified)

cg_get_cost_alert_counts

Get quick counts of active and acknowledged cost alerts.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

API Keys

cg_create_api_key

Create a programmatic API key. Returns the raw key (shown only once).

ParameterTypeRequiredDescription
namestringyesName for the API key
rolestringnoRole: viewer, member, admin (default: viewer). Capped at your role level.
org_idstringnoOrganization ID (uses default org if not specified)
expires_in_daysnumbernoDays until expiry (0 = no expiry)

cg_list_api_keys

List all API keys for the current user.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_revoke_api_key

Revoke (delete) an API key.

ParameterTypeRequiredDescription
key_idstringyesAPI key ID to revoke
org_idstringnoOrganization ID (uses default org if not specified)

Webhooks

cg_list_webhook_endpoints

List webhook endpoints for an organization. Shows URL, event subscriptions, status, and failure count.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_create_webhook_endpoint

Create a webhook endpoint. Returns a signing secret (HMAC-SHA256) for verifying payloads. Save it immediately — it cannot be retrieved later.

ParameterTypeRequiredDescription
urlstringyesWebhook URL to POST events to
descriptionstringnoHuman-readable description
event_typesstringnoComma-separated event types: scan.completed, alert.created, remediation.completed, etc. Empty = all events
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_webhook_endpoint

Update a webhook endpoint's URL, description, event types, or enabled status.

ParameterTypeRequiredDescription
idstringyesWebhook endpoint ID
urlstringnoNew webhook URL
descriptionstringnoNew description
event_typesstringnoComma-separated event types to subscribe to
enabledstringnotrue or false
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_webhook_endpoint

Delete a webhook endpoint and all its delivery history.

ParameterTypeRequiredDescription
idstringyesWebhook endpoint ID
org_idstringnoOrganization ID (uses default org if not specified)

cg_list_webhook_deliveries

List recent delivery attempts for a webhook endpoint. Shows status, HTTP code, duration, and errors.

ParameterTypeRequiredDescription
endpoint_idstringyesWebhook endpoint ID
org_idstringnoOrganization ID (uses default org if not specified)

cg_test_webhook_endpoint

Send a test event to a webhook endpoint to verify connectivity.

ParameterTypeRequiredDescription
idstringyesWebhook endpoint ID
org_idstringnoOrganization ID (uses default org if not specified)

Teams

cg_list_teams

List all teams in an organization with their allocation rules.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_create_team

Create a new team for cost allocation. Add allocation rules to match resources.

ParameterTypeRequiredDescription
namestringyesTeam name
descriptionstringnoTeam description
colorstringnoHex color for display (e.g. #3b82f6)
org_idstringnoOrganization ID (uses default org if not specified)

cg_update_team

Update a team's name, description, color, or allocation rules.

ParameterTypeRequiredDescription
idstringyesTeam ID
namestringnoNew team name
descriptionstringnoNew description
colorstringnoNew hex color
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_team

Delete a team. Cost allocations will become unallocated.

ParameterTypeRequiredDescription
idstringyesTeam ID
org_idstringnoOrganization ID (uses default org if not specified)

cg_get_team_cost_report

Get cost attribution report showing how costs are distributed across teams.

ParameterTypeRequiredDescription
team_idstringnoFilter to a specific team (optional)
org_idstringnoOrganization ID (uses default org if not specified)
daysnumbernoLookback period in days (default 30)

cg_export_team_cost_csv

Export team cost allocation as CSV for finance teams.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
daysnumbernoLookback period in days (default 30)

cg_get_team_cost_trend

Get per-team cost trend over N days using pre-computed daily rollups.

ParameterTypeRequiredDescription
team_idstringnoFilter to a specific team (optional)
org_idstringnoOrganization ID (uses default org if not specified)
daysnumbernoLookback period in days (default 30, max 90)

cg_get_unallocated_resources

List cost items that are not matched to any team's allocation rules.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
daysnumbernoLookback period in days (default 30)

Billing

cg_setup_billing_budget

Create a GCP billing budget with automated Pub/Sub alerts forwarded to Cloud Guardian.

ParameterTypeRequiredDescription
org_idstringyesOrganization ID
gcp_project_idstringyesGCP project ID to monitor
billing_account_idstringyesGCP billing account ID (e.g. XXXXXX-XXXXXX-XXXXXX or billingAccounts/XXXXXX-XXXXXX-XXXXXX)
currency_codestringnoBudget currency — MUST match billing account currency (e.g. USD, AUD). Run 'gcloud billing accounts describe BILLING_ACCOUNT_ID' to check.
display_namestringnoBudget display name (default: 'Cloud Guardian - <project>')
thresholdsstringnoComma-separated threshold percents as decimals (default: 0.5,0.8,1.0)
amount_centsnumbernoMonthly budget in cents (default 10000 = $100)

cg_list_billing_budgets

List all GCP billing budgets managed by Cloud Guardian for an organization.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_delete_billing_budget

Delete a billing budget. Removes the GCP budget, Pub/Sub topic, and push subscription.

ParameterTypeRequiredDescription
idstringyesBilling budget ID
org_idstringnoOrganization ID (uses default org if not specified)

cg_list_billing_webhook_events

List recent billing webhook events received from GCP Pub/Sub. Shows processed, unmatched, and error events for debugging the billing alert pipeline.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
limitnumbernoMax events to return (default 20)

cg_send_test_billing_webhook

Send a mock GCP Pub/Sub billing alert to the webhook endpoint for testing. Simulates a budget threshold exceeded notification.

ParameterTypeRequiredDescription
budget_idstringnoBudget ID to simulate (default: test-budget-001)
budget_namestringnoBudget display name (default: Cloud Guardian Test Budget)
thresholdnumbernoThreshold exceeded as decimal (default: 0.5 = 50%)
cost_amountnumbernoCurrent cost in dollars (default: 50.0)
budget_amountnumbernoBudget amount in dollars (default: 100.0)

cg_setup_billing_export

Connect and verify an existing BigQuery billing export for actual GCP cost tracking. Checks dataset, standard or detailed export table, and query access. To create the dataset or grant permissions, use browser-assisted billing setup in the Connectors onboarding page.

ParameterTypeRequiredDescription
connector_idstringyesConnector ID with GCP credentials (SA needs BigQuery Data Viewer on the dataset)
bq_project_idstringyesGCP project ID where the BQ billing export dataset lives
billing_account_idstringyesGCP billing account ID (e.g. 01ABCD-234567-89EFGH)
org_idstringnoOrganization ID (uses default org if not specified)
dataset_idstringnoBQ dataset ID (default: cloud_billing_export)

cg_bq_export_status

Check the status of BigQuery billing export configuration for an organization.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)

cg_query_actual_costs

Query actual GCP costs from BigQuery billing export data. Returns cached cost data by service and project. Use 'date' for single-day detail or 'days' for multi-day trend. Use 'project' to filter to a single GCP project.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
datestringnoSpecific date to query (YYYY-MM-DD format)
daysstringnoNumber of days to query (default: 7, max: 90)
projectstringnoOptional GCP project ID to filter to a single project

cg_sync_bq_now

Run an on-demand BQ billing-export sync and return the typed outcome (observed / observed_empty / skipped / error). Use to verify the cost pipeline without waiting for the next scheduled scan (~6h).

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
datestringnoClosed UTC usage date to refresh (YYYY-MM-DD, last 90 days; default: yesterday). Refreshes all active billing accounts, replacing that date's cache.

cg_list_recommendations

List active GCP Active Assist cost recommendations across all projects. Shows idle VMs, disks, IPs, right-sizing opportunities, and unattended projects with estimated monthly savings.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
gcp_project_idstringnoOptional GCP project ID to filter recommendations

cg_onboard_gcp_billing

Start GCP billing export setup using CloudGuard's bundled local browser helper. Prepares the dataset and scanner IAM access, reuses an existing export or configures Standard usage export in Google Console. Requires Node.js 20+, npm, gcloud and Chrome on this machine. The user completes Google login/MFA locally. Returns immediately with a session ID; poll cg_gcp_billing_onboarding_status for durable progress or view the organization's Connectors onboarding card.

ParameterTypeRequiredDescription
org_idstringyesExplicit CloudGuard organization ID; caller must administer it
connector_idstringyesGCP connector ID in this organization
billing_account_idstringyesGoogle billing account ID, XXXXXX-XXXXXX-XXXXXX
bq_project_idstringyesBigQuery destination project; reuse the current export destination if one exists
dataset_idstringyesExact BigQuery destination dataset
locationstringnoBigQuery dataset location (default US); use its existing location
gcloud_accountstringyesExplicit Google administrator email for local gcloud and Console sign-in

cg_gcp_billing_onboarding_status

Read durable progress, verification, and failure stage for a GCP billing setup session. Uses authenticated organization and session ID; no session token is needed.

ParameterTypeRequiredDescription
org_idstringyesCloudGuard organization ID
session_idstringyesSession ID returned by cg_onboard_gcp_billing

cg_query_provider_billing

Query provider account billing evidence for Vultr or Vercel. Evidence is not per-cluster allocation and is not added to resource run-rate. Vercel breakdowns retain project/service attribution and separate effective costs.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID (uses default org if not specified)
providerstringnoProvider filter: vultr (default) or vercel
connector_idstringnoOptional connector ID filter
from_datestringnoInclusive UTC start date (YYYY-MM-DD; must be paired with to_date)
to_datestringnoInclusive UTC end date (YYYY-MM-DD; must be paired with from_date)
daysnumbernoLookback in days (default 90, minimum 1, maximum 365); ignored when from_date/to_date are supplied

Demo

cg_seed_demo_data

Populate an organization with realistic fake GCP projects, resource snapshots, cost history, teams, alerts, and remediation actions for demo/testing.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID to seed (uses default org if not specified)
project_countnumbernoNumber of fake projects (1-4, default 3)
cost_history_daysnumbernoDays of cost history to generate (default 30)

Native app

cg_open_overview

Read a complete Cloud Guardian overview of connected projects and resource costs, with an interactive view in supported hosts. Reads saved data without scanning or changing infrastructure.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID; automatically selects a sole organization, otherwise opens an organization chooser
refreshbooleannoBypass the 30-second in-process overview cache for a fresh read

cg_overview_app

Open the native cost overview immediately, using a recent session snapshot while saved data loads in the background. For a complete text summary, call cg_open_overview.

ParameterTypeRequiredDescription
org_idstringnoOrganization ID; automatically selects a sole organization, otherwise opens an organization chooser

cg_search_mentions

Search connected Cloud Guardian projects for composer mentions. Empty query lists available projects; returns at most 20 authenticated resource references.

ParameterTypeRequiredDescription
querystringyesSearch text, which may be empty (maximum 200 characters)
org_idstringnoOptional organization to search; defaults to all available organizations

Costs

cg_explore_vercel_costs

Explore Vercel billed and effective costs by project and service using the local Vercel CLI login. Reads the specified team directly; Cloud Guardian sign-in or a persistent connector is not required. Defaults to the current billing period. Requires Vercel CLI with usage support and vercel login. Charges are separate from Cloud Guardian resource monthly run-rates.

ParameterTypeRequiredDescription
teamstringyesVercel team slug or ID (explicit scope, for example my-team or team_...)
from_datestringnoInclusive YYYY-MM-DD start date, interpreted in America/Los_Angeles; must pair with to_date
to_datestringnoInclusive YYYY-MM-DD end date, interpreted in America/Los_Angeles; must pair with from_date

Projects

cg_onboard_vercel

Connect one Vercel team for scheduled project inventory and actual billed/effective cost exploration. Reuses a matching connector. Requires an explicit Cloud Guardian organization and dedicated Vercel team token (or CLOUD_GUARDIAN_VERCEL_TOKEN environment variable). Stores credentials encrypted; never imports the local CLI OAuth session. First scheduled scan supplies provisional billing observations and project links; use cg_explore_vercel_costs for immediate local CLI exploration.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian organization ID
team_idstringyesExplicit Vercel team ID, beginning team_; use Vercel team discovery to resolve a slug
api_tokenstringnoDedicated secret Vercel token. Prefer CLOUD_GUARDIAN_VERCEL_TOKEN to avoid copying secrets into chat; omitted when reusing an existing connector.
namestringnoOptional connector display name

cg_onboard_vultr

Onboard a Vultr account and its VKE clusters atomically after verifying account-wide read permissions.

ParameterTypeRequiredDescription
org_idstringyesCloud Guardian organization ID
api_keystringyesSecret Vultr API key; never displayed or logged
namestringnoOptional connector display name