Skip to main content
Glama
logly-uk

Logly MCP server

Official
by logly-uk

logly_funnel_results

Retrieve completion counts and drop-off rates for each step of a conversion funnel. Analyze user progression to identify bottlenecks.

Instructions

Completion counts and drop-off per step for one conversion funnel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
funnel_idYesFunnel ID, from logly_funnels.
daysNoDays to look back: 7, 30 or 90. Defaults to 30. Ignored when 'from'/'to' are set.

Implementation Reference

  • index.js:98-104 (registration)
    Registration of the 'logly_funnel_results' tool using the local `tool()` helper function.
    tool(
      "logly_funnel_results",
      "Completion counts and drop-off per step for one conversion funnel.",
      { funnel_id: z.string().describe("Funnel ID, from logly_funnels."), days: daysArg },
      ({ funnel_id, days }) =>
        loglyApi(`/api/funnels/${encodeURIComponent(funnel_id)}/results`, { days: days ?? 30 })
    );
  • Input schema for funnel_results: funnel_id (string) and optional days (number, defaults to 30).
    { funnel_id: z.string().describe("Funnel ID, from logly_funnels."), days: daysArg },
  • Handler function: calls loglyApi GET on /api/funnels/{funnel_id}/results with ?days=N.
      ({ funnel_id, days }) =>
        loglyApi(`/api/funnels/${encodeURIComponent(funnel_id)}/results`, { days: days ?? 30 })
    );
  • index.js:8-27 (helper)
    The loglyApi helper that makes authenticated HTTP requests to the Logly API.
    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 local tool() wrapper that registers each tool with the McpServer and handles errors.
    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 carries the full burden of behavioral disclosure. It does not mention that the tool is read-only, whether results are aggregated, or any rate limits. Lacks transparency beyond the basic output type.

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?

A single, front-loaded sentence effectively conveys the tool's purpose without wasted words. Slightly more structure could improve readability, but it is concise.

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?

No output schema is provided, and the description does not explain the format of the return (e.g., step-by-step breakdown). For a tool with a specific output type, more detail on what the results contain is needed for completeness.

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 coverage is 100%, so the schema already describes both parameters. The description adds that funnel_id comes from logly_funnels and that days defaults to 30 and is ignored when from/to are set, but from/to are not in the schema, potentially causing confusion. Baseline of 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 that the tool returns 'completion counts and drop-off per step for one conversion funnel.' This is specific about what the tool outputs and identifies it as focusing on a single funnel, distinguishing it from siblings that likely list funnels or handle events.

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?

No guidance is provided on when to use this tool versus alternatives like logly_breakdown or logly_stats. The description implies it is for a single funnel but does not specify conditions or exclusions. Minimal context for an agent to decide.

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