Expand description
Contains helper functions to simplify common tasks when building an MCP agent.
Functionsยง
- create_
content_ response - Creates a simple text-based response.
- create_
error_ response - Creates a response indicating an application-level error.
- create_
function_ response - Creates a response containing the result of a single function call.
- create_
streaming_ content_ chunk - Creates a streaming chunk containing a piece of text content.
- create_
streaming_ error_ chunk - Creates a streaming chunk indicating an application-level error.
- create_
streaming_ tool_ result_ chunk - Creates a streaming chunk containing the result of a single function call.
- create_
tool_ result - Creates a
ToolResultfrom a tool call ID and a serializable payload. - parse_
function_ args - Parses the JSON arguments from a
ToolCallinto a specific type.