Declaring a parameter
In the dashboard, each parameter has:
Parameters are validated against the schema you declared before your tool runs. A type
mismatch is rejected upstream and your handler is never invoked.
Code tools
Forcode tools, your function receives a single input object with one
field per declared parameter, keyed by the Name you typed in.
The entry point is fixed:
Type mapping (Code)
Notes
- Optional parameters may be
undefined(JS) / missing (Python). Use??or.get()to provide defaults. - Required parameters are guaranteed present — no need to null-check.
- You cannot rename
inputorctxin the signature. - There is no
{{name}}placeholder syntax — params do not get string-substituted into your code body. They arrive as runtime values oninput.
HTTP (API endpoint) tools
Forapi_endpoint tools, the parameters are serialized into the outbound HTTP
request. How they are serialized depends on the chosen Method.
GET — parameters become URL query string
Each declared parameter is appended toendpoint_url as a query parameter.
The key is the Name you typed; the value is stringified.
- Primitives (
string,number,integer,boolean) are converted withString(value). objectandarrayvalues are JSON-stringified into the query value.undefined/nullparameters are skipped entirely.- If your URL already contains a
?, additional params are appended with&.
POST / PUT / DELETE — parameters become JSON body
The fullinput object is sent as the request body, JSON-encoded.
Content-Type: application/json is set automatically unless you defined a
Content-Type header yourself.
code
tool — define your friendly parameter names on the tool, then translate them
into the shape the upstream API wants inside handle().
Custom headers
Headers you configure on the tool are sent verbatim. They do not see your parameters — headers cannot referenceinput.<name>. For per-call header
values (e.g. signing a request), use a code tool.
Type mapping (HTTP)
Choosing Code vs HTTP
- Use HTTP when the upstream API accepts your parameter names directly as query string or JSON body.
- Use Code when you need to transform parameters, sign requests, fan out to multiple endpoints, call other built-in tools, or apply business logic before responding.
See also
- Custom-tools
ctxreference — built-in tools accessible from your code. - Built-in tools — the catalog the LLM can call alongside yours.