MCP Tools Reference
The groundcover MCP server exposes tools for querying observability data (logs, traces, events, live entities, monitor issues, metrics, monitor definitions) and for discovering metadata (field names and values) before writing those queries. Most query tools accept a gcQL pipeline; query_metrics accepts PromQL.
Tenant & backend scoping
Every tool call is automatically scoped to the tenant and backend configured when you set up the MCP server. These are set once at the connection level — you do not pass them per tool call.
Tool Overview
Signal Query Tools (gcQL)
Common Parameters
All gcQL signal tools share the parameters below. query_entities is the exception on time: it queries live state and ignores start / end / period.
query
string
yes
gcQL query string. Must start with a filter or *. Always include | limit N.
start
string (RFC3339)
no
Window start. Defaults to 1 hour ago.
end
string (RFC3339)
no
Window end. Defaults to now.
period
string (ISO 8601 duration)
no
Relative window, for example PT15M, PT1H, P1D. Defaults to PT1H.
query_metrics and query_monitors use a different shape - see their dedicated sections below.
Every gcQL query_* tool returns the JSON response of the executed pipeline. When the row count exactly equals the effective limit, the server appends a follow-up text block warning that results were truncated, plus a link to the gcQL reference - the agent should refine the query rather than paginate.
query_logs
Run a gcQL query against logs.
When to use it
Investigate errors, warnings, or arbitrary log text for a workload, namespace, or trace.
Aggregate log volume, error rates, or latest message per group.
Correlate logs with traces or issues via
_fromsubqueries insidejoin/union/in().
Examples
Latest 10 production errors, newest first:
Error rate per workload, surfacing only workloads above 5% errors, in a single query:
query_traces
Run a gcQL query against trace spans.
When to use it
Identify slow services, endpoints, or operations.
Quantify HTTP error rates (4xx / 5xx) or span-level errors.
Pull the spans behind a specific
trace_idto investigate a request.
Examples
Slow checkout calls (>500 ms):
5xx count per service:
p95 latency per workload, top 5:
query_events
Run a gcQL query against Kubernetes events.
When to use it
Find OOMKills, crash loops, scheduling failures, or any abnormal cluster event.
Correlate cluster activity with logs and traces during an incident.
Examples
Recent OOMKilled events:
Top warning reasons in production:
query_entities
Run a gcQL query against the live state of entities tracked by groundcover. This includes Kubernetes resources (Pods, Deployments, Services, Nodes, etc.) as well as non-Kubernetes entities. Reflects the current snapshot - does not accept time parameters.
When to use it
Inspect the spec or status of a specific resource (a Deployment, a Pod, a Node).
Count or group entities by current state (Running / Pending / Failed).
Discover which entity kinds and fields exist in the cluster.
Examples
Fetch a single deployment:
Running pods, top 10:
Deployment readiness summary:
Node count by status:
Drilling into the underlying Kubernetes object
The full Kubernetes object is exposed as discoverable raw_json.* paths (not as a single scalar column - | fields raw_json returns empty). Project specific paths and filter by them directly:
The exact paths depend on the kind. For Pods the container/SA paths are raw_json.spec.containers and raw_json.spec.serviceAccountName. For Deployments and other workloads that wrap a Pod template they are raw_json.spec.template.spec.containers and raw_json.spec.template.spec.serviceAccountName. Use kind:<EntityKind> | field_names to enumerate every available path for that kind.
Notes
Field discovery for entities is kind-scoped:
kind:Pod | field_names,kind:Deployment | field_names, etc. The available fields differ between kinds. See the field discovery cheat sheet.raw_jsonitself has no scalar column; it surfaces only via dotted paths likeraw_json.metadata.*,raw_json.spec.*,raw_json.status.*.
query_issues
Run a gcQL query against monitor issue instances - active alerts and historical firings produced by your monitors. Use query_monitors first to find a monitor's identity, then drill into its firings here.
When to use it
List active alerts in an environment or namespace.
Identify the noisiest monitors (most firings) over a window.
Drill from a monitor's identity into the underlying signals (with
query_logs/query_tracesafterward).
Examples
Recent issues in production:
CPU-related monitors, most recent firing first:
Firing count per monitor:
Notes
Common fields:
id,monitor_id,monitor_name,state,previous_state,severity,cluster,env,namespace,workload,summary,silence_ids,timestamp. Use* | field_namesto discover the full list.An issue is silenced when
silence_idsis non-empty.
query_metrics
Query metrics from groundcover. Unlike the gcQL signal tools, query_metrics runs PromQL and exposes several modes:
get_names
Discover metric names, optionally filtered by substring or required names.
get_labels
List the label keys for a specific metric.
query_instant
Execute a PromQL query at a point in time.
query_range
Execute a PromQL range query over a time window.
Parameters
mode
enum
yes
One of get_names, get_labels, query_instant, query_range.
metricName
string
for get_labels
The metric to inspect.
promql
string
for query modes
PromQL expression. Use names verified via get_names.
filter
string
no
Substring filter for get_names / get_labels.
required
string[]
no
Required metric names for get_names.
step
string
no
Step interval for range queries (default 1m).
clusters / envs
string[]
no
Optional cluster / environment filters.
start / end / period
see common params
no
Time window.
limit / skip
integer
no
Pagination for discovery modes.
Examples
Discover CPU-related groundcover metrics:
Get the labels for a metric:
Instant query - total CPU capacity per cluster:
Notes
Native groundcover metrics start with the
groundcover_prefix and include both a description and a unit in theget_namesresponse.Always pull names with
get_namesfirst - the response carries the canonical name to plug intopromql.Returned timestamps are in UTC.
query_monitors
List configured monitor definitions and their current health status. Use this to discover monitors before drilling into their firings via query_issues.
Parameters
query
string
no
gcQL filter string. Supported fields: monitor_name, type. Examples: monitor_name:*api*, type:prometheus.
limit / skip
integer
no
Pagination.
This tool is not time-bound and does not accept start / end / period.
Examples
List all monitors (paged):
Find checkout-related Prometheus monitors:
Find all traces-driven monitors:
Notes
Returns objects shaped
{ uuid, title, type }. Note the field-name mapping when crossing tools: the filter field here ismonitor_name, but the result field istitle; both carry the same value. Inquery_issues, the corresponding fields aremonitor_id(matchesuuid) andmonitor_name(matchestitle).Use
query_monitorsfor definitions,query_issuesfor instances - don't try to fetch alert history here.
Metadata Discovery Tools
These tools take a list of keywords and return matching field names with sample values. Use them to discover what fields exist before writing a query_* call.
Common Parameters
keywords
string[]
yes
Search terms matched against field names and values. At least one keyword required.
limit
integer
no
Max results to return. Defaults to 1000.
start
string (RFC3339)
no
Window start. Defaults to 1 hour ago.
end
string (RFC3339)
no
Window end. Defaults to now.
period
string (ISO 8601 duration)
no
Relative window. Defaults to PT1H.
Field Discovery Cheat Sheet
Pick the right discovery method based on what you're querying:
Log fields
search_logs_metadata
Trace / span fields
search_traces_metadata
Event fields
search_events_metadata
Metric names and labels
search_metrics_metadata (or query_metrics with mode:get_names / mode:get_labels)
Entity fields (live state)
kind:<EntityKind> | field_names inside query_entities (kind-scoped)
Issue fields
* | field_names inside query_issues
Monitor definitions
query_monitors (filter on monitor_name / type; results return title and uuid - same values, different field names)
search_logs_metadata
Search log field names and sample values.
When to use it
The agent doesn't know the exact log attribute name (
workloadvsk8s.workload.name, etc.).The user mentions a domain term ("checkout", "tenant", "request_id") and the agent needs to find which fields surface it.
Example call
search_traces_metadata
Search span attribute keys and sample values.
When to use it
Discover trace attributes for a service (
service.name,http.path,http_status_code, etc.).Find which span attributes carry a particular business identifier.
Example call
search_events_metadata
Search Kubernetes event fields and sample values.
When to use it
Look up event reasons (
OOMKilled,BackOff,FailedScheduling) before filtering.Find the correct entity / object fields for a specific resource kind.
Example call
search_metrics_metadata
Search metric names and their label keys / values.
When to use it
Quick keyword-based discovery of what metrics exist.
For more structured discovery (filtered name lists, label keys for a single metric), prefer
query_metricswithmode:get_namesormode:get_labels.
Example call
Last updated
