name, the
description and the json_schema, and those three decide whether the tool is
called at the right moment with the right values. Write them as prompt, not as
bookkeeping.
name
The function name the model is shown. It must match ^[a-zA-Z_][a-zA-Z0-9_]*$
and be unique in the workspace. Name the capability in snake_case:
book_appointment, not post_booking_v2.
These names are reserved for tools the platform injects, and creating or renaming
a tool to one returns 400 '<name>' is reserved by the platform:
voicemail_detected, submit_result, finish_without_result, get_faq_answers, lk_agents_cancel_task,
lk_agents_get_running_tasks.
description
The description tells the model when to call the tool, and when not to.
Name the conditions, the neighbouring tools it must not be confused with, and
any cost the caller will feel.
json_schema
The arguments the model fills in, as a JSON Schema object.
- Declare only values the caller can say or the agent can know. An internal UUID gets invented. Take the order number and look the id up in the tree.
- Give every property a
description: what goes in it, in what format, and how to get it from the conversation. - Require only what the tree cannot run without. The model invents a value for a required field rather than leave it out.
- Use
enumfor closed sets, sogold,Goldandgold tiercannot all reach your API. - Never take a credential as an argument. Read it from
{{secrets.NAME}}. Publish warns when anAuthorization,X-Api-Key,Api-KeyorCookieheader is built from{{args.…}}.
json_schema is
replaced whole.
What schemas are accepted
The schema is checked as JSON Schema Draft 2020-12, and the whole vocabulary is accepted:enum, minimum, pattern, format, items, nested
properties, $defs, anyOf.
A schema with no top-level
type is read as an object, so
{"properties": {...}, "required": [...]} is accepted. {} means no arguments.
{{args.NAME}}is checked against the top-levelpropertiesonly.{{args.address.city}}checks thataddressis declared.- The model’s arguments are validated against the schema before the tree runs. A
call that does not match never reaches your endpoints: the tool fails with
Tool arguments are invalid at <path>: <message>, which is what the model is handed.
Next
The operation tree
What runs once the model has called the tool.
Templating and data
Reading
{{args.…}} and moving values between operations.