Manage Instana Infrastructure Resources
manage_infrastructureQuery and analyze Instana infrastructure metrics, discover plugins and tags, inspect snapshots, and manage Smart Alert configurations to monitor entities and LLM/GenAI usage.
Instructions
Unified Instana infrastructure resource manager for comprehensive infrastructure monitoring.
Also the home for aggregated LLM/GenAI entity metrics (token usage, cost, throughput,
GenAI app listings). Percentile latency (P95/P99) and trace/span data → manage_applications.
Use plugin="oTelLLM" for catalog/resources and type="oTelLLM" in analyze payloads.
Agent names vary. A filter on the label tag can match the entity but return NO metric
values (empty metrics); that is not zero usage. Match by label in the results of an
unfiltered query, or filter by a metric tag such as metric.tag.service_name (oTelLLM).
Resource Types: - "analyze": Query infrastructure entity data with grouping or filtering - "catalog": Get available plugins, metrics, and tags for infrastructure monitoring - "resources": Get snapshot details and monitoring state - "alert_config": Manage Instana Infrastructure Smart Alert configurations (CRUD)
RECOMMENDED WORKFLOW FOR ANALYZE: 1. FIRST: Call get_plugins to discover available entity types - Returns list of plugins with their IDs - these IDs are required for subsequent calls - Example: [{"id": "plugin_name1", ...}, {"id": "plugin_name2", ...}]
2. SECOND: Call get_plugin_schema with a VALID plugin ID from step 1
- Combines get_metrics + get_tag_catalog into ONE efficient call
- IMPORTANT: Plugin ID must be from get_plugins - invalid IDs return HTTP 400
- Returns: {"metrics": ["memory.usage", ...], "tags": ["tag.name", ...]}
- tagFilterExpression is REQUIRED by the Instana API — omitting it causes HTTP 422. Always provide one; use an empty EXPRESSION to match all entities
3. THIRD: Use the discovered entity types, metrics, and tags in analyze operations
- Build queries with proper type, metrics, and tagFilterExpression
- The router auto-normalizes tagFilterExpression format to prevent HTTP 422 errorsANALYZE (resource_type="analyze"): operations: get_entities, get_entity_groups params: {payload}
IMPORTANT AUTO-ROUTING: The router automatically detects the correct endpoint based on payload:
- If payload contains "groupBy" → automatically routes to get_entity_groups endpoint
- If payload does NOT contain "groupBy" → automatically routes to get_entities endpoint
You can specify either operation, but the router will auto-correct based on payload content.
Aggregations: MAX, MEAN, MIN, SUM
Operators: EQUALS, NOT_EQUAL, CONTAINS, NOT_CONTAIN, STARTS_WITH, ENDS_WITH, GREATER_THAN, GREATER_OR_EQUAL_THAN, LESS_THAN, LESS_OR_EQUAL_THAN
payload (required): Complete request payload as dictionary
- type (required): Entity type from get_plugins
- metrics (required): Array of metric objects
- metric (required): Metric name from get_metrics
- granularity (required): Time granularity in milliseconds (e.g., 3600000 for 1 hour)
- aggregation (required): Aggregation type (MAX, MEAN, MIN, SUM)
- timeFrame (required): Time range for query
- windowSize (required): Duration in milliseconds (e.g., 3600000 for 1 hour)
- to (optional): End timestamp in milliseconds (default: now)
- tagFilterExpression (REQUIRED): Filter expression for entities — API returns HTTP 422 if omitted. Use {"type": "EXPRESSION", "logicalOperator": "AND", "elements": []} to match all entities
- type: "TAG_FILTER" for single filter, "EXPRESSION" for multiple
- entity: "NOT_APPLICABLE" (required for TAG_FILTER)
- name: Tag name from get_tag_catalog
- operator: Filter operator (EQUALS, CONTAINS, etc.)
- value: Filter value
- logicalOperator: "AND" or "OR" (for EXPRESSION type)
- elements: Array of TAG_FILTER objects (for EXPRESSION type)
- pagination: Pagination settings
- retrievalSize: Number of items to retrieve (default: 200 for entities, 20 for groups)
- groupBy (optional, for get_entity_groups only): Array of tag names from get_tag_catalog
- order (optional, for get_entity_groups only): Ordering settings
- by: Field to order by (e.g., "label")
- direction: "ASC" or "DESC"
get_entities - Get individual infrastructure entities with metrics
get_entity_groups - Get grouped infrastructure entities with aggregated metrics (requires groupBy parameter)CATALOG (resource_type="catalog"): operations: get_plugins, get_plugin_schema, get_metrics, get_tag_catalog params: {plugin, filter}
get_plugins - Get all available entity types (plugins) in your Instana installation
Returns: List of plugin IDs that can be used as entity types
This is the FIRST step - discover what entity types are available in your environment
get_plugin_schema - Get complete schema (metrics + tags) for a plugin in ONE call (RECOMMENDED)
- plugin (required): Plugin ID from get_plugins (e.g., "host", "jvmRuntimePlatform", "oTelLLM")
- filter (optional): "builtin" or "custom" to filter metric types
Returns: Dictionary with both metrics and tags for the plugin
{
"plugin": "host",
"metrics": ["cpu.used", "memory.used", ...],
"tags": {"host.name": {...}, "host.type": {...}, ...},
"summary": {"total_metrics": 50, "total_tags": 25}
}
This COMBINES get_metrics and get_tag_catalog into a single call
get_metrics - Get infrastructure metrics catalog for a specific plugin
- plugin (required): Plugin ID from get_plugins (e.g., "host", "jvmRuntimePlatform", "oTelLLM")
- filter (optional): "builtin" or "custom" to filter metric types
Returns: List of metric names available for the plugin
Use returned metric names exactly in analyze operations
get_tag_catalog - Get valid tag names for a specific plugin
- plugin (required): Plugin ID from get_plugins (e.g., "host", "kubernetesPod", "oTelLLM")
Returns: Available tag names for filtering and grouping
Use returned tag names exactly in analyze operationsRESOURCES (resource_type="resources"): operations: get_snapshot, get_snapshots params: {snapshot_id, to_time, window_size, query, from_time, size, plugin, offline, detailed}
get_snapshot - Get detailed information for a specific snapshot ID
- snapshot_id (required): The snapshot ID to retrieve details for
- to_time (optional): End timestamp in milliseconds
- window_size (optional): Window size in milliseconds
Returns: Complete snapshot details including configuration, metrics, and state
Use this when you have a specific snapshot ID and need its full details
get_snapshots - Search and discover multiple snapshots matching criteria
- query (optional): Search query string to filter snapshots
- from_time (optional): Start timestamp in milliseconds (default: 1 hour ago)
- to_time (optional): End timestamp in milliseconds (default: now)
- size (optional): Maximum number of results to return (default: 100)
- plugin (optional): Entity type to filter by (e.g., "host", "jvmRuntimePlatform", "oTelLLM")
- offline (optional): Include offline snapshots (default: false)
- detailed (optional): Return full raw data vs summarized (default: false)
Returns: List of snapshots matching the search criteria
Use this to discover entities, search infrastructure, or find componentsALERT_CONFIG (resource_type="alert_config"): operations: find_active, find, find_versions, create, update, delete, enable, disable, restore params: {id, alert_ids, valid_on, created, payload}
find_active - List all active Infra Smart Alert configurations
RECOMMENDED: Omit both alert_ids and page/page_size for a plain listing. Client-side
pagination (default page_size=50) is always applied to the full API response to prevent
LLM context overflow — the first page of 50 results is returned automatically.
- alert_ids (optional): Restrict results to this explicit set of config IDs. Use when
you already know which alerts to inspect. Omit to return all active configurations.
NOTE: pagination params are still applied on top of the filtered set.
- page (optional): 1-based page number for paging through the active list (default: 1).
Only needed when the total exceeds page_size and you want a later page.
- page_size (optional): Results per page (default: 50, max: 1000). The default of 50
exists specifically to avoid overwhelming the LLM context with large alert lists.
Increase only when you need more results in a single response.
Returns: {configs, count, total, page, page_size, total_pages, has_next, has_previous}
find - Get a specific configuration by ID
- id (required): The configuration ID
- valid_on (optional): Unix timestamp (ms) to retrieve the version active at that time
Returns: Full configuration object
find_versions - Get all historical versions of a configuration
- id (required): The configuration ID
Returns: List of all versions sorted by creation date (descending)
create - Create a new Infra Smart Alert configuration
- payload (required): Configuration object
REQUIRED fields:
name (string, max 256): Alert name
description (string): Alert description
granularity (int): Evaluation window in ms — one of: 60000, 300000, 600000, 900000, 1200000, 1800000
groupBy (list): Tag names to group by (can be empty [])
tagFilterExpression (dict): Entity filter — e.g. {"type": "EXPRESSION", "logicalOperator": "AND", "elements": []}
timeThreshold (dict): Time condition — e.g. {"type": "violationsInSequence", "timeWindow": 600000}
OPTIONAL fields:
severity (int): 5 (Warning) or 10 (Critical)
evaluationType (string): "PER_ENTITY" or "CUSTOM"
rule (dict): Single alert rule — shape:
alertType (string): "genericRule"
metricName (string): Metric name from get_metrics (e.g. "cpu.used")
entityType (string): Plugin ID from get_plugins (e.g. "host")
aggregation (string): "MEAN", "MAX", "MIN", or "SUM"
crossSeriesAggregation (string): Same values as aggregation
NOTE: metricGroupBy is auto-defaulted to [] — you may omit it
rules (list): Multiple rules (up to 5) — each entry shape:
thresholdOperator (string): e.g. ">="
rule (dict): Same shape as the top-level rule dict above
thresholds (dict): e.g. {"WARNING": {"type": "staticThreshold", "value": 0.8}}
NOTE: rule.metricGroupBy is auto-defaulted to [] in every entry
threshold (dict): Threshold for single-rule configs — e.g. {"type": "staticThreshold", "operator": ">=", "value": 0.8}
triggering (bool): Whether to also trigger an Incident
alertChannelIds (list): Alert channel IDs (defaults to [])
customPayloadFields (list): Extra notification fields (defaults to [])
gracePeriod (int): Duration (ms) alert stays open after conditions clear
update - Update an existing configuration
- id (required): The configuration ID
- payload (required): Full updated configuration object (same fields as create)
delete - PERMANENTLY delete a configuration (irreversible)
- id (required): The configuration ID
WARNING: This operation cannot be undone. The configuration is removed immediately.
PREFER "disable" over "delete" when you only want to stop the alert temporarily.
RECOVERY: if deleted by mistake, use "restore" with a version timestamp from "find_versions".
enable - Enable a configuration
- id (required): The configuration ID
disable - Disable a configuration
- id (required): The configuration ID
restore - Restore a deleted configuration
- id (required): The configuration ID
- created (required): Unix timestamp (ms) of the version to restore (from find_versions)Args: resource_type: "analyze", "catalog", "resources", or "alert_config" operation: Specific operation for the resource type params: Operation-specific parameters (optional)
Returns: Dictionary with results from the appropriate tool
Examples: resource_type="catalog", operation="get_plugins" resource_type="catalog", operation="get_metrics", params={"plugin": "host"} resource_type="catalog", operation="get_plugin_schema", params={"plugin": "host"} resource_type="catalog", operation="get_metrics", params={"plugin": "jvmRuntimePlatform", "filter": "builtin"} resource_type="catalog", operation="get_tag_catalog", params={"plugin": "host"} resource_type="analyze", operation="get_entities", params={"payload": {"type": "host", "metrics": [{"metric": "cpu.used", "granularity": 3600000, "aggregation": "MEAN"}], "timeFrame": {"windowSize": 3600000}}} resource_type="analyze", operation="get_entities", params={"payload": {"type": "jvmRuntimePlatform", "metrics": [{"metric": "memory.used", "granularity": 3600000, "aggregation": "MAX"}, {"metric": "threads.blocked", "granularity": 3600000, "aggregation": "MEAN"}], "timeFrame": {"to": 1743923995000, "windowSize": 3600000}, "tagFilterExpression": {"type": "TAG_FILTER", "entity": "NOT_APPLICABLE", "name": "host.name", "operator": "EQUALS", "value": "server1"}, "pagination": {"retrievalSize": 200}}} resource_type="analyze", operation="get_entity_groups", params={"payload": {"type": "host", "groupBy": ["host.name"], "metrics": [{"metric": "cpu.used", "granularity": 3600000, "aggregation": "MEAN"}], "timeFrame": {"windowSize": 3600000}, "tagFilterExpression": {"type": "TAG_FILTER", "entity": "NOT_APPLICABLE", "name": "host.name", "operator": "CONTAINS", "value": "prod"}, "pagination": {"retrievalSize": 20}}} resource_type="resources", operation="get_snapshot", params={"snapshot_id": "abc123xyz"} resource_type="resources", operation="get_snapshots", params={"plugin": "host", "size": 50} resource_type="resources", operation="get_snapshots", params={"query": "high cpu", "from_time": 1617994800000, "to_time": 1618081200000, "detailed": true} resource_type="alert_config", operation="find_active" resource_type="alert_config", operation="find_active", params={"alert_ids": ["H5PW_lINTV6yGN8ad5jG49", "pkPW_lINTV6yGN8ad8jG49"]} resource_type="alert_config", operation="find_active", params={"page": 2, "page_size": 25} resource_type="alert_config", operation="find", params={"id": "H5PW_lINTV6yGN8ad5jG49"} resource_type="alert_config", operation="find_versions", params={"id": "H5PW_lINTV6yGN8ad5jG49"} resource_type="alert_config", operation="create", params={"payload": {"name": "High CPU Alert", "description": "CPU exceeded threshold", "granularity": 600000, "groupBy": [], "tagFilterExpression": {"type": "EXPRESSION", "logicalOperator": "AND", "elements": []}, "timeThreshold": {"type": "violationsInSequence", "timeWindow": 600000}, "severity": 10, "rule": {"alertType": "genericRule", "metricName": "cpu.used", "entityType": "host", "aggregation": "MEAN", "crossSeriesAggregation": "MEAN"}, "threshold": {"type": "staticThreshold", "operator": ">=", "value": 0.9}}} resource_type="alert_config", operation="update", params={"id": "H5PW_lINTV6yGN8ad5jG49", "payload": {"name": "Updated Alert", "description": "Updated", "granularity": 600000, "groupBy": [], "tagFilterExpression": {"type": "EXPRESSION", "logicalOperator": "AND", "elements": []}, "timeThreshold": {"type": "violationsInSequence", "timeWindow": 600000}}} resource_type="alert_config", operation="delete", params={"id": "H5PW_lINTV6yGN8ad5jG49"} resource_type="alert_config", operation="enable", params={"id": "H5PW_lINTV6yGN8ad5jG49"} resource_type="alert_config", operation="disable", params={"id": "H5PW_lINTV6yGN8ad5jG49"} resource_type="alert_config", operation="restore", params={"id": "H5PW_lINTV6yGN8ad5jG49", "created": 1710658800000}
# GENAI / LLM examples —
# "For recommendation-agent, shipping-agent, and payment-agent — total tokens and max response duration in last 24h"
resource_type="analyze", operation="get_entity_groups", params={"payload": {"type": "oTelLLM", "groupBy": ["metric.tag.service_name"], "metrics": [{"metric": "metrics.gauges.llm.usage.total_tokens", "granularity": 3600000, "aggregation": "SUM"}, {"metric": "metrics.gauges.llm.response.duration", "granularity": 3600000, "aggregation": "MAX"}], "timeFrame": {"windowSize": 86400000}, "tagFilterExpression": {"type": "EXPRESSION", "logicalOperator": "OR", "elements": [{"type": "TAG_FILTER", "entity": "NOT_APPLICABLE", "name": "metric.tag.service_name", "operator": "EQUALS", "value": "payment-agent"}, {"type": "TAG_FILTER", "entity": "NOT_APPLICABLE", "name": "metric.tag.service_name", "operator": "EQUALS", "value": "recommendation-agent"}, {"type": "TAG_FILTER", "entity": "NOT_APPLICABLE", "name": "metric.tag.service_name", "operator": "EQUALS", "value": "shipping-agent"}]}, "pagination": {"retrievalSize": 20}}}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resource_type": "<resource_type>",
"operation": "<operation>"
},
"name": "manage_infrastructure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| operation | Yes | ||
| resource_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||