Skip to content

API Reference parrot_tools.aws.cloudwatch

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.aws.cloudwatch

View source

AWS CloudWatch Toolkit for AI-Parrot.

Provides querying of CloudWatch logs, metrics, alarms, and custom metric publishing.

Alias AbstractToolkit

Re-exported from parrot_tools.toolkit.AbstractToolkit.

Class CloudWatchToolkit

Toolkit for querying AWS CloudWatch logs and metrics.

Each public method is exposed as a separate tool with the aws_cloudwatch_ prefix.

Available Operations:

  • aws_cloudwatch_query_logs: Run CloudWatch Logs Insights queries
  • aws_cloudwatch_get_metrics: Get metric statistics
  • aws_cloudwatch_list_log_groups: List available log groups
  • aws_cloudwatch_list_log_streams: List log streams in a group
  • aws_cloudwatch_get_log_events: Get events from a stream
  • aws_cloudwatch_put_metric_data: Publish custom metrics
  • aws_cloudwatch_describe_alarms: List CloudWatch alarms
  • aws_cloudwatch_log_summary: Get summarized log events
Parameter Type Default Description
aws_id str 'cloudwatch'
region_name Optional[str] None
default_log_group Optional[str] None
max_query_wait int 30
**kwargs {}

Method CloudWatchToolkit.aws_cloudwatch_query_logs

Run a CloudWatch Logs Insights query.

aws_cloudwatch_query_logs(log_group_name: Optional[str] = None, query_string: Optional[str] = None, start_time: str = '-1h', end_time: str = 'now', limit: int = 100) -> Dict[str, Any]

Parameter Type Default Description
log_group_name Optional[str] None
query_string Optional[str] None
start_time str '-1h'
end_time str 'now'
limit int 100

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_get_metrics

Get CloudWatch metric statistics.

aws_cloudwatch_get_metrics(namespace: str, metric_name: str, dimensions: Optional[List[Dict[str, str]]] = None, statistic: str = 'Average', period: int = 60, start_time: str = '-1h', end_time: str = 'now') -> Dict[str, Any]

Parameter Type Default Description
namespace str
metric_name str
dimensions Optional[List[Dict[str, str]]] None
statistic str 'Average'
period int 60
start_time str '-1h'
end_time str 'now'

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_list_log_groups

List available CloudWatch log groups.

aws_cloudwatch_list_log_groups(pattern: Optional[str] = None, limit: int = 50) -> Dict[str, Any]

Parameter Type Default Description
pattern Optional[str] None
limit int 50

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_list_log_streams

List log streams in a CloudWatch log group.

aws_cloudwatch_list_log_streams(log_group_name: str, limit: int = 50) -> Dict[str, Any]

Parameter Type Default Description
log_group_name str
limit int 50

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_get_log_events

Get log events from a CloudWatch log stream.

If log_stream_name is not provided, the most recent stream in the group (ordered by LastEventTime) is used.

aws_cloudwatch_get_log_events(log_group_name: str, log_stream_name: Optional[str] = None, start_time: Optional[str] = None, limit: int = 100) -> Dict[str, Any]

Parameter Type Default Description
log_group_name str
log_stream_name Optional[str] None
start_time Optional[str] None
limit int 100

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_put_metric_data

Publish custom metric data to CloudWatch.

aws_cloudwatch_put_metric_data(namespace: str, metric_name: str, metric_value: float, dimensions: Optional[List[Dict[str, str]]] = None, unit: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
namespace str
metric_name str
metric_value float
dimensions Optional[List[Dict[str, str]]] None
unit Optional[str] None

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_describe_alarms

List CloudWatch alarms.

aws_cloudwatch_describe_alarms(pattern: Optional[str] = None, limit: int = 50) -> Dict[str, Any]

Parameter Type Default Description
pattern Optional[str] None
limit int 50

Returns: Dict[str, Any]

Method CloudWatchToolkit.aws_cloudwatch_log_summary

Get summarized log events with parsed facility and truncated messages.

aws_cloudwatch_log_summary(log_group_name: str, log_stream_name: Optional[str] = None, start_time: Optional[str] = None, limit: int = 100, max_message_length: int = 500) -> Dict[str, Any]

Parameter Type Default Description
log_group_name str
log_stream_name Optional[str] None
start_time Optional[str] None
limit int 100
max_message_length int 500

Returns: Dict[str, Any]

Class DescribeAlarmsInput

Input for listing CloudWatch alarms.

Fields:

Field Type Default Description
pattern Optional[str] Alarm name prefix filter
limit int Maximum number of alarms

Class GetLogEventsInput

Input for getting log events from a specific stream.

Fields:

Field Type Default Description
log_group_name str CloudWatch log group name
log_stream_name Optional[str] Log stream name within the log group. If omitted, the most recent stream is used.
start_time Optional[str] Start time (ISO format or relative)
limit int Maximum number of log events

Class GetMetricsInput

Input for retrieving CloudWatch metric statistics.

Fields:

Field Type Default Description
namespace str CloudWatch metric namespace (e.g. 'AWS/Lambda', 'AWS/EC2')
metric_name str Metric name (e.g. 'Duration', 'Invocations', 'CPUUtilization')
dimensions Optional[List[Dict[str, str]]] Metric dimensions as list of {Name, Value} dicts. Example: [{'Name': 'FunctionName', 'Value': 'my-func'}]
statistic Literal['Average', 'Sum', 'Minimum', 'Maximum', 'SampleCount'] Statistic to retrieve
period int Period in seconds for data points (60, 300, 3600, etc.)
start_time str Start time (ISO format or relative like '-1h', '-24h')
end_time str End time (ISO format or 'now')

Class ListLogGroupsInput

Input for listing CloudWatch log groups.

Fields:

Field Type Default Description
pattern Optional[str] Log group name prefix filter
limit int Maximum number of log groups

Class ListLogStreamsInput

Input for listing log streams in a log group.

Fields:

Field Type Default Description
log_group_name str CloudWatch log group name
limit int Maximum number of log streams

Class LogSummaryInput

Input for getting summarized log events.

Fields:

Field Type Default Description
log_group_name str CloudWatch log group name
log_stream_name Optional[str] Specific log stream (defaults to most recent)
start_time Optional[str] Start time (ISO format or relative)
limit int Maximum number of log events
max_message_length int Maximum length for log messages

Class PutMetricDataInput

Input for publishing custom metric data.

Fields:

Field Type Default Description
namespace str CloudWatch metric namespace
metric_name str Metric name to publish
metric_value float Metric value to publish
dimensions Optional[List[Dict[str, str]]] Metric dimensions as list of {Name, Value} dicts
unit Optional[str] Metric unit (e.g. 'Seconds', 'Count', 'Bytes')

Class QueryLogsInput

Input for CloudWatch Logs Insights query.

Fields:

Field Type Default Description
log_group_name Optional[str] CloudWatch log group name (e.g. '/aws/lambda/my-function')
query_string Optional[str] CloudWatch Logs Insights query. Example: 'fields @timestamp, @message | filter @message like /ERROR/ | limit 50'
start_time str Start time (ISO format or relative like '-1h', '-30m', '-7d')
end_time str End time (ISO format or 'now')
limit int Maximum number of results

Alias tool_schema

Re-exported from parrot_tools.decorators.tool_schema.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally