Manuscript Offprint

arXiv:2608.24957

ToolMinimize: Auditing and Rewriting LLM Agent Tool Calls to Minimize Privacy Exposure

Wenbiao Li, Yuqiao Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Wenbiao Li

Case Western Reserve University

Cleveland, OH, USA

wxl387@case.edu

Yuqiao Xu

Case Western Reserve University

Cleveland, OH, USA

yxx914@case.edu

Abstract—LLM agents routinely include privacy-sensitive data (PSD) in tool call arguments beyond what the invoked tools require, crossing trust boundaries to third-party services on every invocation. A controlled measurement on three production LLMs (GPT-4o, Claude 3.5 Sonnet, Llama-3.3-70B) shows that 81–88% of tool calls include unnecessary PSD under default prompts; explicit privacy instructions still leave 36–76% over-sharing. Existing defenses gate calls (allow/block) or label flows (information-flow control) but cannot rewrite argument values, and PII detection tools miss implicit PSD like “Memorial Sloan Kettering” (a hospital name that implies a diagnosis). We present TOOLMINIMIZE, a middleware that intercepts tool calls and rewrites their arguments to the minimum data necessary for tool functionality, combining schema-aware necessity analysis with four operations: removal, generalization, substitution, and truncation. Live validation on 307 tool calls across the three LLMs above reduces privacy cost by 81.2–92.0% at 100% argument-level task validity (TOST equivalence p<0.001p<0.001 at Δ=1.0\Delta=1.0); on 25 unannotated Model Context Protocol (MCP) schemas, by 79.0% with no minimum_necessary metadata. An optional LLM content-necessity layer strips task-irrelevant PSD from otherwise-necessary free-text fields, raising live-LLM reduction to 85.1–95.6% and author-schema reduction from 71.1% to 90.9%. Median latency is 1.77 ms.

Index Terms—privacy, LLM agents, tool use, data minimization, middleware, MCP

I. INTRODUCTION

Consider a user who asks their LLM-powered assistant: "What will the weather be like near my oncologist at Memorial Sloan Kettering next Thursday?" The agent calls a weather API with location: "Memorial Sloan Kettering Cancer Center, 1275 York Avenue, New York, NY 10065". The weather service needs only a city-level location and a date; instead it receives the name of a cancer treatment center, revealing the user's likely health condition to a third-party operator. This pattern is pervasive. An agent scheduling a meeting creates a calendar event titled "Chemotherapy Session – Dr. Patel, Oncology," leaking a diagnosis to a calendar service. An agent helping locate a support group searches for "Alcoholics Anonymous meeting near 742 Evergreen Terrace, Springfield," exposing both addiction status and home address. In each case, the tool functions correctly with far less data. The agent over-shares because it optimizes for task completion, not privacy.

We call this tool call over-sharing: the systematic inclusion of privacy-sensitive data (PSD) in tool call arguments beyond what tools require. The phenomenon is empirical, not theoretical. Across 20 everyday tasks on three production LLMs (GPT-4o, Claude 3.5 Sonnet, Llama-3.3-70B), 81–88% of tool calls contain unnecessary PSD under default system prompts (Section II); explicit privacy instructions cut this only to 36–76%, and Llama barely responds to them at all (81%→76%). Over-sharing crosses trust boundaries to third-party services with every invocation, is invisible to users, and is uncontrolled by existing frameworks. Every agent with tool-use capability [1], [2] is affected, and exposure scales linearly with the number of tool calls per task.

a) Why existing defenses are not enough.: Allow/block gating, whether call-level (AudAgent [3], PrivacyChecker [4]) or argument-level (Progent [5], which uses JSON Schema but still emits allow/block with fallback actions), cannot rewrite argument values: a weather query with “Memorial Sloan Kettering” either proceeds and leaks the facility or is refused, losing the task. Information flow control (Fides [6], RTBAS [7], CaMeL [8]) tracks confidentiality–integrity labels at flow granularity with capability-based allow/deny; it does not perform graduated rewriting of individual fields, and its label lattices are not designed for PSD sensitivity stratification. PII detection tools (Presidio, AWS Comprehend) are token-level pattern matchers that miss implicit PSD (“Memorial Sloan Kettering” is not a PII pattern but implies cancer) and are schema-unaware. No existing system performs schema-aware, argument-level data minimization by rewriting tool

Accepted for publication in the Proceedings of the 23rd Annual International Conference on Privacy, Security and Trust (PST 2026), University of Ottawa, Ottawa, Canada, August 26–28, 2026. This is the authors' accepted version; the final published version will appear in IEEE Xplore (DOI to be added upon publication).

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

©2026 IEEE call fields while preserving task validity, and none define a quantitative privacy cost metric for tool call exposure.

b) Contributions.: We present TOOLMINIMIZE, a middleware that intercepts LLM agent tool calls before execution, classifies PSD in their arguments, computes a quantitative privacy cost, and rewrites arguments to the minimum necessary data. It sits between the agent and the tool without changes to the LLM, framework, or tools. Over-sharing is an inference-time phenomenon: the helpfulness objective pushes the LLM to include all context in tool arguments regardless of safety training, and our motivating study confirms that privacy prompts still leave 36–76% of calls leaking PSD. Intervention therefore must act on the LLM's output.

This paper contributes:

  1. A practical taxonomy of 10 PSD categories grounded in GDPR Art. 9 classifications, and a quantitative privacy cost metric PC(t,args)\mathrm{PC}(t, \text{args}) combining data sensitivity, tool trust, and argument necessity. The metric is designed for ordinal ranking of methods: Kendall's τ=1.0\tau = 1.0 across 110 weight perturbations, so our main ranking result is invariant to parameterization.

  2. TOOLMINIMIZE, to our knowledge the first system that applies graduated rewriting (removal, generalization, substitution, truncation) at argument granularity while preserving task validity. Progent [5] is also schema-aware over arguments but enforces via allow/block with fallback actions; TOOLMINIMIZE mutates field values instead. The pipeline combines pattern+semantic PSD classification, JSON Schema necessity analysis, and the four rewriting operations.

  3. A controlled motivating study on three production LLMs (120 API calls) that establishes the empirical basis of tool call over-sharing, complementing concurrent benchmarks [9], [10], [11].

  4. A comprehensive evaluation across three agent frameworks (AutoGen, MCP, LangChain), four LLM profiles, 90 author scenarios, 50 external scenarios, and 25 real-world MCP schemas. Live validation on 307 tool calls across GPT-4o, Claude Sonnet, and Llama-3.3-70B achieves 81.2–92.0% privacy cost reduction at 100% task validity (TOST p<0.001 at Δ=1.0\Delta=1.0 ); on unannotated MCP schemas, 79.0%; on Stage C author scenarios, 73.6% (7.3× lower residual PCS than PII Detection).

  5. AgentPrivBench, an open-source benchmark with ground-truth PSD annotations and standardized privacy metrics.

References (34)