Skip to main content
Glama

get-monitor

Retrieve detailed configuration, status, and information for a specific Datadog monitor using its unique ID to manage monitoring settings.

Instructions

Get detailed information about a specific Datadog monitor by its ID. Use this to retrieve the complete configuration, status, and other details of a single monitor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
monitorIdYes

Implementation Reference

  • The core handler function that performs the API call to retrieve details of a specific Datadog monitor by its ID using the Datadog API client.
    execute: async (params: GetMonitorParams) => {
      try {
        const { monitorId } = params;
    
        const apiInstance = new v1.MonitorsApi(configuration);
    
        const apiParams: v1.MonitorsApiGetMonitorRequest = {
          monitorId: monitorId
        };
    
        const response = await apiInstance.getMonitor(apiParams);
        return response;
      } catch (error) {
        console.error(`Error fetching monitor ${params.monitorId}:`, error);
        throw error;
      }
    }
  • src/index.ts:105-117 (registration)
    Registers the 'get-monitor' tool with the MCP server, defining its name, description, input schema, and handler that delegates to getMonitor.execute.
    server.tool(
      "get-monitor",
      "Get detailed information about a specific Datadog monitor by its ID. Use this to retrieve the complete configuration, status, and other details of a single monitor.",
      {
        monitorId: z.number()
      },
      async (args) => {
        const result = await getMonitor.execute(args);
        return {
          content: [{ type: "text", text: JSON.stringify(result) }]
        };
      }
    );
  • Zod input schema for the 'get-monitor' tool, validating the monitorId parameter as a number.
    {
      monitorId: z.number()
    },
  • TypeScript type definition for the input parameters of the getMonitor tool.
    type GetMonitorParams = {
      monitorId: number;
    };
  • Initialization function that sets up the Datadog API client configuration with API keys and site variables.
    initialize: () => {
      const configOpts = {
        authMethods: {
          apiKeyAuth: process.env.DD_API_KEY,
          appKeyAuth: process.env.DD_APP_KEY
        }
      };
    
      configuration = client.createConfiguration(configOpts);
    
      if (process.env.DD_METRICS_SITE) {
        configuration.setServerVariables({
          site: process.env.DD_METRICS_SITE
        });
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving 'complete configuration, status, and other details,' which gives some context on what information is returned. However, it lacks details on permissions, rate limits, error handling, or response format, which are important for a read operation with no output schema.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds usage context. Both sentences earn their place by providing essential information without redundancy or fluff, making it efficient and easy to parse.

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?

Given the tool's complexity (simple read operation), no annotations, no output schema, and low schema coverage, the description is minimally adequate. It covers the basic purpose and usage but lacks details on behavioral aspects like permissions or response structure, which would enhance completeness for an agent.

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 1 parameter with 0% description coverage, so the description must compensate. It adds meaning by specifying that 'monitorId' is used to identify 'a specific Datadog monitor,' clarifying its purpose. However, it doesn't provide details on ID format, constraints, or examples, leaving gaps in parameter understanding.

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 states the tool's purpose: 'Get detailed information about a specific Datadog monitor by its ID.' It specifies the verb ('Get'), resource ('Datadog monitor'), and scope ('by its ID'). However, it doesn't explicitly differentiate from sibling tools like 'get-monitors' (plural), which might retrieve multiple monitors, leaving some ambiguity.

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

Usage Guidelines3/5

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

The description implies usage by stating 'Use this to retrieve... a single monitor,' suggesting it's for individual monitor details. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'get-monitors' or other sibling tools, nor does it mention prerequisites or exclusions, leaving the context somewhat implied.

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/GeLi2001/datadog-mcp-server'

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