{"_id":"@kajidog/mcp-datadog-logs","_rev":"5-bf8f3e4f5a7e5b41237e2118f28a8112","name":"@kajidog/mcp-datadog-logs","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@kajidog/mcp-datadog-logs","version":"0.1.0","keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"author":{"name":"kajidog"},"license":"MIT","_id":"@kajidog/mcp-datadog-logs@0.1.0","maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"bin":{"mcp-datadog-logs":"dist/index.js"},"dist":{"shasum":"a0a977f49636e277e000c3ee7dff7722920bf8b2","tarball":"https://registry.npmjs.org/@kajidog/mcp-datadog-logs/-/mcp-datadog-logs-0.1.0.tgz","fileCount":7,"integrity":"sha512-F5a5dzwgibNgzgA9C/5OQNZcXzE7+UD+UBF4mdbiv5SnBt4U0YTdSD7VC2CMoBt97v4ZetW34DGL5saK8nFR0Q==","signatures":[{"sig":"MEUCIHgQ7Xhu1yZ1gpXTtKjhxPagkc4exfqorQ6LWi6Pm8OhAiEAkXlsIfQYEhBUMxY8ot/dRGRkjwyiMAjtofdFjw3rUR0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1406247},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"e491db7adb714ab94c8defea179d2d13def628db","scripts":{"dev":"tsx src/index.ts","lint":"biome check .","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"kajidog","email":"info@kajidog.com"},"_npmVersion":"11.4.2","description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","directories":{},"_nodeVersion":"22.17.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.29.0","@datadog/datadog-api-client":"^1.60.0","@modelcontextprotocol/ext-apps":"^1.7.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.5.1","vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.10.1","@kajidog/investigator-ui":"workspace:*","@kajidog/investigation-shared":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/mcp-datadog-logs_0.1.0_1783460692349_0.7445188808997656","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@kajidog/mcp-datadog-logs","version":"0.1.1","keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"author":{"name":"kajidog"},"license":"MIT","_id":"@kajidog/mcp-datadog-logs@0.1.1","maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"bin":{"mcp-datadog-logs":"dist/index.js"},"dist":{"shasum":"67c95746e2c845c4953471601df74ea97d034324","tarball":"https://registry.npmjs.org/@kajidog/mcp-datadog-logs/-/mcp-datadog-logs-0.1.1.tgz","fileCount":7,"integrity":"sha512-Xj9p9IYed2ys0O3pWlFWaV2udytYbuFi63gPZuJHij6izhifYbvrpqJ1bt35mkXylKO8rPl+5A24b2NKLhoMEg==","signatures":[{"sig":"MEUCIQCGJ4eDEzEpB1puZpGj8sZRI1vHDYi/F9j0/Vh52hJM6wIgfL6QxoHRy5R+wodZD2k3ssHLiV1VQDaEawptCU/NTKU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1406485},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"a5a0d122f81cfb7deb322e10ad29254d68880795","scripts":{"dev":"tsx src/index.ts","lint":"biome check .","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"kajidog","email":"info@kajidog.com"},"_npmVersion":"11.4.2","description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","directories":{},"_nodeVersion":"22.17.0","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.29.0","@datadog/datadog-api-client":"^1.60.0","@modelcontextprotocol/ext-apps":"^1.7.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.5.1","vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.10.1","@kajidog/investigator-ui":"workspace:*","@kajidog/investigation-shared":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/mcp-datadog-logs_0.1.1_1783462411045_0.16123013380325246","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@kajidog/mcp-datadog-logs","version":"0.2.0","keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"author":{"name":"kajidog"},"license":"MIT","_id":"@kajidog/mcp-datadog-logs@0.2.0","maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"homepage":"https://github.com/kajidog/mcp-datadog-logs#readme","bugs":{"url":"https://github.com/kajidog/mcp-datadog-logs/issues"},"bin":{"mcp-datadog-logs":"dist/index.js"},"dist":{"shasum":"bb729ef3d8df563c3035e3ca943a0539d46ef4fa","tarball":"https://registry.npmjs.org/@kajidog/mcp-datadog-logs/-/mcp-datadog-logs-0.2.0.tgz","fileCount":92,"integrity":"sha512-OUTUc8jfcAVklbj8Sj64abeypCcdEfrM2vdpFxstH94gx5V6fntyhE2OAl8wADMtnkckquyQ3LIhNTuDyBqfyw==","signatures":[{"sig":"MEUCIQDjU6ZwS8Zbpuuq3p+zxLx57Ukd8tojR3XyLY9zqey2fQIgFpGZFTIrkDMCF7VkPrSq3pqUzSux51DGleKjxT2JV1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@kajidog%2fmcp-datadog-logs@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1517453},"main":"./dist/index.js","type":"module","_from":"file:kajidog-mcp-datadog-logs-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"scripts":{"dev":"tsx src/index.ts","lint":"biome check .","test":"vitest run","build":"tsup && tsc --emitDeclarationOnly --noEmit false","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ca55efa8-d006-4ffa-b976-b7946ff21e52"}},"_resolved":"/tmp/f43d84d5fd12f8623f64d3a004c59acb/kajidog-mcp-datadog-logs-0.2.0.tgz","_integrity":"sha512-OUTUc8jfcAVklbj8Sj64abeypCcdEfrM2vdpFxstH94gx5V6fntyhE2OAl8wADMtnkckquyQ3LIhNTuDyBqfyw==","repository":{"url":"git+https://github.com/kajidog/mcp-datadog-logs.git","type":"git"},"_npmVersion":"11.18.0","description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.4.3","unified":"^11.0.5","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","remark-breaks":"^4.0.0","remark-rehype":"^11.1.2","rehype-stringify":"^10.0.1","@modelcontextprotocol/sdk":"^1.29.0","@datadog/datadog-api-client":"^1.60.0","@modelcontextprotocol/ext-apps":"^1.7.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.5.1","vitest":"^3.2.4","typescript":"^7.0.2","@types/node":"^24.10.1","@kajidog/investigator-ui":"0.1.0","@kajidog/investigation-shared":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-datadog-logs_0.2.0_1783859870998_0.559488974186874","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@kajidog/mcp-datadog-logs","version":"0.2.1","keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"author":{"name":"kajidog"},"license":"MIT","_id":"@kajidog/mcp-datadog-logs@0.2.1","maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"homepage":"https://github.com/kajidog/mcp-datadog-logs#readme","bugs":{"url":"https://github.com/kajidog/mcp-datadog-logs/issues"},"bin":{"mcp-datadog-logs":"dist/index.js"},"dist":{"shasum":"2b0d7000a8a431cd484a7595d290006c77184783","tarball":"https://registry.npmjs.org/@kajidog/mcp-datadog-logs/-/mcp-datadog-logs-0.2.1.tgz","fileCount":92,"integrity":"sha512-GG78Ch+vPjEeVhKJJcNu0sQG1tYBQbW6bBe2jVh4HejhliZcLvUvhSCCYfaUvOZMjTGhEg7inAVZjN6pKh2VCA==","signatures":[{"sig":"MEUCICoSl9FDY5V3uzwmUmAIYBs28dJAo9QxUfKn6TLqXLUdAiEAqBApmZRW7+wQLgC1DjrrjZQLxSkHfuJX8EkuE4dAVts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@kajidog%2fmcp-datadog-logs@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1519935},"main":"./dist/index.js","type":"module","_from":"file:kajidog-mcp-datadog-logs-0.2.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"scripts":{"dev":"tsx src/index.ts","lint":"biome check .","test":"vitest run","build":"tsup && tsc --emitDeclarationOnly --noEmit false","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ca55efa8-d006-4ffa-b976-b7946ff21e52"}},"_resolved":"/tmp/a5453d27cc0fa229ec307dbb155b4ee6/kajidog-mcp-datadog-logs-0.2.1.tgz","_integrity":"sha512-GG78Ch+vPjEeVhKJJcNu0sQG1tYBQbW6bBe2jVh4HejhliZcLvUvhSCCYfaUvOZMjTGhEg7inAVZjN6pKh2VCA==","repository":{"url":"git+https://github.com/kajidog/mcp-datadog-logs.git","type":"git"},"_npmVersion":"11.18.0","description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.4.3","unified":"^11.0.5","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","remark-breaks":"^4.0.0","remark-rehype":"^11.1.2","rehype-stringify":"^10.0.1","@modelcontextprotocol/sdk":"^1.29.0","@datadog/datadog-api-client":"^1.60.0","@modelcontextprotocol/ext-apps":"^1.7.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.5.1","vitest":"^3.2.4","typescript":"^7.0.2","@types/node":"^24.10.1","@kajidog/investigator-ui":"0.1.0","@kajidog/investigation-shared":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-datadog-logs_0.2.1_1783862822816_0.9058405763420008","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@kajidog/mcp-datadog-logs","version":"0.3.0","description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","type":"module","license":"MIT","author":{"name":"kajidog"},"repository":{"type":"git","url":"git+https://github.com/kajidog/mcp-datadog-logs.git"},"keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"bin":{"mcp-datadog-logs":"dist/index.js"},"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"engines":{"node":">=20.0.0"},"dependencies":{"@datadog/datadog-api-client":"^1.60.0","@modelcontextprotocol/ext-apps":"^1.7.4","@modelcontextprotocol/sdk":"^1.29.0","rehype-stringify":"^10.0.1","remark-breaks":"^4.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","unified":"^11.0.5","zod":"^4.4.3"},"devDependencies":{"@types/node":"^24.10.1","tsup":"^8.5.1","tsx":"^4.20.6","typescript":"^7.0.2","vitest":"^3.2.4","@kajidog/investigation-shared":"0.0.0","@kajidog/investigator-ui":"0.1.0"},"scripts":{"build":"tsup && tsc --emitDeclarationOnly --noEmit false","dev":"tsx src/index.ts","typecheck":"tsc --noEmit","test":"vitest run","lint":"biome check ."},"_id":"@kajidog/mcp-datadog-logs@0.3.0","bugs":{"url":"https://github.com/kajidog/mcp-datadog-logs/issues"},"homepage":"https://github.com/kajidog/mcp-datadog-logs#readme","_integrity":"sha512-PJsQV008sxZOCMX01c1P7YLaKQENOkSECsiiovl06dy+CFikoN0JLnv6VReAguC1+ofN360GW7HLo17yBulSVA==","_resolved":"/tmp/93d67d5188afc9b4cb7ad55ad8881219/kajidog-mcp-datadog-logs-0.3.0.tgz","_from":"file:kajidog-mcp-datadog-logs-0.3.0.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-PJsQV008sxZOCMX01c1P7YLaKQENOkSECsiiovl06dy+CFikoN0JLnv6VReAguC1+ofN360GW7HLo17yBulSVA==","shasum":"07d7d9f4955c8dbf07efb643d7ce0e9a44ec55c8","tarball":"https://registry.npmjs.org/@kajidog/mcp-datadog-logs/-/mcp-datadog-logs-0.3.0.tgz","fileCount":114,"unpackedSize":1721881,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@kajidog%2fmcp-datadog-logs@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAMD8VuFvkicGxoUZGPu6AHynVbzWOosEjpeRsZFc2xeAiEAniwq/bo5wlOCfZgHJmAi+o9qAY/xL2KBWrmEXUZNOAQ="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ca55efa8-d006-4ffa-b976-b7946ff21e52"}},"directories":{},"maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-datadog-logs_0.3.0_1784048512783_0.041621853415863885"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T21:44:52.157Z","modified":"2026-07-14T17:01:53.409Z","0.1.0":"2026-07-07T21:44:52.524Z","0.1.1":"2026-07-07T22:13:31.199Z","0.2.0":"2026-07-12T12:37:51.197Z","0.2.1":"2026-07-12T13:27:02.991Z","0.3.0":"2026-07-14T17:01:53.079Z"},"bugs":{"url":"https://github.com/kajidog/mcp-datadog-logs/issues"},"author":{"name":"kajidog"},"license":"MIT","homepage":"https://github.com/kajidog/mcp-datadog-logs#readme","keywords":["mcp","modelcontextprotocol","datadog","logs","mcp-apps"],"repository":{"type":"git","url":"git+https://github.com/kajidog/mcp-datadog-logs.git"},"description":"MCP server for investigating Datadog logs with an interactive MCP Apps UI and shareable HTML reports","maintainers":[{"name":"kajidog","email":"info@kajidog.com"}],"readme":"# @kajidog/mcp-datadog-logs\n\nMCP server for investigating **Datadog logs** with AI — including an interactive\n**MCP Apps UI** (timeline chart, facet breakdowns, log table) rendered directly in\nMCP Apps-capable hosts such as Claude, and one-click export to a **self-contained\nHTML report** you can share with your team (print it to PDF from the browser if\nneeded).\n\n## Features\n\n- 🔎 `datadog_search_logs` — quick log search for the model (compact text output)\n- 📊 `datadog_aggregate_logs` — counts by facet or timeseries for the model\n- 📈 `datadog_query_metrics` — metric timeseries for the model (classic query\n  syntax, per-series stats + downsampled values as compact text)\n- 🕵️ `datadog_run_investigation` — headless investigation for the model:\n  - full result (log rows, timeline, facets) stored server-side under a `viewUUID`\n  - the model receives only a compact summary — iterate without bloating context\n  - pass the `viewUUID` to `datadog_investigate_logs` to display it, with optional\n    Markdown `findings` rendered in the UI and the HTML report\n- 🔗 cross-source investigation — the investigation tools also fetch Datadog\n  **events** (deploys, alerts) in the same window and optional **metrics**\n  (`metricsQueries`), overlay them on the timeline (UI + HTML report), and\n  surface **trace candidates** extracted from the fetched rows so the model can\n  pivot straight into `datadog_get_trace`; missing `events_read` /\n  `timeseries_query` scopes degrade gracefully instead of failing the run\n- 🔬 `datadog_get_session_logs` — drill into a stored session with **zero extra\n  Datadog API calls**: filter the stored rows by status / service / message\n  pattern `#N` / substring, or fetch one full raw log by `row=[N]` index or\n  `logId` (with `fields` to select attribute paths on large logs)\n- 📄 `datadog_export_report` — export directly from the model:\n  - pass a `viewUUID` to write the self-contained HTML report to disk without opening the UI\n  - `format: 'csv' | 'json'` writes the fetched log rows as data instead\n- 🧩 automatic message pattern analysis — fetched rows are clustered into\n  templates (`Payment failed for order <*>`), surfaced in tool summaries, the UI\n  and HTML reports\n- 🖥️ `datadog_investigate_logs` — opens the interactive investigation UI:\n  - stacked timeline chart of log volume by status, with deploy/alert event markers\n  - event list (click an event to filter logs to its time bucket) and a metrics panel\n  - facet sidebar (service / status / host / custom `groupBy`) — click to filter\n  - message pattern panel — fetched rows clustered into templates, click to filter\n  - log table with expandable full-JSON detail, copyable `trace_id` chips, keyword highlighting and load-more pagination\n  - adjust query & time range and re-run right from the UI\n  - **Export** button → self-contained HTML report, plus CSV/JSON export of the filtered rows\n- stdio transport; investigation sessions are cached in memory and mirrored to\n  a local cache directory so a `viewUUID` survives server restarts\n\n## Setup\n\nRequires Node.js >= 20 and a Datadog API key + application key\n(the application key needs the `logs_read_data` scope; add `apm_read` for\n`datadog_get_trace`, `events_read` for `datadog_search_events`, and\n`timeseries_query` for `datadog_query_metrics`).\n\n### Claude Code\n\n```bash\nclaude mcp add datadog-logs \\\n  -e DD_API_KEY=<your-api-key> \\\n  -e DD_APP_KEY=<your-app-key> \\\n  -e DD_SITE=ap1.datadoghq.com \\\n  -- npx -y @kajidog/mcp-datadog-logs\n```\n\n### Claude Desktop (claude_desktop_config.json)\n\n```json\n{\n  \"mcpServers\": {\n    \"datadog-logs\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@kajidog/mcp-datadog-logs\"],\n      \"env\": {\n        \"DD_API_KEY\": \"<your-api-key>\",\n        \"DD_APP_KEY\": \"<your-app-key>\",\n        \"DD_SITE\": \"ap1.datadoghq.com\"\n      }\n    }\n  }\n}\n```\n\nThen ask: *\"Investigate error logs for the payments service in the last 4 hours\"*.\n\n### MCP Inspector\n\n```bash\nDD_SITE=ap1.datadoghq.com \\\nDD_API_KEY=<your-api-key> \\\nDD_APP_KEY=<your-app-key> \\\nnpx @modelcontextprotocol/inspector node apps/mcp-datadog-logs/dist/index.js\n```\n\nUse the same `DD_SITE` as the Datadog org where the API key and application key\nwere created. Japan is `ap1.datadoghq.com`; US1 is `datadoghq.com`.\n\n## Environment variables\n\n| Variable | Required | Default | Description |\n|---|---|---|---|\n| `DD_API_KEY` | ✅ | — | Datadog API key |\n| `DD_APP_KEY` | ✅ | — | Datadog application key from the same org/site as `DD_API_KEY` (`logs_read_data` scope; `apm_read` / `events_read` for the trace and events tools) |\n| `DD_SITE` | | `datadoghq.com` | Datadog site, e.g. `ap1.datadoghq.com`, `datadoghq.eu`, `us5.datadoghq.com` |\n| `DD_LOGS_INDEXES` | | all | Comma-separated log indexes to search |\n| `MCP_DATADOG_EXPORT_DIR` | | `~/Downloads` (or cwd) | Where exported reports / data files are written |\n| `MCP_DATADOG_MAX_ROWS` | | `200` | Max log rows per investigation (hard cap 500) |\n| `MCP_DATADOG_TIMEZONE` | | `UTC` | IANA time zone (e.g. `Asia/Tokyo`) for timestamps in exported HTML reports; invalid values fall back to UTC |\n| `MCP_DATADOG_SESSION_DIR` | | `~/.cache/mcp-datadog-logs/sessions` | Where investigation sessions are persisted across restarts (pruned beyond 50 files / 7 days) |\n| `MCP_DATADOG_PERSIST_SESSIONS` | | `true` | Set `false` to keep sessions in memory only |\n\nRequired Datadog permissions are documented in\n[`docs/datadog-permissions.md`](../../docs/datadog-permissions.md).\n\n## Tools\n\n| Tool | Audience | Description |\n|---|---|---|\n| `datadog_search_logs` | model | Search logs, compact text lines + pagination cursor. `dedupe: true` clusters the fetched page into message patterns (one line per pattern) |\n| `datadog_aggregate_logs` | model | Count by facet (`groupBy`), or as a timeseries when `interval` is set (per-facet counts per bucket) |\n| `datadog_get_trace` | model | Render one APM trace as a parent/child span tree. Runs of identical leaf siblings collapse into one `xN` line (`collapse: false` to disable); `errors_only` renders just error spans + their ancestors; `max_spans` caps the output |\n| `datadog_search_events` | model | Search Datadog events (deployments, monitor alerts, config changes) as a compact timeline; `max_tags: 0` hides tags |\n| `datadog_query_metrics` | model | Query metric timeseries with the classic syntax (`avg:system.cpu.user{service:web} by {host}`); per-series stats + downsampled values, `max_series` caps group-by fan-out |\n| `datadog_run_investigation` | model | Headless investigation stored in a server-side session; returns a compact summary + `viewUUID`. Iterate on the same `viewUUID`, load more rows with `cursor`, attach `findings`. Also fetches events in the window (`includeEvents` / `eventsQuery`) and metrics (`metricsQueries`), and lists trace candidates extracted from the fetched rows |\n| `datadog_get_session_logs` | model | Read rows already stored under a `viewUUID` — no Datadog API call. List mode filters by `status` / `service` / `pattern` (the summary's `#N`) / `contains` with `offset`/`limit`; detail mode (`row` or `logId`) returns one full raw log, with `fields` to select attribute paths |\n| `datadog_export_report` | model | Write a `viewUUID` session to `MCP_DATADOG_EXPORT_DIR` as a self-contained HTML report, or as CSV/JSON of the fetched rows (`format`) — no UI needed |\n| `datadog_investigate_logs` | model → UI | Run a full investigation and open the interactive UI. Pass a `viewUUID` from `datadog_run_investigation` to display that session without re-fetching |\n| `_get_view_state` / `_run_investigation` / `_get_log_detail` / `_export_report` | UI only | Internal bridge tools called by the app (hidden from the model) |\n\n`from`/`to` accept Datadog time math (`now-4h`, `now`) or ISO 8601. Absolute\ntimestamps must include an explicit time zone (`Z` or an offset like `+09:00`);\nvalues without one (e.g. `2026-07-12T10:00:00`) are rejected as ambiguous.\n\n`datadog_run_investigation` summaries number message patterns (`#1`…) and\nprefix sample rows with their stored index (`[N]`); both are stable handles for\n`datadog_get_session_logs` (`pattern: 1`, `row: N`). Indexes stay valid across\n`cursor` load-more but reset when the same `viewUUID` is re-run with a new\nquery.\n\n## Exported reports\n\n`Export` in the UI — or the `datadog_export_report` tool, when you ask the model\nto export a report directly — writes a single `.html` file (inline CSS + SVG\nchart, no external requests) to `MCP_DATADOG_EXPORT_DIR` and asks the OS to open\nit in the default browser. If the server is running in a headless or remote\nenvironment, the file is still written and the saved path is reported. Use the\nbrowser's *Print → Save as PDF* for a PDF copy.\n\nReport timestamps are rendered in `MCP_DATADOG_TIMEZONE` (default UTC).\n\n## Rate limits\n\nDatadog APIs can return `429 Too Many Requests` when an endpoint's rate limit is\nexceeded. This server enables the Datadog SDK retry behavior for 429/5xx\nresponses and runs the multi-request investigation pipeline sequentially to avoid\nrequest bursts.\n\nIf 429 still occurs, wait for the Datadog rate-limit window to reset and retry\nwith a narrower time range or fewer repeated UI refreshes.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}