Skip to main content
Glama

Listmetricdefinitions

listMetricDefinitions

List all available engineering metric definitions.

USAGE - Call this endpoint BEFORE querying metrics (queryPointInTimeMetrics):

  1. Once at start: Call with view='basic' to discover all available metrics - cache this response

  2. Before querying: Call with view='full' and key=METRIC_KEY to get query metadata for only the metrics you need

  3. Use cached metadata to construct valid point-in-time queries

IMPORTANT: Do NOT call view='full' without a key filter. The unfiltered full view is very large.

Cache responses in your context. Only refresh if no longer in your context window or explicitly requested (ex to check if metric readiness has changed).

Query parameters:

  • view: 'basic' (default) returns minimal info, 'full' includes sources and query metadata

  • key: Filter metrics by key (supports multiple values and comma-separated lists)

Full view provides query construction metadata:

  • supportedAggregations: Valid aggregation methods for the metric

  • orderByAttribute: Attribute path for sorting by metric values

  • groupByOptions[].key: Valid groupBy keys (use exact values, do NOT guess)

  • filterOptions[].key: Valid filter keys (use exact values, do NOT guess)

Valid orderBy attributes for metric queries:

  • orderByAttribute: The metric value itself (returned in full view)

  • Source attributes: Any attribute from the metric's source (e.g., "source_name.attribute_name")

  • Dimension attributes: Any attribute from related dimensions (e.g., "source_name.dimension_name.attribute_name")

Filter operators by type (for constructing queries):

  • STRING: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, LIKE, NOT_LIKE, IN, NOT_IN, ANY

  • INTEGER/DECIMAL/DOUBLE: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IN, NOT_IN, BETWEEN, ANY

  • DATETIME/DATE: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, BETWEEN

  • BOOLEAN: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, IN, NOT_IN

  • ARRAY: EQUAL, CONTAINS, IN

Error responses:

  • 400: Invalid view parameter (must be 'basic' or 'full')

  • 403: Restricted Feature (contact help@cortex.io)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
viewNobasic
contextYes Explain why you're invoking this tool now and how its output will be used. Then state how this call supports your *overall objective* and fits into your broader plan across all tool calls (e.g., why this tool vs. others, and what step it unblocks). Never share any personal details or sensitive information.
session_idYesSession continuity handle, one of two values: the ses_ ID issued for the task underway, or start. This server cannot link your calls between requests on its own, so session continuity travels in this parameter instead. If you were handed a session_id for this task — for example by the agent that spawned you — send that exact value from your first call. Otherwise send start on your first call; the server will issue an opaque correlation ID in the mcp_session field of the result, or in a text block at the start of the result beginning [session_id issued. Then send that exact ses_ value on every later call and hand it to any subagents working the same task. start always begins a new, unrelated task — never send it mid-task. If you send a value this server does not recognize, the result reports it: mcp_session.status of unrecognized, or a text block beginning [session_id unrecognized; re-send the ID issued for this task, or start if none was issued yet. Never invent a ses_ value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Session continuity handle, one of two values: the ses_ ID issued for the task underway, or start. This server cannot link your calls between requests on its own, so session continuity travels in this parameter instead. If you were handed a session_id for this task — for example by the agent that spawned you — send that exact value from your first call. Otherwise send start on your first call; the server will issue an opaque correlation ID in the mcp_session field of the result, or in a text block at the start of the result beginning [session_id issued. Then send that exact ses_ value on every later call and hand it to any subagents working the same task. start always begins a new, unrelated task — never send it mid-task. If you send a value this server does not recognize, the result reports it: mcp_session.status of unrecognized, or a text block beginning [session_id unrecognized; re-send the ID issued for this task, or start if none was issued yet. Never invent a ses_ value.",
      +  "pattern": "^(start|ses_[0-9A-Za-z]{27})$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "context"
      -]New value: +[
      +  "session_id",
      +  "context"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses performance characteristics (unfiltered full view is very large), caching behavior, and 400/403 error responses. It also explains what metadata full view returns, though it does not explicitly state read-only semantics or auth requirements; 'List' implies read-only.

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 long but well-structured with clear headings and front-loaded purpose and usage. The filter-operator and ordering sections are dense but relevant to constructing valid point-in-time queries, so they earn their place. There is no filler or tautological repetition.

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 lacking an output schema and annotations, the description provides enough to call the tool correctly: workflow, parameter semantics, caching, error handling, and query metadata. A minor gap is that the exact shape of basic/full response envelopes is not spelled out, but the mention of 'minimal info' and key filtering makes it inferable.

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?

Schema descriptions cover only session_id and context, leaving key and view undocumented there. The description fills this gap by defining allowed view values, explaining that key supports multiple values and comma-separated lists, and describing the query metadata returned in full view. It does not restate context/session_id, but those are already well documented 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?

Description opens with 'List all available engineering metric definitions,' a specific verb and resource. It also frames the tool as the prerequisite step before queryPointInTimeMetrics, distinguishing it from generic listing siblings like listDefinitions.

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?

Includes an explicit USAGE section: call before querying metrics, once with view='basic' to discover metrics, then with view='full' and a key before querying. It also gives a clear anti-pattern: do not call view='full' without a key filter, plus caching instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources