Skip to main content
Glama
poddubnyoleg

Lightdash MCP Server

by poddubnyoleg

get-custom-metrics

Retrieve user-defined custom metrics from a Lightdash project, including their SQL expressions and associated tables, to discover business calculations for use in charts and queries.

Instructions

Get custom metrics defined in the project.

Custom metrics are user-defined metrics created in the Lightdash UI that aren't part of the dbt model definitions. These are stored separately and can be used in charts and dashboards.

Returns:

  • Custom metric definitions

  • SQL expressions used to calculate them

  • Associated tables/explores

  • Labels and descriptions

When to use:

  • To discover custom business metrics created by analysts

  • To understand what custom calculations are available

  • Before using a custom metric in a chart or query

Note: These are different from metrics defined in your dbt models.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_uuidNoOptional: UUID of the project. If not provided, uses current project.
Behavior4/5

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

With no annotations provided, the description fully discloses that these are user-defined metrics stored separately from dbt models, and that it returns definitions, SQL expressions, associated tables, and labels. It does not mention any side effects or destructive actions, which is appropriate for a read operation.

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 with paragraphs and bullet points, making it easy to scan. It is clear and informative without being overly verbose, though it could be slightly more concise.

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?

Despite no output schema, the description lists return fields and clearly explains the tool's function. For a simple get operation with one optional parameter, it provides sufficient context. Possible minor improvements: mention if pagination is supported.

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?

The input schema has 100% description coverage for the single optional parameter, so the description adds no new information beyond 'if not provided, uses current project' which is already in 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 explicitly states the tool retrieves custom metrics defined in the project, distinguishes them from dbt model metrics, and lists return fields. The verb 'Get' clearly identifies the action, and the resource 'custom metrics' is well-defined.

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

Usage Guidelines5/5

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

The description includes a 'When to use' section with three specific scenarios: discovering custom business metrics, understanding custom calculations, and before using a metric in a chart/query. It also notes the difference from dbt model metrics, providing clear guidance.

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/poddubnyoleg/lightdash_mcp'

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