Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

Get Datadog Logs by Trace ID

dd_log_get
Read-only

Retrieve all Datadog logs associated with a specific trace_id. Use this when you have a trace_id from a log in dd_logs_search results and want the full distributed trace context (all services involved, timeline of spans/logs). Returns logs sorted by timestamp descending. Pair with dd_logs_search to first find the trace_id, then use this tool for deep trace investigation.

Input Schema

NameRequiredDescriptionDefault
toNoFin del rango. Default: now
fromNoInicio del rango (e.g.: now-1h, now-6h). Default: now-1h
traceIdYesEl trace_id (e.g.: "17402851653418008602") obtenido del campo attributes.attributes.dd.trace_id o dd.trace_id de un log de dd_logs_search
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -trueNew value: +false
    • changedOutput schema / properties / data / properties / logs / items / additionalProperties
      Previous value: -trueNew value: +{
      +  "type": [
      +    "string",
      +    "number",
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / data / properties / logs / items / properties
      Removed value: -{}
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 2,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false. The description adds useful behavior: it retrieves all logs for the trace and returns them sorted by timestamp descending, though it does not discuss pagination or limits.

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?

Front-loads the core action, then gives usage context and workflow in four short sentences. No sentence is redundant or misplaced.

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 annotations, a full schema, and an output schema, the description supplies what an agent needs: purpose, when to use it, trace_id source, return ordering, and sibling workflow. Nothing material is missing.

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?

Schema description coverage is 100%, so traceId, from, to, and context_id are already documented in the schema. The description reinforces trace_id sourcing from dd_logs_search but adds little beyond the schema's parameter definitions.

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?

States a specific verb and resource: retrieve Datadog logs associated with a specific trace_id. It clearly distinguishes the tool from dd_logs_search by describing the trace-investigation use case and workflow.

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 says to use it when you have a trace_id from dd_logs_search and want the full distributed trace context. It also states the pairing workflow: first find the trace_id with dd_logs_search, then use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources