> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://humanloop.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/docs/_mcp/server.

> Learn how to create a JSON Schema tool that can be reused across multiple Prompts.

It's possible to re-use tool definitions them across multiple Prompts. You achieve this by having a Prompt file which defines a JSON schema, and linking them to your Prompt.

You can achieve this by first defining an instance of a `JSON Schema` tool in your global Tools tab. Here you can define a tool once, such as `get_current_weather(location: string, unit: 'celsius' | 'fahrenheit')`, and then link that to as many model configs as you need within the Editor as shown below.

Importantly, updates to the `get_current_weather` `JSON Schema` tool defined here will then propagate automatically to all the model configs you've linked it to, without having to publish new versions of the prompt.

### Prerequisites

* A Humanloop account - you can create one by going to our sign up page.
* Be on a paid plan - your organization has been upgraded from the Free tier.
* You already have a Prompt — if not, please follow our [Prompt creation](/docs/guides/create-prompt) guide first.

To create a JSON Schema tool that can be reusable across your organization, follow the following steps:

## Creating and linking a JSON Schema Tool

> **Paid Feature**
>
> This feature is not available for the Free tier. Please contact us if you wish
> to learn more about our [Enterprise plan](https://humanloop.com/pricing)

### Create a Tool file

Click the 'New File' button on the homepage or in the sidebar.

### Select the **Json Schema** Tool type

### Define your tool

Set the `name`, `description`, and `parameters` values. Our guide for using [Tool Calling in the Prompt Editor](/docs/v4/guides/tool-calling) can be a useful reference in this case. We can use the `get_current_weather` schema in this case. Paste the following into the dialog:

```json
{
  "name": "get_current_weather",
  "description": "Get the current weather in a given location",
  "parameters": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "name": "Location",
        "description": "The city and state, e.g. San Francisco, CA"
      },
      "unit": {
        "type": "string",
        "name": "Unit",
        "enum": ["celsius", "fahrenheit"]
      }
    },
    "required": ["location"]
  }
}
```

### Press the **Create** button.

### Navigate to the **Editor**

Make sure you are using a model that supports tool calling, such as `gpt-4o`.

> **Models supporting Tool calling**
>
> See the [Models page](/docs/v4/supported-models) for a list of models that support tool calling.

### **Add Tool** to the Prompt definition.

### Select 'Link existing Tool'

In the dropdown, go to the **Link existing tool** option. You should see your `get_current_weather` tool, click on it to link it to your editor.

![](/docs/_fern-img/e9cac4f41ea9aaa932fa81e6634229be5106935d37e63b72da5858ce1f78b5a1.webp)

### Test that the Prompt is working with the tool

Now that your tool is linked you can start using it as you would normally use an inline tool. In the **Chat** section, in the **User** input, enter "What is the weather in london?"

Press the **Run** button.

You should see the **Assistant** respond with the tool response and a new **Tool** field inserted to allow you to insert an answer. In this case, put in `22` into the tool response and press **Run**.

![](/docs/_fern-img/cc9c035caacc2c22c2524b3fc2bd95a58b43da58452175f6977908e1f475d08d.webp)

The model will respond with `The current weather in London is 22 degrees`.

### Save the Prompt

You've linked a tool to your model config, now let's save it. Press the **Save** button and name your model config `weather-model-config`.

### (Optional) Update the Tool

Now that's we've linked your `get_current_weather` tool to your model config, let's try updating the base tool and see how it propagates the changes down into your saved `weather-model-config` config. Navigate back to the Tools in the sidebar and go to the Editor.

### Change the tool.

Let's update both the name, as well as the required fields. For the name, update it to `get_current_weather_updated` and for the required fields, add `unit` as a required field. The should look like this now:

```json
{
  "name": "get_current_weather_updated",
  "description": "Get the current weather in a given location",
  "parameters": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "name": "Location",
        "description": "The city and state, e.g. San Francisco, CA"
      },
      "unit": {
        "type": "string",
        "name": "Unit",
        "enum": ["celsius", "fahrenheit"]
      }
    },
    "required": ["location", "unit"]
  }
}
```

### Save the Tool

Press the **Save** button, then the following **Continue** button to confirm.

Your tool is now updated.

### Try the Prompt again

Navigate back to your previous project, and open the editor. You should see the `weather-model-config` loaded as the active config. You should also be able to see the name of your previously linked tool in the Tools section now says `get_current_weather_updated`.

In the Chat section enter in again, `What is the weather in london?`, and press **Run** again.

### Check the response

You should see the updated tool response, and how it now contains the `unit` field. Congratulations, you've successfully linked a JSON Schema tool to your model config.

![](/docs/_fern-img/b9a8f93189a6c68b9ba82f3205447ab304eae409a297fdec7382fe430714a882.webp)

> **Linked JSON Schema tool changes propagate to saved model configs**
>
> When updating your organization-level JSON Schema tools, remember that the
> change will affect all the places you've previously linked the tool. Be
> careful when making updates to not inadvertently change something you didn't
> intend.