DET-208 · agent · confidence High
Oversized or Sensitive Tool Arguments
Inspect agent tool-call arguments for size and sensitive content that the tool should not need.
Agents leak data through the parameters they pass to tools. Logging each tool call through a gateway or proxy, and checking argument size and content against what the tool's schema needs, catches exfiltration that looks like normal use.
Keep a per-tool baseline of argument size and fields used. Optional fields that are never filled in normal use and suddenly carry large text are a strong sign of a poisoned tool asking for more than it needs. Redact secrets in stored logs, but keep a hash so matches can be proven later.
- Data sources
- MCP gateway or proxy logsAgent tool-call traces
- Platforms
- AI Platform
Logic
SELECT run_id, server, tool, length(args_json) AS bytes
FROM tool_calls
WHERE length(args_json) > 4 * (SELECT percentile_cont(0.99) WITHIN GROUP (ORDER BY length(args_json)) FROM tool_calls t2 WHERE t2.tool = tool_calls.tool)
OR args_json ~ '(AKIA[0-9A-Z]{16}|-----BEGIN [A-Z ]*PRIVATE KEY|ghp_[A-Za-z0-9]{36}|\b\d{3}-\d{2}-\d{4}\b)'False positives
Tools that take documents as input by design, such as summarizers or file writers.