Skip to main content
Glama
ThoTischner

observability-mcp

list_sources

Check configured observability backends and their reachability before running queries. Returns source names, types, URLs, signal types, and live up/down status.

Instructions

List the configured observability backends (Prometheus, Loki, and any connector) and whether each is currently reachable. When to use: call this first to learn which source names exist and are healthy before passing source to other tools, or to debug why a query returns no data. Behavior: read-only, no side effects. Returns one entry per source with its name, type, configured URL, signal types (metrics/logs), and a live up/down status. Never throws for an unreachable backend — the backend is reported as down instead. Related: use list_services to see what is monitored within these sources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function that executes the list_sources tool logic. Calls registry.healthCheckAll() and registry.getAll(), then returns the list of sources with their status.
    export async function listSourcesHandler(
      registry: ConnectorRegistry,
      _ctx: RequestContext = defaultContext()
    ) {
      const healthResults = await registry.healthCheckAll();
      const connectors = registry.getAll();
    
      const sources = connectors.map((c) => ({
        name: c.name,
        type: c.type,
        signalType: c.signalType,
        status: healthResults[c.name]?.status || "unknown",
        latencyMs: healthResults[c.name]?.latencyMs,
      }));
    
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify({ sources }, null, 2),
          },
        ],
      };
    }
  • The tool definition/schema for list_sources, including name, description, and inputSchema (no parameters needed).
    export const listSourcesDefinition = {
      name: "list_sources" as const,
      description:
        "List all configured observability backends and their connection status. Use this to discover what data sources are available.",
      inputSchema: {
        type: "object" as const,
        properties: {},
      },
    };
  • Registration of the list_sources tool with the MCP server via mcpServer.tool(), wrapping the handler with withToolMetrics.
    mcpServer.tool(
      "list_sources",
      [
        "List the configured observability backends (Prometheus, Loki, and any connector) and whether each is currently reachable.",
        "When to use: call this first to learn which source names exist and are healthy before passing `source` to other tools, or to debug why a query returns no data.",
        "Behavior: read-only, no side effects. Returns one entry per source with its name, type, configured URL, signal types (metrics/logs), and a live up/down status. Never throws for an unreachable backend — the backend is reported as down instead.",
        "Related: use `list_services` to see what is monitored within these sources.",
      ].join(" "),
      {},
      async () => withToolMetrics("list_sources", () => listSourcesHandler(registry, ctx))
    );
  • Import statement that brings listSourcesHandler into the main index.ts where the tool is registered.
    import { listSourcesHandler } from "./tools/list-sources.js";
Behavior4/5

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

Without annotations, the description must disclose behavior. It states the tool is read-only with no side effects, and never throws for unreachable backend (reports as down instead). Could add caching info but sufficient for transparent behavior.

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

Conciseness5/5

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

The description is concise (4 sentences) with clear structure: what, when, behavior, related. No wasted words, front-loaded with purpose.

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

Completeness5/5

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

Given zero parameters, no output schema, and no annotations, the description provides a complete picture: purpose, usage timing, behavior, and return fields. It covers all needed context for an AI agent to select and invoke correctly.

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

Parameters5/5

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

Input schema has zero parameters, so description adds no parameter info, but none is needed. Baseline score of 4 applies, and the description explains the return structure (name, type, URL, signal types, status) which is helpful.

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 clearly states the tool lists configured observability backends (Prometheus, Loki, connectors) and whether they are reachable. It specifies the verb 'list' and the resource 'observability backends', distinguishing it from sibling tools like list_services.

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?

Explicitly states when to use: 'call this first to learn which source names exist and are healthy before passing source to other tools, or to debug why a query returns no data'. Also mentions related tool list_services, providing clear guidance on alternatives.

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/ThoTischner/observability-mcp'

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