Create a text response.
This is the most common response type for tool results.
The text content to return
Optional
Optional annotations and metadata
A CallToolResult with text content
// Simple text responsereturn text('Hello, World!');// With annotationsreturn text('Secret message', { annotations: { audience: ['user'] },}); Copy
// Simple text responsereturn text('Hello, World!');// With annotationsreturn text('Secret message', { annotations: { audience: ['user'] },});
Create a text response.
This is the most common response type for tool results.