Skip to main content
Glama

Query Kpis

query_kpis

Fetch historical and real-time KPIs from a governed Postgres store across Finance, HR, Operations, and other domains by filtering by domain, metric name, or period.

Instructions

Retrieve historical and real-time Key Performance Indicators (KPIs) from the governed Postgres store.

Fetches structured time-series metrics across enterprise business domains including Finance, People (HR), Operations, Customer (Sales/Support), Engineering, Growth, Logistics, ESG, IT, and Security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of metric records to return. Defaults to 100 (range: 1 to 500).
domainNoOptional taxonomy category filter (e.g. 'Finance', 'People', 'Operations', 'Customer', 'Engineering', 'Growth', 'ESG', 'IT', 'Security'). Omit to query across all domains.
period_toNoOptional end period in 'YYYY-MM' format (e.g. '2026-06'). Inclusive upper bound.
period_fromNoOptional start period in 'YYYY-MM' format (e.g. '2024-01'). Inclusive lower bound.
metric_filterNoOptional substring or exact metric name match (e.g. 'revenue', 'churn_rate', 'gross_margin', 'cac', 'headcount'). Case-insensitive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.16
    • addedInput schema / properties / domain / description
      Added value: +"Optional taxonomy category filter (e.g. 'Finance', 'People', 'Operations',\n'Customer', 'Engineering', 'Growth', 'ESG', 'IT', 'Security'). Omit to query across all domains."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of metric records to return. Defaults to 100 (range: 1 to 500)."
    • addedInput schema / properties / metric_filter / description
      Added value: +"Optional substring or exact metric name match (e.g. 'revenue', 'churn_rate',\n'gross_margin', 'cac', 'headcount'). Case-insensitive."
    • addedInput schema / properties / period_from / description
      Added value: +"Optional start period in 'YYYY-MM' format (e.g. '2024-01'). Inclusive lower bound."
    • addedInput schema / properties / period_to / description
      Added value: +"Optional end period in 'YYYY-MM' format (e.g. '2026-06'). Inclusive upper bound."
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the data source ('governed Postgres store') and that data is both historical and real-time, and the verbs 'Retrieve'/'Fetches' imply a read-only operation. But it omits permissions, pagination/truncation behavior, and any access-control implications of the 'governed' store.

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?

Two sentences, front-loaded with the core action and scope. The long domain enumeration in sentence two partially duplicates the domain parameter description in the schema, which is mild redundancy but not bloat.

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

Completeness3/5

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

An output schema exists and the input schema is fully described, so return values need not be explained. Still, for a multi-domain query tool the description leaves sibling differentiation and the read-safety profile implicit, which are meaningful gaps.

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 description coverage is 100%, so all five parameters are already fully documented in the schema. The description's domain enumeration loosely maps to the 'domain' filter but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb ('Retrieve'/'Fetches') and resource (KPIs / structured time-series metrics) with clear scope ('historical and real-time', 'governed Postgres store'). However, it never distinguishes itself from siblings like list_available_metrics, get_executive_summary, detect_kpi_anomalies, or forecast_metric, which an agent must infer from name alone.

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 when-to-use or when-not-to-use guidance is provided. The description doesn't explain the relationship to detection, forecasting, or summary siblings, so an agent has no signal for choosing this tool over list_available_metrics or get_executive_summary.

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