Skip to main content
Many models support the use of external tools to enrich data or provide additional context. These tools can be used to call external APIs, run custom scripts, or perform any other operation that can be defined in code. The definitions of these tools are passed into the model as part of the prompt, making the model aware of their functionality. This allows the model to call the tool when needed via a structured response.

Tools

Tool definitions in Prompt Foundry are independent of prompt definitions. This means you can define a tool once and use it across multiple prompts, allowing you to iterate on the tool separately from the prompts. These tools are managed in the Tools section of the platform.

Tool Definition

The tool definition follows a JSON schema with the following properties: Here is an example of a tool definition for a tool that gets the current weather:
get_current_weather

Using Tools

To use the tool within your prompt, click the model tools button in the prompt editor. This will open a modal where you can select the tools you want to enable for your prompt.

Tool Choice

Tool choice allows you to provide additional guidance to the model on when to use the tool.