Agentic Tool-Use: 75+ Service Simulations, Ergonomic Toolsets & ADK Plugins
Across Frontier AI Lab engagements via Turing, Pulkit Mundra engineered stateful Python, Pydantic v2 (StrictBaseModel), and SQLModel/SQLite service simulations spanning 75+ enterprise SaaS surfaces. Consolidating sprawling V1 APIs into flat @tool_spec overlays (60 -> 18 tools) and summary-first projections cut schema tokens by ~50-82% and response payloads by ~78-83% at ~99% task solvability parity.
Interactive Agent Tool and MCP Token Optimizer Playground
Verbose V1 API Surfaces vs Ergonomic Toolset Overlays
// Ergonomic @tool_spec Overlay: 18 workflow-aligned tools
// Summary-first search (-83% per-call) + concise mutators (-88%):
search_emails({ query: "is:unread billing", max_results: 10 }) -> [
{
id: "1962a8f",
sender: "billing@vendor.io",
subject: "Invoice #8841 adjustment",
snippet: "Updated credit memo attached..." // 87 tok/call
}
]
get_email({ id: "1962a8f" }) -> { body_text: "...", attachments: [] }
trash_email({ id: "1962a90" }) -> { id: "1962a90", status: "trashed" }Per-pattern numbers above are illustrative clean-room scenarios. Across 75+ production tool simulations the average was ~80% fewer response payload tokens (78-83% range) at ~99% solvability parity.
Engineering & Implementation
- Engineered and maintained high-fidelity, stateful API simulations across 75+ enterprise SaaS surfaces (Gmail, Calendar, Slack, Jira, Shopify, Canva, GitHub, Cursor/Terminal) using Python, Pydantic v2 (StrictBaseModel), and SQLModel/SQLite.
- Consolidated verbose V1 APIs into workflow-aligned Python @tool_spec overlays (e.g., 60 email endpoints -> 18 tools, 12 device-action tools -> 7) and Function Definition (FD) schema-stripping configs, cutting static schema tokens by ~50-82% and runtime response payloads by ~78-83% while maintaining ~99% task solvability parity (0.0pp accuracy degradation).
- Built cross-service agent plugins on Google ADK (SkillToolset progressive disclosure) with MCP connectors, deterministic Python Decimal aggregation tools (eliminating LLM arithmetic hallucinations and cutting multi-turn prompt tokens by ~32%), and an interactive Gradio runner.
- Developed containerized multi-turn coding benchmarks (Docker + Pytest), diagnosed legacy tool-name assertion bugs in refactored eval suites, and collaborated on complex open-source Python codebase reasoning, cutting per-service delivery from days to hours with reusable Cursor skills.
Measurable Impact
- ~78-83% smaller response payloads, ~50-82% fewer schema tokens, ~32% lower multi-turn plugin tokens, and ~99% solvability parity across 75+ service simulations
Production Agent Toolset Refactoring Outcomes Across Multi-Hop Evaluations
| Architecture Dimension | Legacy 1:1 V1 API Tool Dump | Ergonomic @tool_spec + ADK Overlay |
|---|---|---|
| Exposed Email/Calendar Tool Surface | 60 raw CRUD & admin endpoints | 18 flat workflow-aligned tools (-66% schema) |
| Search Response Payload Size | ~516 tokens/call (full MIME + headers) | ~87 tokens/call (-78% to -83% net trajectory) |
| Mutating Tool Echo (Send / Trash) | ~6.8 KB full resource snapshot | Thin status confirmation (-88% to -99%) |
| Cross-Service Financial Aggregation | Raw JSON paginated into LLM context | Google ADK SkillToolset + Python Decimal (-32%) |
| State-Based Benchmark Solvability | Baseline reference | ~99% parity (0.0pp true accuracy loss) |
Frequently Asked Questions
01How do you test multi-turn AI agents deterministically without flaky live third-party APIs?+
02Why did consolidating 60 API endpoints into 18 MCP tools keep ~99% task solvability?+
Building LLM agents or MCP servers that need higher accuracy and lower token spend?
I design production MCP & ADK toolkits, high-throughput Python/Django APIs, and reliable fintech & Linux software. Reach out directly and I typically reply within 4 hours.