![]() |
ezEngine Release 26.9
|
The result of one tool call. More...
#include <McpTool.h>
Public Member Functions | |
| void | SetError (ezStringView sMessage) |
Public Attributes | |
| ezStringBuilder | m_sText |
| bool | m_bIsError = false |
| If true, the client is told the call failed. The text should then say why. | |
| bool | m_bNotFinished = false |
| Set this to have the call re-run later instead of answered now. | |
The result of one tool call.
| bool ezMcpToolResult::m_bNotFinished = false |
Set this to have the call re-run later instead of answered now.
For a tool that has to wait for the host to make progress - most obviously 'run for N frames', which cannot happen while the tool itself is holding the main thread. Setting this leaves the client waiting on its connection and re-enters the tool with the same arguments the next time the host pumps, until a call finally leaves it false.
The tool therefore has to keep its own 'where was I' state across those calls, and has to give up on its own after a timeout: a host that stops pumping is indistinguishable from one that is still working, and a wait that never ends looks exactly like a hang.
Only meaningful in a host that pumps repeatedly. m_sText is ignored while this is true.
| ezStringBuilder ezMcpToolResult::m_sText |
The text handed back to the client. For structured data just write JSON in here - MCP has no separate typed result, everything is text content.