Skip to main content
Glama
syucream

Lightdash MCP Server

by syucream

lightdash_get_analytics

Retrieve analytics data for a specific table in a Lightdash project by providing the project UUID and table name.

Instructions

Get analytics for a specific table in the data catalog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectUuidYesThe UUID of the project. You can obtain it from the project list.
tableYes

Implementation Reference

  • Handler for 'lightdash_get_analytics' tool. Parses args with GetAnalyticsRequestSchema, calls GET /api/v1/projects/{projectUuid}/dataCatalog/{table}/analytics, and returns the results.
    case 'lightdash_get_analytics': {
      const args = GetAnalyticsRequestSchema.parse(
        request.params.arguments
      );
      const { data, error } = await lightdashClient.GET(
        '/api/v1/projects/{projectUuid}/dataCatalog/{table}/analytics',
        {
          params: {
            path: {
              projectUuid: args.projectUuid,
              table: args.table,
            },
          },
        }
      );
      if (error) {
        throw new Error(
          `Lightdash API error: ${error.error.name}, ${
            error.error.message ?? 'no message'
          }`
        );
      }
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data.results, null, 2),
          },
        ],
      };
    }
  • Zod schema for GetAnalyticsRequestSchema: expects projectUuid (UUID string) and table (string).
    export const GetAnalyticsRequestSchema = z.object({
      projectUuid: z
        .string()
        .uuid()
        .describe(
          'The UUID of the project. You can obtain it from the project list.'
        ),
      table: z.string(),
    });
  • src/mcp.ts:104-108 (registration)
    Registration of the 'lightdash_get_analytics' tool in the ListTools handler, with description and inputSchema.
    {
      name: 'lightdash_get_analytics',
      description: 'Get analytics for a specific table in the data catalog',
      inputSchema: zodToJsonSchema(GetAnalyticsRequestSchema),
    },
  • Lightdash client initialization used by the handler to make the API call.
    const lightdashClient = createLightdashClient(
      process.env.LIGHTDASH_API_URL || 'https://app.lightdash.cloud',
      {
        headers: {
          Authorization: `ApiKey ${process.env.LIGHTDASH_API_KEY}`,
        },
      }
    );
Behavior2/5

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

No annotations are present, so the description carries the full burden. However, it only states the high-level purpose without disclosing behavioral traits (e.g., read-only, authentication needs, error behaviors, or side effects).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is under-specified rather than concise. It omits critical information that would help an agent, making it insufficient for effective use.

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?

Given the lack of annotations, output schema, and incomplete parameter descriptions, the description should provide more context (e.g., return format, error handling, typical use cases). It falls short, leaving significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (only projectUuid has a description). The tool description does not add meaning to the parameters, such as acceptable values for 'table' or relationship to the project. Baseline of 3 is not justified due to missing compensation.

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 identifies the verb (Get) and resource (analytics for a specific table in the data catalog). It distinguishes from siblings like lightdash_get_catalog or lightdash_get_metadata, though 'analytics' remains somewhat vague.

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 alternative siblings, nor does it mention prerequisites or contexts. A simple statement without any usage direction limits the agent's ability to select correctly.

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/syucream/lightdash-mcp-server'

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