Skip to main content
Glama

get-dashboard

Retrieve complete Datadog dashboard definitions including widgets, layout, and configuration details by specifying the dashboard ID.

Instructions

Get the complete definition of a specific Datadog dashboard by its ID. Returns all widgets, layout, and configuration details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYes

Implementation Reference

  • The execute function implementing the core logic to fetch a specific Datadog dashboard by ID using the Datadog API client.
    execute: async (params: GetDashboardParams) => {
      try {
        const { dashboardId } = params;
    
        const apiInstance = new v1.DashboardsApi(configuration);
    
        const apiParams: v1.DashboardsApiGetDashboardRequest = {
          dashboardId: dashboardId
        };
    
        const response = await apiInstance.getDashboard(apiParams);
        return response;
      } catch (error) {
        console.error(`Error fetching dashboard ${params.dashboardId}:`, error);
        throw error;
      }
    }
  • src/index.ts:134-146 (registration)
    Registers the 'get-dashboard' tool with the MCP server, including description, Zod input schema, and wrapper that calls the handler's execute method.
    server.tool(
      "get-dashboard",
      "Get the complete definition of a specific Datadog dashboard by its ID. Returns all widgets, layout, and configuration details.",
      {
        dashboardId: z.string()
      },
      async (args) => {
        const result = await getDashboard.execute(args);
        return {
          content: [{ type: "text", text: JSON.stringify(result) }]
        };
      }
    );
  • Zod schema defining the input parameters for the tool: dashboardId as a required string.
    {
      dashboardId: z.string()
    },
  • TypeScript type definition for the input parameters used in the handler.
    type GetDashboardParams = {
      dashboardId: string;
    };
  • Initialization function that sets up the Datadog API client configuration with API keys and site.
    initialize: () => {
      const configOpts = {
        authMethods: {
          apiKeyAuth: process.env.DD_API_KEY,
          appKeyAuth: process.env.DD_APP_KEY
        }
      };
    
      configuration = client.createConfiguration(configOpts);
    
      if (process.env.DD_SITE) {
        configuration.setServerVariables({
          site: process.env.DD_SITE
        });
      }
    },
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that the tool returns 'all widgets, layout, and configuration details,' which adds useful context about output scope. However, it lacks details on error handling, authentication needs, rate limits, or whether it's a read-only operation (though implied by 'Get').

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 two concise sentences that are front-loaded with the core purpose and efficiently detail the return value. Every word earns its place with no redundancy or fluff.

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?

Given 1 parameter, no annotations, and no output schema, the description adequately covers the tool's purpose and output scope. It could improve by addressing error cases or authentication, but for a simple retrieval tool, it provides sufficient context for basic use.

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?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It explains that 'dashboardId' identifies 'a specific Datadog dashboard,' adding meaningful context beyond the schema's type definition. However, it doesn't specify format or sourcing details for the ID.

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 specific action ('Get the complete definition'), resource ('a specific Datadog dashboard'), and key identifier ('by its ID'). It distinguishes from sibling tools like 'get-dashboards' (plural) by specifying retrieval of a single dashboard's full details.

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 when needing a dashboard's full definition by ID, but provides no explicit guidance on when to use this versus alternatives like 'get-dashboards' (which likely lists dashboards) or other sibling tools. No exclusions or prerequisites are mentioned.

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