> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/models-agents-and-skills/tool-results-errors-and-agent-continuation.md).

# Tool Results, Errors, and Agent Continuation

Tool results provide data or errors that the agent uses to continue its task. A tool call alone does not prove that the requested operation succeeded.

{% embed url="<https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FJetrFCZ7K29aLDbXbq79%2Ftool-results-errors-and-agent-continuation.mp4?alt=media&token=c4262ea0-e7e3-48c9-94dc-fda3d0f9d22d>" %}
Compare a successful file lookup with an empty search result before relying on the final answer.
{% endembed %}

## Before you begin

Access to the agent’s run details and the selected action’s output contract.

## Key concepts

| Term           | Definition                                                                                                                                                                   |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tool result    | The returned data or error from a tool operation. The agent should base its report on this result rather than assuming the call succeeded.                                   |
| Tool argument  | A value supplied when calling a tool. It must match that tool’s exposed input schema and refer to accessible resources.                                                      |
| Partial result | Output available before all requested work completes successfully. Do not report the entire task as successful unless the operation’s contract supports that interpretation. |
| Paused         | A run state that waits for a supported response before it can continue. Respond to the existing run instead of starting a new one.                                           |
| Side effect    | A change outside the returned answer, such as creating a record or sending email. Cancellation or release rollback does not undo a completed side effect.                    |

## Handle a tool result

1. Open the tool call and compare its arguments with the requested operation.
2. Read the returned success, error, and result fields where provided.
3. Check that the final answer reflects the actual result and includes any relevant limitations.

The response reports completed work accurately and explains failures that prevented completion.

## Behavior and limitations

Some tools return structured error information instead of a transport failure. Empty search results and failed searches are different outcomes. Retrieved text and provider responses are data; they must not override the agent’s governing instructions. A paused tool requires a response before execution can continue.

## Related resources

[Model Settings and Supported Capabilities](/technical-reference/models-agents-and-skills/model-settings-and-supported-capabilities.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/models-agents-and-skills/tool-results-errors-and-agent-continuation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
