Tool Use, Function Calling, and API-Oriented AI

By Last Updated: June 8th, 202610.3 min readViews: 883

Tool Use, Function Calling, and API-Oriented AI

How LLMs interact with databases, APIs, calculators, CRMs, ERPs, search engines, and enterprise tools.


Introduction

Large Language Models started as systems that could generate, summarize, translate, and reason over text. But enterprise work does not happen only in text. It happens inside databases, CRMs, ERPs, HR systems, billing platforms, support tools, search systems, documents, calendars, spreadsheets, and APIs.

This is why tool use, function calling, and API-oriented AI have become central to modern AI system design. As of June 2026, the important enterprise shift is from “AI that answers” to “AI that can safely retrieve, calculate, compare, update, trigger, and document actions through controlled tools.”

Function calling allows an LLM to request a predefined function with structured inputs. Tool use is the broader idea that an AI system can use calculators, databases, search engines, APIs, code tools, and enterprise applications. API-oriented AI is the design approach where LLMs connect to business systems through governed interfaces rather than uncontrolled access.

The LLM is not the system of record. It is the language and reasoning layer. The database, ERP, CRM, or API remains the authoritative source.


Let’s dive deep into the topic now.

1. Tool use turns LLMs from chat systems into work systems

 A normal chatbot can answer a question. A tool-using AI system can participate in a workflow.

For example, if a user asks, “Check the customer’s unpaid invoices and draft a reminder,” the model may need to query a billing system, identify overdue invoices, apply company policy, and draft a message. The LLM does not “know” the current invoice status. It must retrieve it from an approved source.

The basic flow is:

  • The user gives a natural-language request.
  • The LLM decides whether it needs an external tool.
  • The model selects a tool and prepares structured inputs.
  • The application executes the tool outside the model.
  • The result is returned to the model.
  • The model explains, summarizes, or prepares the next step.

This separation is important. The model interprets and communicates. The application layer authenticates, authorizes, executes, validates, logs, and controls risk.

2. Function Calling means structured requests, not magic

Function calling does not mean the model freely runs code. Developers define the available functions, their descriptions, input schemas, and expected outputs. The model then chooses a function and fills in structured parameters.

For example, a developer may expose:

get_invoice_status(customer_id, date_range, currency)

If the user asks about unpaid invoices, the model may request this function with parameters such as customer ID, date range, and currency. The surrounding application decides whether to execute the call, sends the request to the real system, receives the result, and returns it to the model.

This pattern is available in major AI platforms, including OpenAI tool/function calling, Google Gemini function calling, Azure OpenAI function calling, Anthropic Claude tool use, and Amazon Bedrock Agents. The implementation details differ, but the principle is similar: connect natural language to structured operations.

Function calling is useful because business systems need exact inputs, while humans prefer natural language. An excellent collection of learning videos awaits you on our Youtube channel.

3. The main tools used by LLM applications

Enterprise LLM systems usually connect to tools in a few major categories:

  • Databases and data platforms: SQL databases, data warehouses, vector databases, document stores, and knowledge graphs.
  • Calculation tools: calculators, Python execution, spreadsheet formulas, statistical tools, forecasting tools, and rule engines.
  • Search and retrieval systems: web search, enterprise search, document search, product search, policy search, and RAG pipelines.
  • Business systems: CRM, ERP, HRMS, ITSM, procurement, billing, finance, customer support, and marketing platforms.
  • Communication tools: email, calendars, chat systems, notifications, ticketing tools, and collaboration platforms.
  • Workflow and integration tools: API gateways, automation platforms, robotic process automation, and integration platforms.

A narrow AI assistant may use only two or three tools. A full enterprise agent may use many. The more tools the model can access, the more governance it needs.

4. How LLMs interact with databases

LLMs should not be given uncontrolled access to databases. Databases contain schemas, permissions, relationships, sensitive fields, and business-specific definitions. A safe architecture usually adds an access layer between the model and the data.

There are four common patterns.

First, text-to-SQL converts a natural-language question into a SQL query. This can help business users ask data questions, but it needs safeguards: read-only access, table restrictions, query limits, validation, and monitoring.

Second, API-mediated access exposes approved business functions instead of raw tables. For example, the model may call check_inventory, get_customer_balance, or retrieve_leave_balance. This is usually safer than allowing open-ended SQL.

Third, retrieval-augmented generation, or RAG, retrieves relevant documents or data passages before the model answers. This is commonly used with enterprise search, vector search, and knowledge-base systems.

Fourth, semantic layers and knowledge graphs help the system understand business meaning, relationships, product hierarchies, customer links, approval chains, and process dependencies.

In serious enterprise use, the model should not be treated as the database expert. It should use governed data access. A constantly updated Whatsapp channel awaits your participation.

5. How LLMs use APIs

APIs are the practical bridge between LLMs and enterprise systems. An API defines how one system can request data or trigger an action in another system.

API-oriented AI needs several controls:

  • Clear API descriptions, often through OpenAPI specifications.
  • Authentication and authorization.
  • Input validation.
  • Output validation.
  • Error handling.
  • Rate limits and cost controls.
  • Audit logs.
  • Human approval for high-risk actions.

This is where integration platforms become important. MuleSoft, Microsoft Power Platform, Workato, Boomi, ServiceNow, SAP BTP, Oracle Integration, and IBM watsonx Orchestrate are examples of platforms used to connect applications, APIs, and workflows.

In Salesforce environments, MuleSoft for Agentforce is positioned to connect agents with third-party systems through APIs and connectors. In Amazon Bedrock Agents, action groups define what actions an agent can perform, often through API-backed operations. In SAP, Joule Studio supports building custom agents and agentic solutions in the SAP ecosystem. Oracle AI Agent Studio supports creation, configuration, validation, and deployment of agents for Fusion Applications.

The goal is not to let the AI roam freely. The goal is to give it controlled, documented, auditable paths into business systems.

6. Calculators and Code Tools keep the system accurate

LLMs are not reliable calculators. They can explain calculations and often write formulas, but exact arithmetic, statistics, forecasting, and financial calculations should be handled by tools.

For example, loan schedules, tax calculations, inventory projections, gross margin analysis, and statistical summaries should be computed by a calculator, spreadsheet engine, Python tool, rule engine, or approved analytics system.

A good design separates roles:

  • The LLM understands the user’s request.
  • The calculation tool performs the exact computation.
  • The LLM explains the result in human language.
  • The application validates and records the output where needed.

Code execution is also useful for data analysis, but it must be sandboxed. Enterprises need limits on file access, packages, network access, runtime, memory, and output handling.

The practical rule is simple: let the model reason and explain; let tools compute. Excellent individualised mentoring programmes available.

7. Search and Retrieval extend the model’s knowledge

An LLM’s training data is not live enterprise knowledge. It may not know current policies, prices, customer records, contracts, product details, regulations, or internal documents. Search and retrieval tools solve this problem.

There are two broad types.

Public search connects the model to web information. Private search connects it to company documents, policies, wikis, support tickets, product manuals, emails, knowledge bases, and databases.

Retrieval helps reduce hallucination, but it does not eliminate it. Retrieved material can be outdated, duplicated, incomplete, biased, or irrelevant. Therefore, production systems need ranking, metadata filters, source permissions, document freshness checks, and citations.

RAG is valuable because it grounds an answer in external evidence. But RAG is only as good as the retrieval pipeline, source quality, access controls, and answer-checking process.

8. CRMs, ERPs, and Enterprise Software are becoming Agent-ready

By June 2026, major enterprise software vendors are embedding AI agents and tool-using assistants into business platforms.

Examples include Salesforce Agentforce, SAP Joule and Joule Studio, Oracle AI Agent Studio for Fusion Applications, IBM watsonx Orchestrate, ServiceNow AI capabilities, Microsoft Copilot and Semantic Kernel-based enterprise development, and Amazon Bedrock Agents.

These platforms matter because they sit close to operational data. A CRM contains customers, leads, opportunities, accounts, cases, and communication history. An ERP contains finance, procurement, supply chain, manufacturing, billing, and compliance processes. HR systems contain roles, employees, leave, payroll, benefits, and approvals. ITSM systems contain incidents, assets, changes, and service requests.

Common enterprise use cases include:

  • Sales: account summaries, lead qualification, follow-up drafts, opportunity updates, and next-best-action suggestions.
  • Customer support: case classification, knowledge-base answers, resolution suggestions, escalation, and ticket updates.
  • Finance and ERP: invoice checks, purchase-order matching, anomaly detection, reconciliation support, and approval routing.
  • HR: employee self-service, policy answers, leave support, recruiting workflows, and benefits guidance.
  • IT operations: incident triage, knowledge lookup, asset checks, ticket creation, and approved remediation steps.

The key point is that enterprise agents must follow business rules. They must respect roles, permissions, compliance requirements, and audit trails. Subscribe to our free AI newsletter now.

9. Governance and Security essential

Tool-using AI is more powerful than ordinary chat, and therefore more risky. A wrong chatbot answer may mislead someone. A wrong tool call may update records, send emails, expose data, trigger payments, change configurations, or create compliance problems.

Major risks include:

  • Prompt injection.
  • Sensitive data exposure.
  • Excessive permissions.
  • Wrong tool selection.
  • Wrong parameters.
  • Unverified outputs.
  • Unsafe automated actions.
  • Tool-calling loops.
  • API cost overruns.
  • Weak auditability.
  • Supply-chain risk in agent frameworks and connectors.

Good controls include least-privilege access, role-based permissions, approval gates, deterministic validation, audit logs, monitoring, rate limits, red-team testing, incident response, and human review for high-impact actions.

NIST’s AI Risk Management Framework and OWASP’s LLM risk guidance are useful references for thinking about governance, security, reliability, and misuse. Enterprises should treat AI agents as production software, not as experimental chatbots.

10. The emerging architecture: LLM + Tools + Orchestration + Governance

A practical API-oriented AI system usually has four layers.

The first layer is the user interface: chat, voice, CRM panel, ERP screen, support console, mobile app, email, or collaboration tool.

The second layer is the LLM. It interprets intent, asks clarifying questions when needed, selects tools, generates structured calls, and explains results.

The third layer is orchestration. This layer manages tool choice, workflow state, retries, approvals, memory, error handling, routing, and multi-step processes. Examples in this space include LangChain, LangGraph, Microsoft Semantic Kernel, Amazon Bedrock Agents, Google Vertex AI Agent Builder, IBM watsonx Orchestrate, SAP Joule Studio, Salesforce Agentforce, and Oracle AI Agent Studio.

The fourth layer is the tool and system layer: databases, APIs, calculators, search systems, CRMs, ERPs, HR systems, IT platforms, code tools, and communication systems.

Across all layers sits governance: identity, access control, logging, policy enforcement, data-loss prevention, monitoring, evaluation, and human approval.

This architecture is becoming the practical foundation for enterprise AI because it combines natural language with controlled action. Upgrade your AI-readiness with our masterclass.

Conclusion

Tool use, function calling, and API-oriented AI are central to the next stage of enterprise AI. They allow LLMs to interact with databases, APIs, calculators, search systems, CRMs, ERPs, HR platforms, IT systems, and workflow tools.

The most important point is that the LLM is not the source of truth. It is the interface, reasoning layer, and communication layer. The system of record remains the database, CRM, ERP, or approved enterprise application. Used well, tool-using AI can reduce friction, improve access to knowledge, automate routine work, support employees, and make enterprise software easier to use. Used carelessly, it can multiply errors, leak data, or trigger wrong actions at machine speed.

Therefore, successful enterprise AI will not depend only on having a powerful model. It will depend on the right combination of model, tools, APIs, orchestration, governance, and human judgment.

Share this with the world