Introduction
Imagine you are developing a Joule agent to streamline customer support. The agent needs to access a knowledge base, understand customer sentiment, and trigger actions in a CRM system. To achieve this, the agent requires tools—capabilities that extend its core language understanding and allow it to interact with systems and data. This lesson explores what tools are, how they are defined in Joule Studio,and how the Model Context Protocol (MCP) simplifies their integration by promoting interoperability and security.
What are AI Tools?
A tool is a callable capability that enables a Joule agent to perform specific actions or access external resources. Tools allow agents to move beyond text generation and interact with real-world systems, data, and processes.
Common examples of tools used by Joule agents include:
Here are some common examples of Agent Tools:
| Tool | Purpose | Enterprise Use Case Example |
|---|---|---|
| Joule skills | To securely connect to core SAP or non-SAP sources using governed, reusable functions. | A supply chain agent uses a Joule Skill to check the real-time stock level of a specific product in the warehouse. |
| Document Grounding | To extract information and reason from unstructured business documents (PDFs, Word docs, contracts) to ensure context-aware and compliant answers. | A customer service agent is grounded in warranty policy documents to accurately determine if a customer's claim is valid. |
| Calculator | To perform precise numerical reasoning, calculations, and evaluations needed for financial and logistical tasks. | An agent creating a sales order uses the Calculator to apply a complex, multi-tiered discount based on volume and customer history. |
| Human in the Loop | To enforce governance by pausing the workflow and requesting manual approval or input from a user for critical or high-value decisions. | A finance agent drafts a payment proposal for an unusually large invoice and triggers a Human-in-the-Loop approval task for the department manager. |
| Joule agents | To allow a primary agent to invoke another, more specialized agent to perform a specific task, creating a composable and scalable ecosystem. | A primary 'Sales Order Agent' needs to perform a credit check. Instead of having that logic built-in, it calls the specialized 'Credit Check Agent' as a tool. The expert agent runs its analysis and returns a 'pass/fail' result, which the primary agent then uses to continue the process. |
| Model Context Protocol (MCP) | To enable the agent to discover and orchestrate workflows across SAP and non-SAP applications in a standardized way, breaking down application silos. | A logistics agent uses MCP to query shipping status directly from a third-party logistics provider's MCP-enabled system. |
Tools complement the capabilities of Large Language Models. While an LLM can reason and generate text, tools provide deterministic execution—for example, accurate calculations or system interactions
The Three Principles of a Well-Defined Tool in Joule Studio
Defining a tool in Joule Studio is the process of packaging a trusted, production-ready capability for agent use. To ensure reliability and predictable behavior, tools should follow three core principles.
Principle 1: It Must Be Validated Capability.
A tool is a promise that a capability works as expected. Before exposing it to an agent, the underlying functionality must be independently tested and operational:
- For a Joule Skill: This means the underlying API call or automation has been thoroughly tested. You have verified that it connects to the target system correctly and returns the expected results or performs the desired action without errors.
- For Document Grounding: This means the document pipeline has already run successfully. The source documents have been processed, indexed, and the resulting knowledge "chunks" are created and available for the agent to query against.
You are not defining an idea; you are packaging a proven asset.
Principle 2: Define its Purpose in Plain Business Language.
Once you have a working capability, you must teach the agent how and when to use it. You do this by filling out a simple "Description" form in Joule Studio. This is the single important element for the agent's decision-making. The quality of this description directly determines the accuracy and reliability of the agent's behavior.
Principle 3: Craft Agent Instructions as a Tool Usage Guide for a New Team Member
The core instructions you give your agent in Joule Studio are not just a high-level goal; they are its operational playbook. This playbook must teach the agent how to strategically use the specific tools you have given it.
Think of it this way: When a new employee joins, you don't just say "Help customers." You show them the software they will use and explain how and when to use each application. Your agent's instructions must do the same.
Your instructions should be a guide that teaches the agent to reason about its tools:
1. Tool Selection Strategy (Which tool for which job?)
The instructions must explicitly guide the agent on choosing the right tool for a specific task, especially when multiple tools seem similar.
- Vague Instruction: "Use tools to find order information."
- New Team Member Instruction: "When a user asks about an order, your strategy is as follows: If they ask for the delivery status, use the GetOrderStatus tool. If they ask to see the items in the order, use the GetOrderDetails tool. These are separate functions."
2. Tool Sequencing (In what order should I use them?)
For multi-step problems, the instructions must explain the correct workflow, teaching the agent how to use the output of one tool as the input for the next.
- Vague Instruction: "Find the customer's orders."
- New Team Member Instruction: "To find all orders for a customer, you must follow a two-step process. First, use the FindCustomerByName tool to get their unique customerID. Second, take that customerID and use it as the input for the ListRecentOrders tool."
3. Data Source Prioritization(Which tool do I trust the most?)
If the agent has access to multiple sources of information (e.g., a real-time tool and a static document), the instructions must tell it which one to prioritize.
- Vague Instruction: "Check for stock."
- New Team Member Instruction: "Your primary source for inventory is the CheckStockLevel tool, as it provides real-time data. Always use this tool first. Only if this tool fails or is unavailable should you consult the DailyInventoryReport.pdf document, and if you do, you must inform the user that the information is from yesterday."
4. Handling Tool Limitations (What to do when a tool isn't enough?)
The instructions must define the boundaries of a tool and provide a clear escalation path.
- Vague Instruction: "If you can't help, escalate."
- New Team Member Instruction: "The CalculateStandardDiscount tool can only be used for non-VIP customers. If the CheckCustomerStatus tool returns 'VIP', you must not use the discount tool. Instead, state that a special discount may apply and that you need to pass the request to a human sales manager for approval."
LLMs themselves can only process text. When you provide a Tool to an agent, you're essentially teaching the LLM about the existence of that tool and instructing it to generate text-based instructions for using it.
For example, if you provide a "weather" tool, and the agent needs to know the weather in Paris, the LLM might generate the text call weather_tool('Paris'). The agent then interprets this instruction, executes the tool, and retrieves the weather data. The LLM then uses this data to generate a natural-sounding response for the user.
Model Context Protocol (MCP): a unified tool interface
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide tools to LLMs. It addresses the challenge of integrating diverse tools with various LLMs by providing a common language and structure. Think of it as a universal adapter for AI tools.
MCP aims to simplify the integration of tools by offering several key benefits:
- Standardized Interface: MCP defines a consistent way for tools to be described and accessed, regardless of their underlying implementation. This reduces the complexity of integrating new tools and allows developers to focus on the tool's functionality rather than the specifics of the LLM interface.
- Growing Ecosystem: MCP fosters a community of developers who contribute and maintain a library of pre-built integrations. This allows LLMs to directly plug into a wide range of tools, accelerating development and reducing redundancy.
- LLM Provider Flexibility: By abstracting the tool interface, MCP enables organizations to switch between LLM providers without needing to rewrite their tool integrations. This provides greater flexibility and reduces vendor lock-in.
- Enhanced Security: MCP promotes best practices for securing data within your infrastructure. By defining clear boundaries and access controls, it helps protect sensitive information when tools are accessed by LLMs.
By implementing MCP, frameworks can leverage tools defined within the protocol, eliminating the need to reimplement the same tool interface for each framework. This leads to a more streamlined and efficient development process.
Summary
- Tools are functions that extend the capabilities of Joule agents, enabling them to interact with the real world and access external information.
- Defining a Tool requires a clear description, a callable function, arguments with typings, and optional output typings.
- The Model Context Protocol (MCP) provides a standardized interface for integrating tools with LLMs, simplifying development and promoting interoperability.