Skip to main content
Glama
logly-uk

Logly MCP server

Official
by logly-uk

logly_breakdown

Retrieve top pages, referrers, countries, and device/browser breakdowns for a site over a specified time period.

Instructions

Top pages, top referrers, top countries and device/browser split for a site over the given period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYesLogly site ID (slug). Call logly_list_sites to discover it.
daysNoDays to look back: 7, 30 or 90. Defaults to 30. Ignored when 'from'/'to' are set.
fromNoRange start, YYYY-MM-DD. Use together with 'to'.
toNoRange end, YYYY-MM-DD. Use together with 'from'.

Implementation Reference

  • index.js:68-74 (registration)
    Registration of the 'logly_breakdown' tool via the custom 'tool()' helper function. Registers name, description, Zod schema for 'site', 'days', 'from', 'to' arguments, and the handler logic.
    tool(
      "logly_breakdown",
      "Top pages, top referrers, top countries and device/browser split for a site over the given period.",
      { site: siteArg, days: daysArg, from: fromArg, to: toArg },
      ({ site, days, from, to }) =>
        loglyApi(`/api/sites/${encodeURIComponent(site)}/breakdown`, range({ days, from, to }))
    );
  • index.js:72-73 (handler)
    Handler function for logly_breakdown: calls the Logly API at /api/sites/{site}/breakdown with the date range parameters, returning top pages, top referrers, top countries, and device/browser split.
    ({ site, days, from, to }) =>
      loglyApi(`/api/sites/${encodeURIComponent(site)}/breakdown`, range({ days, from, to }))
  • Input schema for logly_breakdown using Zod: requires 'site' (string), optional 'days' (positive int), optional 'from' (string YYYY-MM-DD), optional 'to' (string YYYY-MM-DD).
    { site: siteArg, days: daysArg, from: fromArg, to: toArg },
  • The 'range()' helper function that constructs query parameters from days/from/to arguments, used by the logly_breakdown handler.
    function range({ days, from, to }) {
      if (from || to) return { from, to };
      return { days: days ?? 30 };
    }
  • The 'tool()' helper function that wraps server.tool() with error handling, used to register logly_breakdown.
    function tool(name, description, shape, fn) {
      server.tool(name, description, shape, async (args) => {
        try {
          return { content: [{ type: "text", text: await fn(args || {}) }] };
        } catch (e) {
          return { content: [{ type: "text", text: "Error: " + e.message }], isError: true };
        }
      });
    }
Behavior2/5

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

With no annotations, the description must fully convey behavioral traits. It states it returns aggregates over a period, but omits critical details like read-only nature, rate limits, data freshness, pagination, or error handling. The basic function is clear but insufficiently transparent.

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 a single concise sentence that front-loads the main outputs. It is efficient and easily parsable, though a structured format (e.g., bullet points) could improve readability.

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?

Without an output schema, the description fails to explain the return format, such as whether results are arrays, include counts, or support pagination. Given the 4 parameters and no output details, the description is incomplete for effective usage.

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?

Schema description coverage is 100%, with each parameter well-documented in the schema (e.g., days defaults, from/to usage). The description adds no new parameter meaning beyond 'over the given period,' so baseline 3 is appropriate.

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 clearly states the tool returns top pages, referrers, countries, and device/browser splits for a site over a period, specifying the resource and aggregation verb. However, it does not explicitly differentiate from sibling tools like logly_stats or logly_events, which could offer similar breakdowns.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as logly_stats or logly_realtime. It lacks context about prerequisites, scenarios, or exclusions, leaving the agent without decision support.

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/logly-uk/logly-mcp'

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