Skip to main content
Glama
brukhabtu

Datadog MCP Server

by brukhabtu

ListServiceDefinitions

Retrieve service definitions from the Datadog Service Catalog. Specify page size, number, and schema version to access structured data via API.

Instructions

Get a list of all service definitions from the Datadog Service Catalog.

Query Parameters:

  • page[size]: Size for a given page. The maximum allowed value is 100.

  • page[number]: Specific page number to return.

  • schema_version: The schema version desired in the response.

Responses:

  • 200 (Success): OK

    • Content-Type: application/json

    • Response Properties:

      • data: Data representing service definitions.

    • Example:

{
  "data": [
    "unknown_type"
  ]
}
  • 403: Forbidden

    • Content-Type: application/json

    • Response Properties:

      • errors: A list of errors.

    • Example:

{
  "errors": [
    "Bad Request"
  ]
}
  • 429: Too many requests

    • Content-Type: application/json

    • Response Properties:

      • errors: A list of errors.

    • Example:

{
  "errors": [
    "Bad Request"
  ]
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page[number]NoSpecific page number to return.
page[size]NoSize for a given page. The maximum allowed value is 100.
schema_versionNoSchema versions

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoData representing service definitions.

Implementation Reference

  • Registers the MCP tools from the filtered Datadog OpenAPI specification. The ListServiceDefinitions tool is generated from the 'listServiceDefinitions' operationId in the Datadog API spec for GET /api/v2/services/definitions, which is whitelisted by the route filters.
        openapi_spec=openapi_spec,
        client=auth_client,
        route_maps=route_maps,
    )
  • Defines security filters that whitelist the /api/v2/services.* endpoint (including /api/v2/services/definitions for ListServiceDefinitions) as read-only GET MCP tools, while excluding destructive methods and other unsafe endpoints.
    def _get_route_filters(self) -> list[RouteMap]:
        """Get route filtering rules for safe observability-focused tools.
    
        Security Model:
        1. DENY ALL destructive operations (POST, PUT, PATCH, DELETE)
        2. ALLOW ONLY specific read-only GET endpoints
        3. DEFAULT DENY everything else
    
        This whitelist approach ensures only safe, read-only operations
        are exposed through the MCP interface.
        """
        # Define safe read-only endpoints for observability workflows
        safe_endpoints = [
            # Metrics and time-series data
            r"^/api/v2/metrics.*",  # Query metrics data
            r"^/api/v2/query/.*",  # Time-series queries
            # Dashboards and visualizations
            r"^/api/v2/dashboards.*",  # Dashboard configurations
            r"^/api/v2/notebooks.*",  # Notebook data
            # Monitoring and alerts
            r"^/api/v2/monitors.*",  # Monitor configurations
            r"^/api/v2/downtime.*",  # Scheduled downtimes
            r"^/api/v2/synthetics.*",  # Synthetic tests
            # Logs and events
            r"^/api/v2/logs/events/search$",  # Search logs
            r"^/api/v2/logs/events$",  # List log events
            r"^/api/v2/logs/config.*",  # Log pipeline configs
            # APM and traces
            r"^/api/v2/apm/.*",  # APM data
            r"^/api/v2/traces/.*",  # Trace data
            r"^/api/v2/spans/.*",  # Span data
            # Infrastructure
            r"^/api/v2/hosts.*",  # Host information
            r"^/api/v2/tags.*",  # Tag management (read)
            r"^/api/v2/usage.*",  # Usage statistics
            # Service management
            r"^/api/v2/services.*",  # Service catalog
            r"^/api/v2/slos.*",  # Service level objectives
            r"^/api/v2/incidents.*",  # Incident management
            # Security and compliance
            r"^/api/v2/security_monitoring.*",  # Security signals
            r"^/api/v2/cloud_workload_security.*",  # CWS data
            # Teams and organization (read-only)
            r"^/api/v2/users.*",  # User information
            r"^/api/v2/roles.*",  # Role information
            r"^/api/v2/teams.*",  # Team structure
            # API metadata
            r"^/api/v2/api_keys$",  # List API keys (no create/delete)
            r"^/api/v2/application_keys$",  # List app keys (no create/delete)
        ]
    
        filters = [
            # SECURITY: Block ALL destructive operations first
            RouteMap(
                methods=["POST", "PUT", "PATCH", "DELETE"], mcp_type=MCPType.EXCLUDE
            ),
        ]
    
        # Add whitelisted read-only endpoints
        filters.extend(
            RouteMap(
                pattern=pattern,
                methods=["GET"],
                mcp_type=MCPType.TOOL,
            )
            for pattern in safe_endpoints
        )
    
        # SECURITY: Default deny everything else
        filters.append(RouteMap(pattern=r".*", mcp_type=MCPType.EXCLUDE))
    
        return filters
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool as a read operation ('Get a list'), implies pagination behavior through the query parameters, and includes HTTP response codes (200, 403, 429) with examples, which adds useful context. However, it doesn't explicitly state whether this is a safe read-only operation, mention rate limits beyond the 429 response, or detail error handling beyond the examples.

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

Conciseness3/5

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

The description is structured with clear sections (purpose, query parameters, responses), but it's overly verbose. The repeated parameter details and extensive HTTP response examples with JSON could be streamlined, as much of this information is redundant with the schema and output schema. The core purpose is stated upfront, but subsequent sections don't earn their place efficiently.

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 the tool's moderate complexity (a paginated list operation), 100% schema coverage, and the presence of an output schema (implied by the response examples), the description is reasonably complete. It covers the purpose, parameters, and response formats, though it lacks usage guidelines and some behavioral details like authentication requirements. The output schema information reduces the need for return value explanations in the description.

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 100% description coverage, providing clear documentation for all three parameters (page[size], page[number], schema_version) with defaults, examples, and enum values. The description repeats this parameter information verbatim in the 'Query Parameters' section, adding no additional semantic context beyond what the schema already provides. This meets the baseline for high schema coverage but doesn't enhance 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 action ('Get a list') and resource ('all service definitions from the Datadog Service Catalog'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from other list tools in the sibling set (like ListAPIKeys, ListUsers, etc.), which would require mentioning what makes service definitions unique.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication needs), typical use cases, or how it differs from other list operations in the sibling tools. The absence of any usage context leaves the agent without direction on appropriate invocation scenarios.

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

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

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