Skip to main content
Glama

Facet a query across dimensions (ranked top-N counts)

sumo_facets
Read-only

Run concurrent count-by-dimension aggregates to see the distribution of log fields, returning compact ranked tables per dimension for quick insight into matching logs.

Instructions

The fastest way to see the SHAPE of matching logs before reading any messages: runs one small "count by " aggregate per dimension (concurrently; every job auto-deleted) and returns a compact ranked table per dimension. Dimensions starting with "_" are native Sumo fields (e.g. _sourcecategory, _sourcehost); anything else is an ABSOLUTE JSON path from the _raw root (e.g. stream, log.levelname, log.status — dots allowed). A dimension that is 100% (none) probably does not exist at that path — run sumo_describe_schema to learn the scope's real fields. Numeric keys match numerically when filtering (num(x) = 404) — some producers emit float-strings like "404.0" (displayed coerced). One failing dimension yields an error line, never a total failure. Time range: exactly ONE of last (relative, e.g. "15m", "2h"; units s/m/h/d) OR both from and to (ISO-8601 like 2026-07-02T18:28:00, or epoch milliseconds).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd time: ISO-8601 or epoch ms. Requires `from`.
fromNoStart time: ISO-8601 or epoch ms. Requires `to`.
lastNoRelative window ending now, e.g. "15m", "2h", "1d". Mutually exclusive with from/to.
limitNoTop-N values per dimension (default 15, max 100).
queryYesSumo Logic scope query (keywords + metadata filters). Scope only — no | operators; each dimension appends its own "| count by".
timeZoneNoIANA timezone for query-time parsing (default UTC).
dimensionsNoDimensions to facet on (default ["_sourcecategory","_sourcehost"]). One concurrent search job each.
byReceiptTimeNoSearch by receipt time; recommended true for very recent windows (ingestion lag).
Behavior4/5

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

Annotations indicate readOnlyHint=true. The description adds behavioral details: concurrent execution, auto-deletion of jobs, error tolerance (one failing dimension yields error line, not total failure), time range rules, and numeric matching behavior. This goes well beyond annotations, though rate limits or authentication are not mentioned.

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 description is well-structured: begins with core purpose, then details dimensions, numeric matching, and time range. It is dense but not wasteful. Slightly longer than minimal, but every sentence adds necessary context for correct usage.

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?

Given 8 parameters, 100% schema coverage, and no output schema, the description covers behavioral aspects well: error handling, dimension interpretation, time rules. It does not describe the return format (likely a list of facets), but the overall completeness is high for a faceted query tool.

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% (all parameters described). The description adds significant meaning: explains that dimensions starting with '_' are native fields, others are JSON paths; clarifies time range exclusivity; notes default and max for limit; and explains numeric matching quirks. This adds value beyond the schema.

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 the tool's purpose: 'the fastest way to see the SHAPE of matching logs before reading any messages' and specifies it returns ranked top-N counts per dimension. It distinguishes from siblings like sumo_run_search (general search) and sumo_trend (time-series) by emphasizing speed and dimensionality.

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

Usage Guidelines4/5

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

The description gives clear context on when to use (fast overview before reading), what it does (concurrent jobs, auto-deleted), and how to interpret dimensions. It also suggests sumo_describe_schema for unknown fields. However, it does not explicitly state when not to use this tool versus alternatives, which would earn a 5.

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/mbe24/yokozuna-mcp'

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