Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Display tool output to the user instead of sending it back to the LLM.

Usage

from upsonic.tools import tool

@tool(show_result=True)
def display_report(data: str) -> str:
    """
    Generate and display a report.

    Args:
        data: Data to include in report

    Returns:
        Formatted report
    """
    return f"=== REPORT ===\n{data}\n=============="

Parameters

  • show_result (bool): If True, displays output to user and doesn’t send to LLM