Introduction

Each Agentforce Context Protocol (ACP) tool is designed to perform a specific action, and to do so, it often requires certain information (inputs) from you or the calling Agentforce agent/automation. Once the tool has executed, it will typically return some information (outputs) indicating the result of its operation.

Understanding these inputs and outputs is crucial for using ACP tools effectively, whether you’re instructing an Agentforce agent, building a Salesforce Flow, or testing tools directly.

Where to Find Input and Output Information

The primary source for understanding a tool’s inputs and outputs is the ACP Tool Explorer (or a similar tool discovery interface in your Salesforce org). As detailed in the “Exploring Available Tools” guide, when you view the details of a specific tool, you’ll typically find sections for:

  • Input Parameters: Describes the data the tool expects.
  • Output Parameters: Describes the data the tool returns.

Interpreting Input Parameters

For each input parameter, the Tool Explorer (or other documentation) should provide:

  • Parameter Name: The specific name of the input (e.g., channel_id, record_id, query_string, message_text). These names are usually in snake_case.
  • Data Type: The type of data expected (e.g., String, Number, Boolean, List, Map/Object).
  • Description: An explanation of what this parameter represents and what kind of value is expected.
  • Required/Optional: Indicates whether the parameter must be provided for the tool to function correctly.
    • Required parameters are essential. If not supplied, the tool will likely fail or produce an error.
    • Optional parameters allow you to modify the tool’s behavior or provide additional context but are not strictly necessary for basic operation.
  • Example Value (if applicable): A sample of what a valid input might look like.

Common Input Patterns

  • Identifiers: Many tools require IDs for specific records or entities (e.g., user_id for Slack, contact_id for Salesforce, product_sku for Commerce Cloud).
  • Configuration Objects/Maps: Some tools might expect a structured object (often represented as a Map or JSON) containing multiple related settings.
  • Text/Content: Tools that send messages, create content, or perform searches will require text inputs.
  • Boolean Flags: Optional true/false flags to enable or disable certain behaviors.

Example: slack_send_message Tool Inputs

Let’s imagine a hypothetical slack_send_message tool. Its inputs might be:

Parameter NameData TypeRequiredDescription
channel_idStringYesThe ID of the Slack channel to send the message to.
textStringYesThe content of the message to send.
as_userBooleanNo(Optional) Send as the authenticated user (bot default). Defaults to false.

To use this tool, you must provide a channel_id and text. The as_user parameter is optional.

Interpreting Output Parameters

Similarly, for each output parameter, you should find:

  • Parameter Name: The name of the output field (e.g., success, record_id, results_list, error_message).
  • Data Type: The type of data returned.
  • Description: An explanation of what this output represents.

Common Output Patterns

  • Success/Status Indicators: Often a Boolean success flag (true if the operation was successful, false otherwise).
  • Result Data: The primary data returned by the tool (e.g., a list of records, the ID of a newly created record, details of a queried entity).
  • Error Information: If an operation fails, outputs like error_code or error_message might provide details about the failure.
  • Confirmation Details: For actions like sending a message, the output might include a timestamp or a message ID from the target system.

Example: slack_send_message Tool Outputs

The outputs for our hypothetical slack_send_message tool might be:

Parameter NameData TypeDescription
successBooleantrue if the message was sent successfully, false otherwise.
message_tsStringThe timestamp ID of the sent message in Slack (if successful).
error_messageStringA description of the error if success is false. Null if successful.

Data Formatting and Types

  • Pay close attention to expected data types. Sending a text string when a number is expected will likely cause errors.
  • For complex inputs like Maps/Objects (often used for JSON-like structures), ensure the keys and nested structures match what the tool expects.
  • Dates and times usually require a specific format (e.g., ISO 8601). The tool’s documentation should specify this.

Practical Tips

  • Start Simple: When first using a tool, provide only the required inputs to understand its basic behavior.
  • Test Incrementally: Add optional parameters one by one to see how they affect the outcome.
  • Use the Tool Explorer for Testing: If your ACP Tool Explorer allows direct testing (as covered in the next guide), use it to experiment with different inputs and observe the outputs.
  • Consult Connector-Specific Docs: While this guide is general, individual Connector documentation might provide more nuanced details about the inputs and outputs of its specific tools.

Next Steps

Once you’re comfortable interpreting tool inputs and outputs, you’ll want to try them out:

Understanding how to provide the correct inputs and interpret the outputs is fundamental to successfully automating tasks and empowering Agentforce agents with ACP.