The response is what the logic will return when it’s executed. It can be a value, a message, a JSON object; almost anything you want. Responses can be returned from a variable, or manually defined in the response itself. Not all primitives support responses; see below.Documentation Index
Fetch the complete documentation index at: https://docs.xano.com/llms.txt
Use this file to discover all available pages before exploring further.
| Primitive | Supports Response | Notes |
|---|---|---|
| API | Yes | Returns the JSON object defined in the response block |
| AI Agent | No | Your agent will return messages to the user, but you don’t directly define the response like other primitives |
| Trigger | Yes | Returns the JSON object defined in the response block |
| Background Task | No | No responses are supported |
| Custom Function | Yes | Returns the JSON object defined in the response block |
| Middleware | Yes | Returns the JSON object defined in the response block |
| AI Tool | Yes | Returns the JSON object defined in the response block |
| MCP Server | No | Your tools will deliver messages back to the MCP client, but you don’t directly define a response like other primitives |
Adding a Response
Responses will usually come from a variable of some kind, but you can also manually define a static value, or use filters to create a combination of both. When building visually, Xano will automatically add a response of the first variable in the stack. For example, if you start by adding a Query All Records function, Xano will make sure that the response is the output of that function. Responses can be returned asself, meaning that it is not nested in another object.
Example of a self response
Example of a nested response
- Visually: Canvas View
- Visually: Function Stack
- XanoScript
Find your response block and choose Add a Response.
Give your response a name, and choose whether you want to return it as 

self or nested under another value.
