POST /messages request:
| Field | Purpose |
|---|---|
tools | Which tools are allowed. |
tool_choice | How the assistant should choose tools (auto, force a specific tool, or none). |
tool_context | Optional context artifacts (documents or database connections). |
Prerequisites
- An API token. See Token Management.
- Your Zylon hostname (replace
{BASE_URL}in the examples).
Basic request and response
When you’re iterating on tool configuration, start withPOST /messages/validate to validate your request body without running a model.
This example enables the web fetch tool:
Example response
Example response
POST /messages.
Built-in tools
Zylon includes a set of built-in tools you can enable by name + type:| Tool type | What it does | Requires tool_context |
|---|---|---|
semantic_search_v1 | Search ingested artifacts | Yes (ingested_artifact) |
tabular_analysis_v1 | Analyze tabular artifacts | Yes (ingested_artifact) |
web_extract_v1 | Fetch and extract a URL mentioned in the message | No |
web_search_v1 | Search the web from a natural language query | No |
database_query_v1 | Query a SQL database from natural language | Yes (sql_database) |
Custom tools
Custom tools let you define your own tool interface using JSON Schema. When the assistant chooses your tool, it returns atool_use content block with structured input.
See: Custom tools
Common mistakes
- Using the wrong field name: tool schemas use
inputSchema(notinput_schema). - Missing tool context:
semantic_search_v1,tabular_analysis_v1, anddatabase_query_v1needtool_context. - Forgetting auth: include
Authorization: Bearer ...on every request.