Skip to main content
Create an API Request tool when an agent needs one request to a service you already run. You configure the endpoint, authentication, input schema, response, timeout, and failure behavior without writing code.

Prerequisites

  • An HTTPS endpoint that accepts the request method and JSON arguments you plan to use.
  • Any bearer or HMAC secret stored in your organization Vault.
  • Permission to manage organization tools.
1

Create the draft

Go to Global Tools, choose New tool, then select API Request. Enter a tool name and Instructions. Instructions maps to the API description field. Use a name made of letters, numbers, underscores, or dashes.
The New tool page with API Request highlighted

Select API Request from the New tool page

2

Configure the request

Set the literal HTTPS Request URL and choose the Method. The URL cannot contain credentials or a fragment.
The API Request tool editor with the Request URL field highlighted

Configure the request URL, method, and authorization

Choose None, Bearer, or HMAC authentication. Bearer and HMAC settings reference a Vault secret by its SCREAMING_SNAKE_CASE name. Do not add Authorization, X-Signature-256, Host, or other transport headers yourself.
3

Define the parameters

Parameters are values the model extracts from the conversation and passes to the tool. For example, a forecast tool can define a city parameter so the model passes the city mentioned by the caller.
Use Builder to add each parameter. Give it a clear name and description so the model knows which value to extract. Mark a parameter as required when the request cannot run without it.
The Parameters section of the API Request tool editor with Add parameter highlighted

Add the parameters supplied to the request

A GET request sends arguments as query parameters. Other methods send the arguments as the raw JSON request body. Tool-level header values are literals or Vault references.
The executor builds the query string from the tool’s parameters. Pass a fixed value like an API key as a parameter, and pin it with the attachment’s argument_overrides (or a parameter enum). A query string written into config.url is dropped, so keep the key in a parameter. When you test with /run, pass the value in sample_input.
4

Configure the response

Show the result to the model controls whether the result enters the conversation. Use Result instructions to tell the model how to interpret it.
The Response section of the API Request tool editor with Show the result to the model highlighted

Choose how the model receives the API response

5

Test and publish

Run the draft with representative inputs. Confirm the endpoint received the expected body and returned the expected JSON. You must complete a successful test for the current draft before publishing it.
6

Attach the published version

Attach the version to an agent. Set whether the model or a call event invokes it on the attachment, not on the tool draft.See Attach a tool to an agent.

Handle failures

A run can fail because the endpoint times out, returns an invalid response, or rejects authentication. Keep the timeout shorter than the maximum delay a caller should hear. Add a pre-action message on the attachment when a normal response can take several seconds. If the agent does not need the response, set wait_for_response to false. This also prevents the response from being shown to the LLM. See Tools API reference for the complete request and lifecycle endpoint contracts.