Skip to main content
Glama
Scalyr MCP Server

Scalyr MCP Server

by celos101

scalyr_count

Read-only

Count log events matching a filter to gauge data volume before querying full logs; numericQuery text matching may yield slightly higher counts than exact field matching.

Instructions

Count log events matching a filter. Fast way to check data volume before querying full logs.

Note: uses Scalyr's numericQuery which does text matching, so counts may be slightly higher than exact field matching. For precise counts, use scalyr_power_query.

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": {
      "filter": "<filter>",
      "startTime": "<startTime>"
    },
    "name": "scalyr_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
filterYesScalyr filter expression
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

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, open-world, so safety is covered; the description adds real value beyond that by disclosing that it uses numericQuery text matching and therefore over-counts relative to exact field matching. It also signals speed, implying a cheaper call than full log retrieval. It stops short of describing return shape or any count ceiling, which keeps it from a 5.

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?

Three short sentences, zero filler: purpose first, use case second, the accuracy caveat and its alternative last. Every sentence carries information an agent needs to choose and call the tool.

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

Completeness4/5

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

For a three-parameter read-only counter with full schema coverage and safety annotations, the description supplies purpose, caveat, and routing. The only mild gap is that it never says what the response contains (presumably a count), which an agent must infer from the tool name.

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 note that filtering is text-matching rather than exact field matching materially changes how an agent should construct and interpret the 'filter' parameter. Time parameters are left entirely to the schema, which already documents relative and absolute formats.

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?

States a specific verb and resource ('Count log events matching a filter') and explicitly contrasts itself with scalyr_power_query for precise counting. An agent can distinguish it from the sibling query tools without opening any schema.

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?

Names the use case ('check data volume before querying full logs') and names the alternative with the exact condition that selects it ('For precise counts, use scalyr_power_query'). Both when-to-use and when-to-use-something-else are explicit.

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