Skip to main content
Glama
logly-uk

Logly MCP server

Official
by logly-uk

logly_list_sites

Retrieve all websites from your Logly account along with their site IDs. Use this tool to get the site ID required for other Logly analytics tools.

Instructions

List every website in the authenticated Logly account with its site ID. Start here to find the site ID the other tools need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:53-58 (handler)
    The 'logly_list_sites' tool is defined via the 'tool' helper function. The handler calls loglyApi('/api/sites') to list all websites in the Logly account.
    tool(
      "logly_list_sites",
      "List every website in the authenticated Logly account with its site ID. Start here to find the site ID the other tools need.",
      {},
      () => loglyApi("/api/sites")
    );
  • index.js:37-44 (registration)
    The 'tool' helper function wraps server.tool() to register the tool with the MCP server, handling error wrapping and response formatting.
    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 };
        }
      });
  • index.js:8-27 (helper)
    The loglyApi helper function handles API authentication and requests. For logly_list_sites, it is called with path '/api/sites' and no params.
    async function loglyApi(path, params) {
      const key = process.env.LOGLY_API_KEY;
      if (!key) {
        throw new Error(
          "LOGLY_API_KEY is not set. Create one in Logly → Settings → API keys."
        );
      }
      const url = new URL(BASE + path);
      for (const [k, v] of Object.entries(params || {})) {
        if (v !== undefined && v !== null && v !== "") url.searchParams.set(k, String(v));
      }
      const res = await fetch(url, {
        headers: { Authorization: `Bearer ${key}`, Accept: "application/json" },
      });
      const text = await res.text();
      if (!res.ok) {
        throw new Error(`Logly API ${res.status} on ${path}: ${text.slice(0, 300)}`);
      }
      return text;
    }
  • The schema for logly_list_sites is an empty object {} — it takes no input parameters.
    {},
Behavior4/5

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

Describes a read-only listing operation with no destructive side effects. Lacks details on authentication or potential rate limits, but acceptable for a straightforward list tool.

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?

Two concise sentences, front-loaded with the primary function and a usage hint, no wasted words.

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

Completeness5/5

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

Completely adequate for a zero-parameter list tool with no output schema; it explains what it does and why it's useful.

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?

No parameters exist, so baseline is 4. Description does not add parameter info but schema coverage is 100% and no params need explanation.

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?

Clearly states it lists every website with its site ID, distinguishing it from sibling tools that handle breakdowns, events, etc.

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?

Explicitly says to start here to find site IDs needed by other tools, providing clear usage context. Does not mention when not to use, but for a simple listing tool this is sufficient.

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