mlsanityData to 7 Oct 2026

From SQL Generation to Tool Selection: A Domain-Oriented Pattern for MCP Servers

arXiv 2608.22063 ↗First posted 22 Aug 2026cs.AI cs.DBcited by 0

On the map: LLM agents and tool use → Tool learning and function calling

Abstract (arXiv)

Agents built on Large Language Models (LLMs) increasingly reach enterprise data through the Model Context Protocol (MCP), and many MCP database servers maximize flexibility by exposing a single generic SQL execution tool. This paper proposes the Domain-Oriented Tooling Pattern: instead of generating SQL at query time, the model selects from a small set of domain-aligned tools whose parameterized queries encapsulate schema navigation, joins and business rules on the server side. We formalize the pattern around three architectural invariants and introduce Model Demotion, the observation that replacing SQL synthesis with intent classification lowers the model tier required to serve routine requests. As a reference implementation we present MCP Blueprint, an open-source framework in which domain tools are defined declaratively as YAML metadata plus external parameterized SQL files. We evaluate the pattern with a public reproducibility benchmark comparing three MCP server designs - raw SQL execution, a thin generic tool pack, and a verticalized domain pack - on four local models (3B-8B) across seventeen customer-facing tasks over the Sakila database (609 completed cells; temperature 0; three repetitions per cell). The verticalized pack reaches a pooled mean score of 0.939 versus 0.666 for raw SQL and 0.605 for the generic pack; the smallest model improves from 0.583 to 0.929, matching or exceeding every larger configuration while cutting cost per correct answer by an order of magnitude. All harness code, prompts, gold answers, frozen packs and per-cell results are publicly available.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 12 of its 18 references that are in the map. First posted on arXiv 22 Aug 2026.

Builds on

12 of 18 references.

Closest ancestors · 3

Same direction, newest first

  1. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs31 Jul
  2. 2023Gorilla: Large Language Model Connected with Massive APIs24 May
  3. 2023Toolformer: Language Models Can Teach Themselves to Use Tools9 Feb

Other references · 9

  1. 2024The Llama 3 Herd of Modelscited by 14,192
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  3. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  4. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  5. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  6. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  7. 2024AI Multi-Agent Interoperability Extension for Managing Multiparty Conversationscited by 6
  8. 2026Prompt Injection Mitigation with Agentic AI, Nested Learning, and AI Sustainability via Semantic Cachingcited by 4
  9. 2025Agentic AI Sustainability Assessment for Supply Chain Document Insightscited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026From Tool Orchestration to Code Execution: A Study of MCP Design Choices
  2. 2026Hybrid Semantic Tool Discovery for Enterprise MCP Gateway: Architecture and Implementation
  3. 2026Structured Context Engineering for File-Native Agentic Systems: Evaluating Schema Accuracy, Format Effectiveness, and Multi-File Navigation at Scale
  4. 2025ScaleMCP: Dynamic and Auto-Synchronizing Model Context Protocol Tools for LLM Agents
  5. 2026A Cost-Aware Agentic Architecture for NL-to-SQL over Nested Enterprise Schemas, with a New Benchmark
  6. 2026A Semantic-Layer-Mediated Agent for Natural Language to SQL over Heterogeneous Enterprise Databases
  7. 2025MCP-Bench: Benchmarking Tool-Using LLM Agents with Complex Real-World Tasks via MCP Servers
  8. 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation