TL;DR: Datadog's MCP demo showed that agents complete observability investigations faster with SQL than with freeform tool chains, because structured queries reduce context-window bloat and keep aggregation at the data layer, according to WorkOS. The broader lesson is that AI agent interfaces need precision and scoping, not just more tool access.
Editorial analysis by NHI Mgmt Group, based on content published by WorkOS: “Datadog: SQL Is the New Bash for AI Agents”.
Key questions
Q: How should teams design MCP interfaces for AI agents that need data access?
A: Design around narrow, declarative interfaces that return completed answers rather than raw fragments.
Q: Why do freeform tool chains create more risk for AI agents than SQL queries?
A: Freeform chains force the agent to guess syntax, manage intermediate state, and stitch together results across multiple calls.
Q: What are the signs that an agent interface is too loosely scoped?
A: Look for repeated tool calls, growing prompt length, fragile parsing steps, and agents that need several hops to answer a simple analytical question.
Practitioner guidance
- Constrain agent access to declarative query surfaces Expose SQL or similarly structured interfaces for high-volume data tasks instead of giving agents open-ended procedural tools that require step-by-step improvisation.
- Separate retrieval from reasoning Keep aggregation, filtering, and counting in the system of record so the agent receives finished results rather than raw data fragments it must reconstruct.
- Review agent tool scopes for query breadth Limit the fields, tables, and dimensions an agent can request so the interface does not allow broad or ambiguous data discovery by default.
Bottom line: Structured queries make AI agent investigations more predictable because the execution engine handles filtering and aggregation instead of the model improvising each step.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Declarative interfaces are becoming the governance boundary for agentic workflows. The article shows that SQL is not just faster, it is more governable because it constrains what the agent can express at runtime. That matters for identity programmes because the control point shifts from multi-call execution to a single, reviewable request. Practitioners should treat the query surface as part of the trust boundary.
A few things that frame the scale:
- Gartner predicts that by the end of 2026, 40% of enterprise apps will feature task-specific AI agents.
A question worth separating out:
Q: What is the difference between giving an agent access to data and giving it query authority?
A: Data access means the agent can reach a system or dataset. Query authority means it can shape what it asks for, which can be much broader or narrower than the underlying credential suggests. Good governance controls both, because a well-authenticated agent can still overreach through overly expressive queries.
👉 Read our full editorial: SQL for MCP agents: why structured queries beat freeform tools