Tool Masking for Enterprise Agentic AI Systems at Scale
databook · Tech · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Enterprise agent tool interfaces
Databook needed reliable enterprise-scale sales agents, but MCP-connected services exposed full APIs and bloated tool schemas that increased cost, token load, and model choice entropy.
Constraints:
- Enterprise agents had to run reliably at volume for large technology customers.
- MCP exposed broad service surfaces without task-specific filtering.
- Large raw API responses polluted prompts with irrelevant data.
- Input schemas with too many options increased model misfires.
- The system needed to adapt tool interfaces per customer and agent context without code deployments.
Architecture
Databook inserted a tool masking layer between agents and raw tool handlers. The raw handler or MCP service remains available underneath, while tool masks reshape input and output schemas, filter irrelevant fields, and customize the tool surface for each agent context so agents see a small, task-appropriate interface.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR enterprise_sales_agent["Enterprise sales agent"] --> tool_mask_layer["Tool mask layer"] customer_specific_configuration["Customer-specific configuration"] --> tool_mask_layer tool_mask_layer --> raw_tool_handler["Raw tool handler"] raw_tool_handler --> external_service_apis["External service APIs"] external_service_apis --> raw_tool_handler raw_tool_handler --> tool_mask_layer tool_mask_layer --> enterprise_sales_agent
Components
| Component | Role | Interacts with |
|---|---|---|
Enterprise sales agent |
Runs sales intelligence and workflow automation for enterprise customers. | Tool mask layer |
Tool mask layer |
Filters, reshapes, and customizes tool schemas and responses for a specific agent context. | Enterprise sales agent, Raw tool handler, Customer-specific configuration |
Raw tool handler |
Exposes full service or API surfaces, potentially through MCP. | Tool mask layer, External service APIs |
External service APIs |
Provide underlying business data such as finance or sales information. | Raw tool handler |
Customer-specific configuration |
Allows masks to adapt tool surfaces and outputs for different customer requirements. | Tool mask layer |
Data flow
An agent calls a masked tool interface. The mask constrains the input schema and requested data, forwards the call to the underlying handler or MCP-connected service, filters and reshapes the raw response, then returns a smaller context-specific result to the agent.
3 supporting quotes
Why this architecture
The mask layer keeps MCP's connectivity benefits while preventing raw APIs from overwhelming the LLM with irrelevant fields and excessive choices.
Models used: LLM agents · MCP-connected tools
Scale
- Databook serves large technology companies including Microsoft, Salesforce, and AWS.“Databook serves large technology companies including Microsoft, Salesforce, and AWS by automating sales force workflows through AI agents.”summary, stated
- A typical Yahoo Finance stock quote response returns about 100 fields.“A typical stock quote request returns approximately 100 different fields of data.”summary, stated
- The agents support long-running production workflows for large tech companies.“When building long-running production workflows for large tech companies, Databook needed to ensure these systems work reliably”summary, stated
Alternatives considered (roads not taken)
Expose full MCP service surfaces directly to agents
Rejected because: It pollutes the prompt with irrelevant data and increases token cost and choice entropy.
Let raw API responses flow into prompts
Rejected because: Large irrelevant response fields bloat prompts and degrade accuracy.
Patterns
tool-use-orchestration (agent tools)
Databook controls the tool interface exposed to agents through masks placed above raw handlers.
context-engineering (tool context)
Tool masks reduce irrelevant input and output context before it reaches the model.
cost-aware-routing (token control)
Filtering tool payloads reduces unnecessary tokens and cost in agent execution.
Tradeoffs
Keep MCP or raw handlers underneath a mask layer.
Chose Masked tool interfaces over raw tool exposure over Direct agent access to entire APIs.
Rationale: The mask keeps connectivity while making the model-facing interface focused and reliable.
Prompt-engineer tool schemas, not just model prompts.
Chose Customized tool input and output schemas per context over One universal raw tool interface.
Rationale: Task-specific schemas reduce choice entropy and improve speed, cost, and reliability.
Gotchas (what bit them)
MCP connectivity can expose too much tool surface.
Root cause: The protocol standardizes access but does not filter APIs for each agent's task.
Resolution: Add tool masks that reshape schemas and outputs per agent context.
More tool choices create more model failure modes.
Root cause: Large input schemas and options increase choice entropy.
Resolution: Surface the simplest interface that can achieve the outcome.
Raw tool payloads can degrade accuracy.
Root cause: Irrelevant fields bloat prompts and distract the model.
Resolution: Filter and reshape outputs before returning them to the agent.
Evaluation
The case reports qualitative production improvements rather than a benchmark; Databook evaluates tool masking by agent reliability, speed, cost, self-correction, and adaptability for enterprise customers.
Metrics: Yahoo Finance stock quote example returns approximately 100 fields. · Reported improvements in cleanliness, speed, reliability, cost, and self-correction.
Outcomes
- Databook implemented tool masks for enterprise agent systems.
- The approach reduced prompt pollution and choice entropy.
- Tool masks enabled faster adaptation to customer requirements without code deployments.
Databook applies this to enterprise sales automation for large technology companies such as Microsoft, Salesforce, and AWS.