Files
langflow/components-tools.html
github-merge-queue[bot] 3d9d4bfb23 deploy: 6582f06a21
2025-05-30 17:30:03 +00:00

210 lines
67 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-Components/components-tools" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.7.0">
<title data-rh="true">Tools | Langflow Documentation</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.langflow.org/components-tools"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Tools | Langflow Documentation"><meta data-rh="true" name="description" content="Tools are typically connected to agent components at the Tools port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem."><meta data-rh="true" property="og:description" content="Tools are typically connected to agent components at the Tools port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.langflow.org/components-tools"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-tools" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-tools" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://UZK6BDPCVY-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLQFLQ3KPT"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SLQFLQ3KPT",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Langflow Documentation" href="/opensearch.xml">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&amp;display=swap">
<script>!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/datastax/langflow_org_web/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}()</script>
<script defer="true">!function(){const e=e=>{if(window.gtag&&e.purposes&&"analytics"in e.purposes&&"targeted_advertising"in e.purposes){const n=!0===e.purposes.analytics?"granted":"denied",t=!0===e.purposes.targeted_advertising?"granted":"denied",a={analytics_storage:n,ad_personalization:t,ad_storage:t,ad_user_data:t};window.gtag("consent","update",a)}};window.ketch&&window.ketch("on","consent",e)}()</script><link rel="stylesheet" href="/assets/css/styles.cf9a4109.css">
<script src="/assets/js/runtime~main.554fb4e2.js" defer="defer"></script>
<script src="/assets/js/main.89f82bb0.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();null!==e?t(e):window.matchMedia("(prefers-color-scheme: dark)").matches?t("dark"):(window.matchMedia("(prefers-color-scheme: light)").matches,t("light"))}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/langflow-logo-black.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/langflow-logo-white.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/langflow-ai/langflow" target="_blank" class="navbar__item navbar__link header-github-link"></a><a href="https://twitter.com/langflow_ai" target="_blank" class="navbar__item navbar__link header-twitter-link"></a><a href="https://discord.gg/EqksyE2EX9" target="_blank" class="navbar__item navbar__link header-discord-link"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite" aria-pressed="false"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd sidebarWithHideableNavbar_wUlq"><a tabindex="-1" class="sidebarLogo_isFc" href="/"><img src="/img/langflow-logo-black.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/langflow-logo-white.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></a><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">Welcome to Langflow</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/get-started-installation">Get started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/starter-projects-basic-prompting">Starter projects</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/blog-writer">Sample flows</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-overview">Concepts</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/components-agents">Components</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-agents">Agents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-bundle-components">Bundles</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-custom-components">Create custom Python components</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-data">Data</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-embedding-models">Embeddings</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-helpers">Helpers</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-io">Inputs and outputs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-logic">Logic</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-memories">Memories</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-models">Models</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-processing">Processing</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-prompts">Prompts</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/components-tools">Tools</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-vector-stores">Vector stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/agents-overview">Agents</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/configuration-api-keys">Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/develop-overview">Develop</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deployment-overview">Deployment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/integrations-apify">Integrations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/contributing-community">Contributing</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a href="https://github.com/langflow-ai/langflow/releases/latest" target="_blank" rel="noopener noreferrer" class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false">Changelog</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/luna-for-langflow">Support</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 sidebar-ad">
<a href="https://astra.datastax.com/signup?type=langflow" target="_blank" class="menu__link">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></svg>
<div class="sidebar-ad-text-container">
<span class="sidebar-ad-text">Use Langflow in the cloud</span>
<span class="sidebar-ad-text sidebar-ad-text-gradient">Sign up for DataStax Langflow</span>
</div>
</a>
</li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Components</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Tools</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><style>[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }</style>
<!-- -->
<header><h1>Tool components in Langflow</h1></header>
<p>Tools are typically connected to agent components at the <strong>Tools</strong> port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem.</p>
<p>Tools in agentic functions are, essentially, functions that the agent can call to perform tasks or access external resources.
A function is wrapped as a <code>Tool</code> object, with a common interface the agent understands.
Agents become aware of tools through tool registration, where the agent is provided a list of available tools, typically at agent initialization. The <code>Tool</code> object&#x27;s description tells the agent what the tool can do.</p>
<p>The agent then uses a connected LLM to reason through the problem to decide which tool is best for the job.</p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="use-a-tool-in-a-flow">Use a tool in a flow<a href="#use-a-tool-in-a-flow" class="hash-link" aria-label="Direct link to Use a tool in a flow" title="Direct link to Use a tool in a flow"></a></h2>
<p>Tools are typically connected to agent components at the <strong>Tools</strong> port.</p>
<p>The <a href="/starter-projects-simple-agent">simple agent starter project</a> uses URL and Calculator tools connected to an <a href="/components-agents#agent-component">agent component</a> to answer a user&#x27;s questions. The OpenAI LLM acts as a brain for the agent to decide which tool to use.</p>
<p><img decoding="async" loading="lazy" alt="Simple agent starter flow" src="/assets/images/starter-flow-simple-agent-71d0dec218a5da8e3110c51716f1c91e.png" width="1732" height="1748" class="img_ev3q"></p>
<p>To make a component into a tool that an agent can use, enable <strong>Tool mode</strong> in the component. Enabling <strong>Tool mode</strong> modifies a component input to accept calls from an agent.
If the component you want to connect to an agent doesn&#x27;t have a <strong>Tool mode</strong> option, you can modify the component&#x27;s inputs to become a tool.
For an example, see <a href="/agents-tool-calling-agent-component#make-any-component-a-tool">Make any component a tool</a>.</p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="arxiv">arXiv<a href="#arxiv" class="hash-link" aria-label="Direct link to arXiv" title="Direct link to arXiv"></a></h2>
<p>This component searches and retrieves papers from <a href="https://arXiv.org" target="_blank" rel="noopener noreferrer">arXiv.org</a>.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>search_query</td><td>String</td><td>The search query for arXiv papers. For example, <code>quantum computing</code>.</td></tr><tr><td>search_type</td><td>String</td><td>The field to search in.</td></tr><tr><td>max_results</td><td>Integer</td><td>The maximum number of results to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>papers</td><td>List[Data]</td><td>A list of retrieved arXiv papers.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="astra-db-tool">Astra DB tool<a href="#astra-db-tool" class="hash-link" aria-label="Direct link to Astra DB tool" title="Direct link to Astra DB tool"></a></h2>
<p>This component allows agents to query data from Astra DB collections.</p>
<p>To use this tool in a flow, connect it to an <strong>Agent</strong> component.
The flow looks like this:</p>
<p><img decoding="async" loading="lazy" alt="Astra DB JSON tool connected to an Agent" src="/assets/images/component-astra-db-json-tool-117aff566c0df01a555264bb128b3693.png" width="4000" height="2742" class="img_ev3q"></p>
<p>The <strong>Tool Name</strong> and <strong>Tool Description</strong> fields are required for the Agent to decide when to use the tool.
<strong>Tool Name</strong> cannot contain spaces.</p>
<p>The values for <strong>Collection Name</strong>, <strong>Astra DB Application Token</strong>, and <strong>Astra DB API Endpoint</strong> are found in your Astra DB deployment. For more information, see the <a href="https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html" target="_blank" rel="noopener noreferrer">DataStax documentation</a>.</p>
<p>In this example, an <strong>OpenAI</strong> embeddings component is connected to use the Astra DB tool component&#x27;s <strong>Semantic Search</strong> capability.
To use <strong>Semantic Search</strong>, you must have an embedding model or Astra DB Vectorize enabled.
If you try to run the flow without an embedding model, you will get an error.</p>
<p>Open the <strong>Playground</strong> and ask a question about your data.
The Agent uses the <strong>Astra DB Tool</strong> to return information about your collection.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="define-astra-db-tool-parameters">Define Astra DB tool parameters<a href="#define-astra-db-tool-parameters" class="hash-link" aria-label="Direct link to Define Astra DB tool parameters" title="Direct link to Define Astra DB tool parameters"></a></h3>
<p>The <strong>Tool Parameters</strong> configuration pane allows you to define parameters for <a href="https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters" target="_blank" rel="noopener noreferrer">filter conditions</a> for the component&#x27;s <strong>Find</strong> command.</p>
<p>These filters become available as parameters that the LLM can use when calling the tool, with a better understanding of each parameter provided by the <strong>Description</strong> field.</p>
<ol>
<li>To define a parameter for your query, in the <strong>Tool Parameters</strong> pane, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus" aria-label="Add"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>.</li>
<li>Complete the fields based on your data. For example, with this filter, the LLM can filter by unique <code>customer_id</code> values.</li>
</ol>
<ul>
<li>Name: <code>customer_id</code></li>
<li>Attribute Name: Leave empty if the attribute matches the field name in the database.</li>
<li>Description: <code>&quot;The unique identifier of the customer to filter by&quot;</code>.</li>
<li>Is Metadata: <code>False</code> unless the value stored in the metadata field.</li>
<li>Is Mandatory: <code>True</code> to require this filter.</li>
<li>Is Timestamp: <code>False</code> since the value is an ID, not a timestamp.</li>
<li>Operator: <code>$eq</code> to look for an exact match.</li>
</ul>
<p>If you want to apply filters regardless of the LLM&#x27;s input, use the <strong>Static Filters</strong> option, which is available in the component&#x27;s <strong>Controls</strong> pane.</p>
<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>The name of the parameter that is exposed to the LLM. It can be the same as the underlying field name or a more descriptive label. The LLM uses this name, along with the description, to infer what value to provide during execution.</td></tr><tr><td>Attribute Name</td><td>When the parameter name shown to the LLM differs from the actual field or property in the database, use this setting to map the user-facing name to the correct attribute. For example, to apply a range filter to the timestamp field, define two separate parameters, such as <code>start_date</code> and <code>end_date</code>, that both reference the same timestamp attribute.</td></tr><tr><td>Description</td><td>Provides instructions to the LLM on how the parameter should be used. Clear and specific guidance helps the LLM provide valid input. For example, if a field such as <code>specialty</code> is stored in lowercase, the description should indicate that the input must be lowercase.</td></tr><tr><td>Is Metadata</td><td>When loading data using LangChain or Langflow, additional attributes may be stored under a metadata object. If the target attribute is stored this way, enable this option. It adjusts the query by generating a filter in the format: <code>{&quot;metadata.&lt;attribute_name&gt;&quot;: &quot;&lt;value&gt;&quot;}</code></td></tr><tr><td>Is Timestamp</td><td>For date or time-based filters, enable this option to automatically convert values to the timestamp format that the Astrapy client expects. This ensures compatibility with the underlying API without requiring manual formatting.</td></tr><tr><td>Operator</td><td>Defines the filtering logic applied to the attribute. You can use any valid <a href="https://docs.datastax.com/en/astra-db-serverless/api-reference/filter-operator-collections.html" target="_blank" rel="noopener noreferrer">Data API filter operator</a>. For example, to filter a time range on the timestamp attribute, use two parameters: one with the <code>$gt</code> operator for &quot;greater than&quot;, and another with the <code>$lt</code> operator for &quot;less than&quot;.</td></tr></tbody></table>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Tool Name</td><td>String</td><td>The name used to reference the tool in the agent&#x27;s prompt.</td></tr><tr><td>Tool Description</td><td>String</td><td>A brief description of the tool. This helps the model decide when to use it.</td></tr><tr><td>Collection Name</td><td>String</td><td>The name of the Astra DB collection to query.</td></tr><tr><td>Token</td><td>SecretString</td><td>The authentication token for accessing Astra DB.</td></tr><tr><td>API Endpoint</td><td>String</td><td>The Astra DB API endpoint.</td></tr><tr><td>Projection Fields</td><td>String</td><td>The attributes to return, separated by commas. The default is <code>*</code>.</td></tr><tr><td>Tool Parameters</td><td>Dict</td><td>Parameters the model needs to fill to execute the tool. For required parameters, use an exclamation mark, for example <code>!customer_id</code>.</td></tr><tr><td>Static Filters</td><td>Dict</td><td>Attribute-value pairs used to filter query results.</td></tr><tr><td>Limit</td><td>String</td><td>The number of documents to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><p>The <strong>Data</strong> output is used when directly querying Astra DB, while the <strong>Tool</strong> output is used when integrating with agents.</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Data</td><td>List[Data]</td><td>A list of <a href="/concepts-objects">Data</a> objects containing the query results from Astra DB. Each <code>Data</code> object contains the document fields specified by the projection attributes. Limited by the <code>number_of_results</code> parameter.</td></tr><tr><td>Tool</td><td>StructuredTool</td><td>A LangChain <code>StructuredTool</code> object that can be used in agent workflows. Contains the tool name, description, argument schema based on tool parameters, and the query function.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="astra-db-cql-tool">Astra DB CQL Tool<a href="#astra-db-cql-tool" class="hash-link" aria-label="Direct link to Astra DB CQL Tool" title="Direct link to Astra DB CQL Tool"></a></h2>
<p>The <code>Astra DB CQL Tool</code> allows agents to query data from CQL tables in Astra DB.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Tool Name</td><td>String</td><td>The name used to reference the tool in the agent&#x27;s prompt.</td></tr><tr><td>Tool Description</td><td>String</td><td>A brief description of the tool to guide the model in using it.</td></tr><tr><td>Keyspace</td><td>String</td><td>The name of the keyspace.</td></tr><tr><td>Table Name</td><td>String</td><td>The name of the Astra DB CQL table to query.</td></tr><tr><td>Token</td><td>SecretString</td><td>The authentication token for Astra DB.</td></tr><tr><td>API Endpoint</td><td>String</td><td>The Astra DB API endpoint.</td></tr><tr><td>Projection Fields</td><td>String</td><td>The attributes to return, separated by commas. Default: &quot;*&quot;.</td></tr><tr><td>Partition Keys</td><td>Dict</td><td>Required parameters that the model must fill to query the tool.</td></tr><tr><td>Clustering Keys</td><td>Dict</td><td>Optional parameters the model can fill to refine the query. Required parameters should be marked with an exclamation mark, for example, <code>!customer_id</code>.</td></tr><tr><td>Static Filters</td><td>Dict</td><td>Attribute-value pairs used to filter query results.</td></tr><tr><td>Limit</td><td>String</td><td>The number of records to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Data</td><td>List[Data]</td><td>A list of <a href="/concepts-objects">Data</a> objects containing the query results from the Astra DB CQL table. Each Data object contains the document fields specified by the projection fields. Limited by the <code>number_of_results</code> parameter.</td></tr><tr><td>Tool</td><td>StructuredTool</td><td>A LangChain StructuredTool object that can be used in agent workflows. Contains the tool name, description, argument schema based on partition and clustering keys, and the query function.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="bing-search-api">Bing Search API<a href="#bing-search-api" class="hash-link" aria-label="Direct link to Bing Search API" title="Direct link to Bing Search API"></a></h2>
<p>This component allows you to call the Bing Search API.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>bing_subscription_key</td><td>SecretString</td><td>A Bing API subscription key.</td></tr><tr><td>input_value</td><td>String</td><td>The search query input.</td></tr><tr><td>bing_search_url</td><td>String</td><td>A custom Bing Search URL.</td></tr><tr><td>k</td><td>Integer</td><td>The number of search results to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>results</td><td>List[Data]</td><td>A list of search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Bing Search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="combinatorial-reasoner">Combinatorial Reasoner<a href="#combinatorial-reasoner" class="hash-link" aria-label="Direct link to Combinatorial Reasoner" title="Direct link to Combinatorial Reasoner"></a></h2>
<p>This component runs Icosa&#x27;s Combinatorial Reasoning (CR) pipeline on an input to create an optimized prompt with embedded reasons. For more information, see <a href="https://www.icosacomputing.com/" target="_blank" rel="noopener noreferrer">Icosa computing</a>.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>prompt</td><td>String</td><td>The input to run CR on.</td></tr><tr><td>openai_api_key</td><td>SecretString</td><td>An OpenAI API key for authentication.</td></tr><tr><td>username</td><td>String</td><td>A username for Icosa API authentication.</td></tr><tr><td>password</td><td>SecretString</td><td>A password for Icosa API authentication.</td></tr><tr><td>model_name</td><td>String</td><td>The OpenAI LLM to use for reason generation.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>optimized_prompt</td><td>Message</td><td>A message object containing the optimized prompt.</td></tr><tr><td>reasons</td><td>List[String]</td><td>A list of the selected reasons that are embedded in the optimized prompt.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="duckduckgo-search">DuckDuckGo search<a href="#duckduckgo-search" class="hash-link" aria-label="Direct link to DuckDuckGo search" title="Direct link to DuckDuckGo search"></a></h2>
<p>This component performs web searches using the <a href="https://www.duckduckgo.com" target="_blank" rel="noopener noreferrer">DuckDuckGo</a> search engine with result-limiting capabilities.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>input_value</td><td>String</td><td>The search query to execute with DuckDuckGo.</td></tr><tr><td>max_results</td><td>Integer</td><td>The maximum number of search results to return. Default: 5.</td></tr><tr><td>max_snippet_length</td><td>Integer</td><td>The maximum length of each result snippet. Default: 100.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>List[Data]</td><td>A list of search results as Data objects containing snippets and full content.</td></tr><tr><td>text</td><td>String</td><td>The search results formatted as a single text string.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="exa-search">Exa Search<a href="#exa-search" class="hash-link" aria-label="Direct link to Exa Search" title="Direct link to Exa Search"></a></h2>
<p>This component provides an <a href="https://exa.ai/" target="_blank" rel="noopener noreferrer">Exa Search</a> toolkit for search and content retrieval.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>metaphor_api_key</td><td>SecretString</td><td>An API key for Exa Search.</td></tr><tr><td>use_autoprompt</td><td>Boolean</td><td>Whether to use the autoprompt feature. Default: true.</td></tr><tr><td>search_num_results</td><td>Integer</td><td>The number of results to return for search. Default: 5.</td></tr><tr><td>similar_num_results</td><td>Integer</td><td>The number of similar results to return. Default: 5.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tools</td><td>List[Tool]</td><td>A list of search tools provided by the toolkit.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="glean-search-api">Glean Search API<a href="#glean-search-api" class="hash-link" aria-label="Direct link to Glean Search API" title="Direct link to Glean Search API"></a></h2>
<p>This component allows you to call the Glean Search API.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>glean_api_url</td><td>String</td><td>The URL of the Glean API.</td></tr><tr><td>glean_access_token</td><td>SecretString</td><td>An access token for Glean API authentication.</td></tr><tr><td>query</td><td>String</td><td>The search query input.</td></tr><tr><td>page_size</td><td>Integer</td><td>The number of results per page. Default: 10.</td></tr><tr><td>request_options</td><td>Dict</td><td>Additional options for the API request.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>results</td><td>List[Data]</td><td>A list of search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Glean Search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="google-serper-api">Google Serper API<a href="#google-serper-api" class="hash-link" aria-label="Direct link to Google Serper API" title="Direct link to Google Serper API"></a></h2>
<p>This component allows you to call the Serper.dev Google Search API.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>serper_api_key</td><td>SecretString</td><td>An API key for Serper.dev authentication.</td></tr><tr><td>input_value</td><td>String</td><td>The search query input.</td></tr><tr><td>k</td><td>Integer</td><td>The number of search results to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>results</td><td>List[Data]</td><td>A list of search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Google Serper search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mcp-connection">MCP connection<a href="#mcp-connection" class="hash-link" aria-label="Direct link to MCP connection" title="Direct link to MCP connection"></a></h2>
<p>The <strong>MCP connection</strong> component connects to a <a href="https://modelcontextprotocol.io/introduction" target="_blank" rel="noopener noreferrer">Model Context Protocol (MCP)</a> server and exposes the MCP server&#x27;s tools as tools for Langflow agents.</p>
<p>In addition to being an MCP client that can leverage MCP servers, the <strong>MCP connection</strong> component&#x27;s <a href="#mcp-sse-mode">SSE mode</a> allows you to connect your flow to the Langflow MCP server at the <code>/api/v1/mcp/sse</code> API endpoint, exposing all flows within your <a href="/concepts-overview#projects">project</a> as tools within a flow.</p>
<p>To use the <strong>MCP connection</strong> component with an agent component, follow these steps:</p>
<ol>
<li>
<p>Add the <strong>MCP connection</strong> component to your workflow.</p>
</li>
<li>
<p>In the <strong>MCP connection</strong> component, in the <strong>MCP Command</strong> field, enter the command to start your MCP server. For example, to start a <a href="https://github.com/modelcontextprotocol/servers/tree/main/src/fetch" target="_blank" rel="noopener noreferrer">Fetch</a> server, the command is:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uvx mcp-server-fetch</span></div></div><br></code></div></div>
<p><code>uvx</code> is included with <code>uv</code> in the Langflow package.
To use <code>npx</code> server commands, you must first install an LTS release of <a href="https://docs.npmjs.com/downloading-and-installing-node-js-and-npm" target="_blank" rel="noopener noreferrer">Node.js</a>.
For an example of starting <code>npx</code> MCP servers, see <a href="/mcp-component-astra">Connect an Astra DB MCP server to Langflow</a>.</p>
<p>To include environment variables with your server command, add them to the <strong>Env</strong> field like this:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>ASTRA_DB_APPLICATION_TOKEN=AstraCS:...</span></div></div><br></code></div></div>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>Langflow passes environment variables from the <code>.env</code> file to MCP, but not global variables declared in the UI.
To add a value for an environment variable as a global variable, add it to Langflow&#x27;s <code>.env</code> file at startup.
For more information, see <a href="/configuration-global-variables">global variables</a>.</p></div></div>
</li>
<li>
<p>Click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw" aria-label="Refresh"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg> to get the server&#x27;s list of <strong>Tools</strong>.</p>
</li>
<li>
<p>In the <strong>Tool</strong> field, select the server tool you want the component to use.
The available fields change based on the selected tool.
For information on the parameters, see the MCP server&#x27;s documentation.</p>
</li>
<li>
<p>In the <strong>MCP connection</strong> component, enable <strong>Tool mode</strong>.
Connect the <strong>MCP connection</strong> component&#x27;s <strong>Toolset</strong> port to an <strong>Agent</strong> component&#x27;s <strong>Tools</strong> port.</p>
<p>The flow looks similar to this:
<img decoding="async" loading="lazy" alt="MCP connection component" src="/assets/images/component-mcp-stdio-636cfeb73567d12b0a0761c8738cad17.png" width="4000" height="2354" class="img_ev3q"></p>
</li>
<li>
<p>Open the <strong>Playground</strong>.
Ask the agent to summarize recent tech news. The agent calls the MCP server function <code>fetch</code> and returns the summary.
This confirms the MCP server is connected, and its tools are being used in Langflow.</p>
</li>
</ol>
<p>For more information, see <a href="/mcp-server">MCP server</a>.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mcp-sse-mode">MCP Server-Sent Events (SSE) mode<a href="#mcp-sse-mode" class="hash-link" aria-label="Direct link to MCP Server-Sent Events (SSE) mode" title="Direct link to MCP Server-Sent Events (SSE) mode"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>If you&#x27;re using <strong>Langflow for Desktop</strong>, the default address is <code>http://127.0.0.1:7868/</code>.</p></div></div>
<p>The MCP component&#x27;s SSE mode connects your flow to the Langflow MCP server through the component.
This allows you to use all flows within your <a href="/concepts-overview#projects">project</a> as tools within a flow.</p>
<ol>
<li>In the <strong>MCP connection</strong> component, select <strong>SSE</strong>.
A default address appears in the <strong>MCP SSE URL</strong> field.</li>
<li>In the <strong>MCP SSE URL</strong> field, modify the default address to point at the SSE endpoint of the Langflow server you&#x27;re currently running.
The default value is <code>http://localhost:7860/api/v1/mcp/sse</code>.</li>
<li>In the <strong>MCP connection</strong> component, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw" aria-label="Refresh"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg> to retrieve the server&#x27;s list of <strong>Tools</strong>.</li>
<li>Click the <strong>Tools</strong> field.
All of your flows are listed as tools.</li>
<li>Enable <strong>Tool Mode</strong>, and then connect the <strong>MCP connection</strong> component to an agent component&#x27;s tool port.
The flow looks like this:
<img decoding="async" loading="lazy" alt="MCP component with SSE mode enabled" src="/assets/images/component-mcp-sse-mode-a9f0716d810589ea26be2805bc4ec9dd.png" width="4000" height="2348" class="img_ev3q"></li>
<li>Open the <strong>Playground</strong> and chat with your tool.
The agent chooses the correct tool based on your query.</li>
</ol>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>command</td><td>String</td><td>The MCP command. Default: <code>uvx mcp-sse-shim@latest</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tools</td><td>List[Tool]</td><td>A list of tools exposed by the MCP server.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="wikidata">Wikidata<a href="#wikidata" class="hash-link" aria-label="Direct link to Wikidata" title="Direct link to Wikidata"></a></h2>
<p>This component performs a search using the Wikidata API.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>query</td><td>String</td><td>The text query for similarity search on Wikidata.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>List[Data]</td><td>The search results from Wikidata API as a list of Data objects.</td></tr><tr><td>text</td><td>Message</td><td>The search results formatted as a text message.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="legacy-components">Legacy components<a href="#legacy-components" class="hash-link" aria-label="Direct link to Legacy components" title="Direct link to Legacy components"></a></h2>
<p>Legacy components are available for use but are no longer supported.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="calculator-tool">Calculator Tool<a href="#calculator-tool" class="hash-link" aria-label="Direct link to Calculator Tool" title="Direct link to Calculator Tool"></a></h3>
<p>This component allows you to evaluate basic arithmetic expressions. It supports addition, subtraction, multiplication, division, and exponentiation.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>expression</td><td>String</td><td>The arithmetic expression to evaluate. For example, <code>4*4*(33/22)+12-20</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>result</td><td>Tool</td><td>A calculator tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="google-search-api">Google Search API<a href="#google-search-api" class="hash-link" aria-label="Direct link to Google Search API" title="Direct link to Google Search API"></a></h3>
<p>This component allows you to call the Google Search API.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>google_api_key</td><td>SecretString</td><td>A Google API key for authentication.</td></tr><tr><td>google_cse_id</td><td>SecretString</td><td>A Google Custom Search Engine ID.</td></tr><tr><td>input_value</td><td>String</td><td>The search query input.</td></tr><tr><td>k</td><td>Integer</td><td>The number of search results to return.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>results</td><td>List[Data]</td><td>A list of search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Google Search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="python-code-structured-tool">Python Code Structured Tool<a href="#python-code-structured-tool" class="hash-link" aria-label="Direct link to Python Code Structured Tool" title="Direct link to Python Code Structured Tool"></a></h3>
<p>This component creates a structured tool from Python code using a dataclass.</p>
<p>The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tool_code</td><td>String</td><td>The Python code for the tool&#x27;s dataclass.</td></tr><tr><td>tool_name</td><td>String</td><td>The name of the tool.</td></tr><tr><td>tool_description</td><td>String</td><td>The description of the tool.</td></tr><tr><td>return_direct</td><td>Boolean</td><td>Whether to return the function output directly.</td></tr><tr><td>tool_function</td><td>String</td><td>The selected function for the tool.</td></tr><tr><td>global_variables</td><td>Dict</td><td>Global variables or data for the tool.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>result_tool</td><td>Tool</td><td>A structured tool created from the Python code.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="python-repl-tool">Python REPL Tool<a href="#python-repl-tool" class="hash-link" aria-label="Direct link to Python REPL Tool" title="Direct link to Python REPL Tool"></a></h3>
<p>This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>The name of the tool. Default: <code>python_repl</code>.</td></tr><tr><td>description</td><td>String</td><td>A description of the tool&#x27;s functionality.</td></tr><tr><td>global_imports</td><td>List[String]</td><td>A list of modules to import globally. Default: <code>math</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tool</td><td>Tool</td><td>A Python REPL tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="retriever-tool">Retriever Tool<a href="#retriever-tool" class="hash-link" aria-label="Direct link to Retriever Tool" title="Direct link to Retriever Tool"></a></h3>
<p>This component creates a tool for interacting with a retriever in LangChain.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>retriever</td><td>BaseRetriever</td><td>The retriever to interact with.</td></tr><tr><td>name</td><td>String</td><td>The name of the tool.</td></tr><tr><td>description</td><td>String</td><td>A description of the tool&#x27;s functionality.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tool</td><td>Tool</td><td>A retriever tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="search-api">Search API<a href="#search-api" class="hash-link" aria-label="Direct link to Search API" title="Direct link to Search API"></a></h3>
<p>This component calls the <code>searchapi.io</code> API. It can be used to search the web for information.</p>
<p>For more information, see the <a href="https://www.searchapi.io/docs/google" target="_blank" rel="noopener noreferrer">SearchAPI documentation</a>.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>engine</td><td>String</td><td>The search engine to use. Default: <code>google</code>.</td></tr><tr><td>api_key</td><td>SecretString</td><td>The API key for authenticating with SearchAPI.</td></tr><tr><td>input_value</td><td>String</td><td>The search query or input for the API call.</td></tr><tr><td>search_params</td><td>Dict</td><td>Additional parameters for customizing the search.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>List[Data]</td><td>A list of Data objects containing search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Tool object for use in LangChain workflows.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="searxng-search-tool">SearXNG Search Tool<a href="#searxng-search-tool" class="hash-link" aria-label="Direct link to SearXNG Search Tool" title="Direct link to SearXNG Search Tool"></a></h3>
<p>This component creates a tool for searching using SearXNG, a metasearch engine.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>url</td><td>String</td><td>The URL of the SearXNG instance.</td></tr><tr><td>max_results</td><td>Integer</td><td>The maximum number of results to return.</td></tr><tr><td>categories</td><td>List[String]</td><td>The categories to search in.</td></tr><tr><td>language</td><td>String</td><td>The language for the search results.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>result_tool</td><td>Tool</td><td>A SearXNG search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="wikipedia-api">Wikipedia API<a href="#wikipedia-api" class="hash-link" aria-label="Direct link to Wikipedia API" title="Direct link to Wikipedia API"></a></h3>
<p>This component creates a tool for searching and retrieving information from Wikipedia.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>input_value</td><td>String</td><td>The search query input.</td></tr><tr><td>lang</td><td>String</td><td>The language code for Wikipedia. Default: <code>en</code>.</td></tr><tr><td>k</td><td>Integer</td><td>The number of results to return.</td></tr><tr><td>load_all_available_meta</td><td>Boolean</td><td>Whether to load all available metadata.</td></tr><tr><td>doc_content_chars_max</td><td>Integer</td><td>The maximum number of characters for document content.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>results</td><td>List[Data]</td><td>A list of Wikipedia search results.</td></tr><tr><td>tool</td><td>Tool</td><td>A Wikipedia search tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="deprecated-components">Deprecated components<a href="#deprecated-components" class="hash-link" aria-label="Direct link to Deprecated components" title="Direct link to Deprecated components"></a></h2>
<p>Deprecated components have been replaced by newer alternatives and should not be used in new projects.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mcp-tools-stdio">MCP Tools (stdio)<a href="#mcp-tools-stdio" class="hash-link" aria-label="Direct link to MCP Tools (stdio)" title="Direct link to MCP Tools (stdio)"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.3.
Instead, use the <a href="/components-tools#mcp-connection">MCP connection component</a></p></div></div>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mcp-tools-sse">MCP Tools (SSE)<a href="#mcp-tools-sse" class="hash-link" aria-label="Direct link to MCP Tools (SSE)" title="Direct link to MCP Tools (SSE)"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.3.
Instead, use the <a href="/components-tools#mcp-connection">MCP connection component</a></p></div></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/components-prompts"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Prompts</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/components-vector-stores"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Vector stores</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#use-a-tool-in-a-flow" class="table-of-contents__link toc-highlight">Use a tool in a flow</a></li><li><a href="#arxiv" class="table-of-contents__link toc-highlight">arXiv</a></li><li><a href="#astra-db-tool" class="table-of-contents__link toc-highlight">Astra DB tool</a><ul><li><a href="#define-astra-db-tool-parameters" class="table-of-contents__link toc-highlight">Define Astra DB tool parameters</a></li></ul></li><li><a href="#astra-db-cql-tool" class="table-of-contents__link toc-highlight">Astra DB CQL Tool</a></li><li><a href="#bing-search-api" class="table-of-contents__link toc-highlight">Bing Search API</a></li><li><a href="#combinatorial-reasoner" class="table-of-contents__link toc-highlight">Combinatorial Reasoner</a></li><li><a href="#duckduckgo-search" class="table-of-contents__link toc-highlight">DuckDuckGo search</a></li><li><a href="#exa-search" class="table-of-contents__link toc-highlight">Exa Search</a></li><li><a href="#glean-search-api" class="table-of-contents__link toc-highlight">Glean Search API</a></li><li><a href="#google-serper-api" class="table-of-contents__link toc-highlight">Google Serper API</a></li><li><a href="#mcp-connection" class="table-of-contents__link toc-highlight">MCP connection</a><ul><li><a href="#mcp-sse-mode" class="table-of-contents__link toc-highlight">MCP Server-Sent Events (SSE) mode</a></li></ul></li><li><a href="#wikidata" class="table-of-contents__link toc-highlight">Wikidata</a></li><li><a href="#legacy-components" class="table-of-contents__link toc-highlight">Legacy components</a><ul><li><a href="#calculator-tool" class="table-of-contents__link toc-highlight">Calculator Tool</a></li><li><a href="#google-search-api" class="table-of-contents__link toc-highlight">Google Search API</a></li><li><a href="#python-code-structured-tool" class="table-of-contents__link toc-highlight">Python Code Structured Tool</a></li><li><a href="#python-repl-tool" class="table-of-contents__link toc-highlight">Python REPL Tool</a></li><li><a href="#retriever-tool" class="table-of-contents__link toc-highlight">Retriever Tool</a></li><li><a href="#search-api" class="table-of-contents__link toc-highlight">Search API</a></li><li><a href="#searxng-search-tool" class="table-of-contents__link toc-highlight">SearXNG Search Tool</a></li><li><a href="#wikipedia-api" class="table-of-contents__link toc-highlight">Wikipedia API</a></li></ul></li><li><a href="#deprecated-components" class="table-of-contents__link toc-highlight">Deprecated components</a><ul><li><a href="#mcp-tools-stdio" class="table-of-contents__link toc-highlight">MCP Tools (stdio)</a></li><li><a href="#mcp-tools-sse" class="table-of-contents__link toc-highlight">MCP Tools (SSE)</a></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><div class="footer-links">
<span>© 2025 Langflow</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="https://langflow.org/preferences">Manage Privacy Choices</a></span>
</div></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/langflow-logo-black.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="160" height="40"><img src="/img/langflow-logo-white.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="160" height="40"></div></div></div></footer><div style="position:fixed;right:20px;bottom:20px;z-index:100;display:flex;align-items:center;gap:10px;cursor:pointer"><div style="background-color:#f6f6f6;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)"><img src="/img/langflow-icon-black-transparent.svg" style="width:40px" alt="Search"></div></div></div>
</body>
</html>