Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/techskies11/datadog-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/techskies11/datadog-mcp/fastmcp-best-practices)<a href="https://agentmods.dev/rules/techskies11/datadog-mcp/fastmcp-best-practices"><img src="https://agentmods.dev/badge/rules/techskies11/datadog-mcp/fastmcp-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/techskies11/datadog-mcp/fastmcp-best-practices"><img src="https://agentmods.dev/badge/rules/techskies11/datadog-mcp/fastmcp-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02710 |
| Opus 5 | $0.00000 | $0.01355 |
| Sonnet 5 | $0.00000 | $0.00542 |
| Haiku 4.5 | $0.00000 | $0.00271 |
Grade A, and why
fastmcp-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastMCP Best Practices
Best practices for this FastMCP-based server. See mcp-architecture.mdc for
where code lives and pydantic-models.mdc for response model conventions -
this file covers FastMCP-specific decorator/documentation/annotation
behavior.
Tool Design Principles
Be Selective with Tools
# ❌ BAD - one narrow tool per lookup key
@mcp.tool()
def get_monitor_by_id(monitor_id: int) -> MonitorResponse: ...
@mcp.tool()
def get_monitor_by_name(name: str) -> MonitorResponse: ...
# ✅ GOOD - one well-designed tool with optional filters
@mcp.tool(annotations=READ_ONLY)
def list_all_monitors(
group_states: str | None = None,
name: str | None = None,
tags: str | None = None,
) -> ListMonitorsResponse:
"""List monitors with optional filters.
Args:
group_states: Comma-separated states to filter by (e.g. "alert,warn")
name: Filter by monitor name substring
tags: Filter by tag query (e.g. "env:prod")
"""
...
Why: LLMs perform better with fewer, well-designed tools than many narrow
ones. This server currently exposes 30 tools across 7 domains - treat that as
close to the practical ceiling, not a floor; a new tool should consolidate
related endpoints (see describe_metric, which merges metric metadata + tags
into one call) rather than adding a thin wrapper per Datadog endpoint.
Tool Annotations Are Not Optional
Every @mcp.tool in this codebase passes annotations= from
utils/annotations.py. Pick the preset honestly - don't default to
READ_ONLY for convenience, and don't mark an overwrite as non-destructive
just because nothing is "deleted" in the HTTP sense:
from datadog_mcp.utils.annotations import READ_ONLY, WRITE_ADDITIVE, WRITE_OVERWRITE, STATE_TOGGLE
@mcp.tool(annotations=READ_ONLY) # search/list/get/count/aggregate/validate
def search_logs(...) -> SearchLogsResponse: ...
@mcp.tool(annotations=WRITE_ADDITIVE) # creates a new resource, not idempotent
def create_alert_monitor(...) -> CreateMonitorResponse: ...
@mcp.tool(annotations=WRITE_OVERWRITE) # overwrites existing state, no undo tool exists
def update_existing_dashboard(...) -> UpdateDashboardResponse: ...
@mcp.tool(annotations=STATE_TOGGLE) # reversible, has a matching inverse tool
def silence_monitor(...) -> MuteMonitorResponse: ...
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 276 lines · 0 tokens per session scan A 5f9c6aca746a
fastmcp-best-practices is a cursor rule published in the GitHub repository techskies11/datadog-mcp (0 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,710 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
python
Python best practices and patterns for modern software development with Flask and SQLite.
api-property-optionality-hygiene
Fix ApiProperty/ApiPropertyOptional optionality mismatches in DTO files; use for scheduled batch fixes or DTO edits.
django
Definitive guidelines for writing maintainable, performant, and secure Django applications, emphasizing modern best practices, clear code organization, and efficient patterns.
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
shared-libraries
Shared libraries - condition framework, inventory containers, file-backed DB, itinerary, references.
env-validation-gate
Env validation gate — every app with ≥1 required env var validates its contract at boot via Zod; raw process.env is banned outside the env module. Full pattern in .claude/skills/t2000-env-gate/.