Home / Function/ render_text_description() — langchain Function Reference

render_text_description() — langchain Function Reference

Architecture documentation for the render_text_description() function in render.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c3982c52_0088_6660_3c3e_13626debb129["render_text_description()"]
  f02b7602_69d7_9adf_ddea_892aea3802b0["render.py"]
  c3982c52_0088_6660_3c3e_13626debb129 -->|defined in| f02b7602_69d7_9adf_ddea_892aea3802b0
  style c3982c52_0088_6660_3c3e_13626debb129 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tools/render.py lines 13–38

def render_text_description(tools: list[BaseTool]) -> str:
    """Render the tool name and description in plain text.

    Args:
        tools: The tools to render.

    Returns:
        The rendered text.

    Output will be in the format of:

    ```txt
    search: This tool is used for search
    calculator: This tool is used for math
    ```
    """
    descriptions = []
    for tool in tools:
        if hasattr(tool, "func") and tool.func:
            sig = signature(tool.func)
            description = f"{tool.name}{sig} - {tool.description}"
        else:
            description = f"{tool.name} - {tool.description}"

        descriptions.append(description)
    return "\n".join(descriptions)

Subdomains

Frequently Asked Questions

What does render_text_description() do?
render_text_description() is a function in the langchain codebase, defined in libs/core/langchain_core/tools/render.py.
Where is render_text_description() defined?
render_text_description() is defined in libs/core/langchain_core/tools/render.py at line 13.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free