Skip to main content
Glama

cloudwatch_insights

Run custom CloudWatch Logs Insights queries over multiple log groups to aggregate data like top IPs, status codes, URI rankings, or time-bucketing. Use when predefined tools fall short.

Instructions

Run a CloudWatch Logs Insights query over one or more log groups. The general aggregation primitive (top IPs, status mix, URI ranking, time-bucketing) — use it when cloudwatch_top_ips doesn't compute what you need. Provide a query plus log_group or log_groups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows Insights returns.
queryYesLogs Insights query string, e.g. 'stats count(*) as hits by httpRequest.clientIp | sort hits desc | limit 20'.
regionNoAWS region (optional).
log_groupNoA single log group name (or use log_groups).
hours_backNoHow many hours back the query window spans.
log_groupsNoList of log group names to query together.
timeout_secondsNoMax seconds to wait for the query to finish.
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must fully disclose behavioral traits. It describes running a query but does not state whether the operation is read-only, what permissions are needed, or any rate limits or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long, front-loads the primary action, and contains no extraneous information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations or output schema, the description fails to explain the return format, pagination, or behavioral aspects like read-only nature. It is incomplete for a tool with 7 parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 7 parameters are documented in the input schema (100% coverage), so the description adds minimal additional meaning beyond the schema. The mention of providing a query and log group/log groups is consistent with schema but does not enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a CloudWatch Logs Insights query over log groups, and explicitly distinguishes itself from the sibling tool cloudwatch_top_ips by referring to itself as a general aggregation primitive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool ('when cloudwatch_top_ips doesn't compute what you need') and what to provide ('a query plus log_group or log_groups'), providing clear usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zb-ss/servonaut'

If you have feedback or need assistance with the MCP directory API, please join our Discord server