Skip to main content
Glama

get-dashboards

Retrieve a list of all dashboards from Datadog to discover available dashboards and their IDs, enabling further exploration and monitoring.

Instructions

Retrieve a list of all dashboards from Datadog. Useful for discovering available dashboards and their IDs for further exploration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterConfiguredNo
limitNo

Implementation Reference

  • The main execution logic for the 'get-dashboards' tool: calls Datadog's DashboardsApi.listDashboards(), handles client-side limiting, and returns the dashboards list.
    execute: async (params: GetDashboardsParams) => { try { const { filterConfigured, limit } = params; const apiInstance = new v1.DashboardsApi(configuration); // No parameters needed for listDashboards const response = await apiInstance.listDashboards(); // Apply client-side filtering if specified let filteredDashboards = response.dashboards || []; // Apply client-side limit if specified if (limit && filteredDashboards.length > limit) { filteredDashboards = filteredDashboards.slice(0, limit); } return { ...response, dashboards: filteredDashboards }; } catch (error) { console.error("Error fetching dashboards:", error); throw error; } }
  • src/index.ts:119-132 (registration)
    MCP server registration of the 'get-dashboards' tool, including name, description, Zod input schema, and wrapper handler invoking getDashboards.execute().
    server.tool( "get-dashboards", "Retrieve a list of all dashboards from Datadog. Useful for discovering available dashboards and their IDs for further exploration.", { filterConfigured: z.boolean().optional(), limit: z.number().default(100) }, async (args) => { const result = await getDashboards.execute(args); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } );
  • TypeScript type definition for the tool's input parameters (matches the Zod schema in registration).
    type GetDashboardsParams = { filterConfigured?: boolean; limit?: number; };
  • Initialization function for setting up Datadog API client configuration with auth keys and site variable (called from index.ts).
    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 }); } },

Other Tools

Related 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