Skip to main content
Glama
Scalyr MCP Server

Scalyr MCP Server

by celos101

scalyr_power_query

Read-only

Run PowerQuery expressions to aggregate, group, and filter logs for analytics-style investigations, using relative or absolute time ranges.

Instructions

Run a Scalyr PowerQuery expression for advanced aggregation, grouping, and filtering. Use this for analytics-style queries.

Examples:

  • $serverHost == "bank-cron" level == "ERROR" | group count() by status

  • $logfile == "/var/log/app.log" | group count(), avg(duration) by endpoint | sort -count

  • level == "ERROR" | columns timestamp, message, $serverHost

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": {
      "query": "<query>",
      "startTime": "<startTime>"
    },
    "name": "scalyr_power_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesPowerQuery expression including filter and pipe stages
endTimeNoEnd of time range. Defaults to now
startTimeYesStart of time range. Relative (e.g. '60m', '24h', '7d') or absolute timestamp

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered and the description needn't restate it. What it omits is the operational behavior that matters for a query tool: whether results are capped, how large result sets are returned, and whether long-running queries time out or cost more.

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

Conciseness4/5

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

The purpose is front-loaded in the first sentence and the examples are compact, task-shaped, and each illustrates a different capability (grouping, aggregation with sort, projection). Slightly more example volume than strictly necessary, but every line contributes usable syntax.

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

Completeness3/5

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

With no output schema, the description leaves the return shape undefined — an agent cannot tell whether it gets raw rows, aggregated columns, or a summary envelope. Time-range semantics are handled by the schema (endTime defaults to now), so the main remaining gap is result format and size behavior.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the three worked examples add genuine meaning beyond the schema by demonstrating the PowerQuery grammar: field filters, $-prefixed special fields like $serverHost and $logfile, pipe stages (group, sort, columns), and aggregation syntax. That materially helps an agent construct a valid `query` value rather than just knowing it is a string.

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

Purpose4/5

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

The description gives a specific verb and resource ("Run a Scalyr PowerQuery expression") and scopes it to "advanced aggregation, grouping, and filtering" and "analytics-style queries", which distinguishes it from a plain log-search sibling like scalyr_query_logs. It stops short of naming any sibling explicitly, so differentiation is implied by adjectives rather than stated by comparison.

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

Usage Guidelines3/5

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

"Use this for analytics-style queries" is a real usage cue, and the examples implicitly show the kinds of tasks it suits. However, there is no explicit when-not guidance, no statement of prerequisites or limits, and no named alternative for simple lookups, so an agent must infer that scalar counting belongs to scalyr_count.

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