Question-led guide · governance
Which diagnostic tools should an SRE agent be allowed to call?
A least-privilege method for selecting SRE diagnostic tools by data scope, query cost, credential reach, side effects, and incident value.
Direct answer
Allow only diagnostic tools whose data scope, query limits, credentials, output handling, and side effects are explicit. Start with typed, read-only queries over bounded services and time windows; add broader or expensive tools through separate policy tiers. A tool description is not authorization: enforce identity, resource scope, rate limits, redaction, audit, and human approval outside the model.
Scope
Use this method when an SRE platform team exposes logs, traces, metrics, topology, deployment history, configuration, feature flags, database diagnostics, or cloud APIs to an incident agent. The aim is a useful diagnostic surface with enforceable bounds. Remediation tools belong in a higher, separately reviewed authority tier.
Why it happens
Teams often build an allowlist from tool names: search_logs looks safe, restart_service looks dangerous. Names hide the real boundary. A log query may span every tenant, reveal secrets, or scan petabytes. A database “explain” call may be safe on one engine and execute work on another. A topology endpoint may disclose security-sensitive architecture.
The model also sees tool descriptions as instructions. A compromised server or ambiguous schema can steer it toward broader queries. Permission must therefore be enforced by infrastructure using verified identity, resource scope, parameter validation, and result policy.
Diagnosis
Inventory each tool as an operation, not a label. Record:
- Target systems and tenants reachable from the tool.
- Credential type, lifetime, audience, and delegation chain.
- Parameters that control time, resource, row count, aggregation, and content fields.
- Worst-case backend cost and concurrency under retries.
- Direct, indirect, or hidden side effects.
- Sensitive fields and untrusted content in results.
- Audit events emitted before and after invocation.
Test failure cases. Send an unbounded time range, unknown tenant, wildcard resource, oversized result, repeated call, and malicious text inside a result. A permission system that relies on the agent declining these inputs is incomplete.
Solution
Create tiers. Tier 0 can inspect public runbooks and service metadata. Tier 1 can run bounded aggregate queries. Tier 2 can retrieve request-level details under incident-scoped approval. Tier 3 covers invasive diagnostics or any operation with meaningful side effects and normally requires a human.
Publish narrow schemas such as compare_error_rate(service_ids, start, end, cohort) instead of generic shell, SQL, or query-language access. Enforce maximum windows, mandatory resource IDs, result caps, redaction, rate limits, and cost budgets at the gateway. Verify authorization again at the target service.
Separate tool discovery from invocation. An agent may know that a privileged diagnostic exists without possessing authority to call it. A human-approved escalation can issue a short-lived, audience-bound grant rather than changing the global prompt.
Artifact
Maintain one row per tool and permission tier:
| Field | Required decision |
|---|---|
| Diagnostic purpose | Which incident question can this tool answer? |
| Resource scope | Exact tenants, services, regions, environments, and time range |
| Identity | Workload, delegated actor, token audience, lifetime, and owner |
| Parameter guardrails | Required IDs, maximum window, filters, result and concurrency caps |
| Data class | Public, internal, confidential, regulated, or secret-bearing |
| Result treatment | Redaction, untrusted-content marking, storage, and retention |
| Cost/load | Backend budget, timeout, retry rule, and circuit breaker |
| Side effects | None, operational load, stateful diagnostic, or production mutation |
| Approval tier | Automatic, incident-scoped, or per-call human confirmation |
| Audit proof | Request, policy decision, parameters, target response, and denial reason |
Common mistakes
- Giving the agent raw shell, SQL, or cloud-console access for convenience.
- Assuming a tool is safe because its JSON schema calls it read-only.
- Applying authorization at the model-facing gateway but not the target service.
- Returning entire logs when an aggregate or filtered evidence record answers the question.
- Letting retries multiply an already expensive or overloaded diagnostic query.
Evidence
A tool protocol describes schemas and interaction behavior, while the host remains responsible for security controls and user authorization.
The MCP tools specification defines tool discovery and invocation and includes security considerations for validation, access controls, confirmation, and result handling.
Primary source · standard · checked Aug 26, 2026
Limit: Protocol conformance does not prove a server is trustworthy, make a declared tool read-only, or enforce an organization's incident policy.
Access decisions should be resource-focused, dynamically enforced, and constrained to the minimum privileges needed.
NIST SP 800-207 describes zero-trust principles including per-session access decisions, dynamic policy, resource protection, and least privilege.
Primary source · standard · checked Aug 26, 2026
Limit: The publication is an architectural model, not an agent-specific tool allowlist or a substitute for a local threat model.
Diagnostic-tool approval should combine incident value with data, cost, side-effect, and credential risk.
The permission matrix below separates discovery, invocation, and usable result scope for each tool.
Signal Studio author framework · reviewed Aug 26, 2026
Limit: Risk tiers and query budgets require service-owner, security, privacy, and observability-platform review.
Limitations
This guide does not enumerate every observability product or establish legal access rights. Some queries that appear read-only can create load or expose regulated data, and tool metadata itself can be compromised. Validate behavior at the gateway and target, not only in the prompt.
FAQ
- Are read-only tools always safe?
- No. A read can expose sensitive data, enumerate infrastructure, consume expensive backend capacity, trigger lazy computation, or return content that attacks the agent. Read-only is one property, not a risk tier.
- Should the agent receive one shared observability token?
- Avoid broad shared credentials. Prefer short-lived identity bound to the task, tenant, resources, permitted operations, and incident window, with enforcement at the gateway and target service.
Related guides
Continue within AI agents for SRE and root cause analysis, or use one of these adjacent diagnostics:
Editorial QA: automated native-English, structure, source-presence, and link checks completed . This record is not an independent expert endorsement. Review boundary.
