Skip to Content
HomeBuild toolsTool Context

Understanding ToolContext

What is ToolContext?

ToolContext is a crucial component in Arcade that manages authorization and user information for tools requiring authentication. Let’s explore how it works and how you can use it in your .

ToolContext is a class that holds two main pieces of information:

  1. Authorization context: This includes a token for making authenticated requests to external APIs as well as structured information for providers that support retrieving user information.
  2. User ID: This identifies the user invoking the .

Some authorization providers may also include additional structured information in the ToolContext.

How ToolContext Works

When you invoke a that requires authorization, Arcade’s Tool SDK automatically:

  1. Creates a ToolContext object
  2. Passes this object to your

You can then use the ToolContext object to make authenticated requests to external APIs.

Next Steps

Now that you understand the basics of ToolContext, you’re ready to apply this knowledge in creating your own authorized tools. To learn how to build a custom that requires authorization, check out our guide on adding user authorization to your tools or adding secrets to your tools.

Last updated on