Tools

This Langflow feature is currently in public preview. Development is ongoing, and the features and functionality are subject to change. Langflow, and the use of such, is subject to the DataStax Preview Terms.

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.

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 Tool 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 Tool object’s description tells the agent what the tool can do.

The agent then uses a connected LLM to reason through the problem to decide which tool is best for the job.

Use a tool in a flow

Tools are typically connected to agent components at the Tools port.

The simple agent starter project uses URL and Calculator tools connected to an agent component to answer a user’s questions. The OpenAI LLM acts as a brain for the agent to decide which tool to use.

starter flow simple agent

To make a component into a tool that an agent can use, enable Tool mode in the component. Enabling Tool mode modifies a component input to accept calls from an agent. If the component you want to connect to an agent doesn’t have a Tool mode option, you can modify the component’s inputs to become a tool. For an example, see Make any component a tool.

arXiv

This component searches and retrieves papers from arXiv.org.

Parameters

Inputs
Name Display Name Info

search_query

Search Query

The search query for arXiv papers, for example, 'quantum computing'.

search_type

Search Field

The field to search in.

max_results

Max Results

Maximum number of results to return.

Outputs
Name Display Name Info

papers

Papers

List of retrieved arXiv papers.

Component code

arxiv.py
404: Not Found

Astra DB tool

This component creates a tool an Agent can use to retrieve data from a DataStax Astra DB collection.

Parameters

Inputs
Name Type Description

tool_name

String

The name of the tool

tool_description

String

The description of the tool

namespace

String

The namespace within Astra where the collection is stored (default: "default_keyspace")

collection_name

String

The name of the collection within Astra DB

token

SecretString

Authentication token for accessing Astra DB

api_endpoint

String

API endpoint URL for the Astra DB service

projection_attributes

String

Attributes to return, separated by commas (default: "*")

tool_params

List[Dict]

Attributes to filter and description for the model

static_filters

List[Dict]

Attributes to filter and corresponding values

number_of_results

Integer

Number of results to return (default: 5)

Outputs
Name Type Description

tool

StructuredTool

Astra DB search tool for use in LangChain

Component code

astradb_tool.py
404: Not Found

Astra DB CQL tool

This component creates a tool an Agent can use to retrieve data from a DataStax Astra DB CQL table.

Parameters

Inputs
Name Type Description

tool_name

String

The name of the tool

tool_description

String

The tool description to be passed to the model

keyspace

String

The keyspace name within Astra DB where the data is stored

table_name

String

The name of the table within Astra DB where the data is stored

token

SecretString

Authentication token for accessing Astra DB

api_endpoint

String

API endpoint URL for the Astra DB service

projection_fields

String

Attributes to return, separated by commas (default: "*")

partition_keys

List[Dict]

Field name and description for partition keys

clustering_keys

List[Dict]

Field name and description for clustering keys

static_filters

List[Dict]

Field name and value for static filters

number_of_results

Integer

Number of results to return (default: 5)

Outputs
Name Type Description

tool

StructuredTool

Astra DB CQL search tool for use in LangChain

Component code

astradb_cql.py
404: Not Found

Bing Search API

This component allows you to call the Bing Search API.

Parameters

Inputs
Name Type Description

bing_subscription_key

SecretString

Bing API subscription key

input_value

String

Search query input

bing_search_url

String

Custom Bing Search URL (optional)

k

Integer

Number of search results to return

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Bing Search tool for use in LangChain

Component code

bing_search_api.py
404: Not Found

Calculator Tool

This component allows you to evaluate basic arithmetic expressions. It supports addition, subtraction, multiplication, division, and exponentiation. The tool uses a secure evaluation method that prevents the execution of arbitrary Python code.

Parameters

Inputs
Name Type Description

expression

String

The arithmetic expression to evaluate (for example, 4*4*(33/22)+12-20).

Outputs
Name Type Description

result

Tool

Calculator tool for use in LangChain.

Component code

calculator.py
404: Not Found

This component performs web searches using the DuckDuckGo search engine with result-limiting capabilities.

Parameters

Inputs
Name Display Name Info

input_value

Search Query

The search query to execute with DuckDuckGo.

max_results

Max Results

The maximum number of search results to return. Default: 5.

max_snippet_length

Max Snippet Length

The maximum length of each result snippet. Default: 100.

Outputs
Name Display Name Info

data

Data

List of search results as Data objects containing snippets and full content.

text

Text

Search results formatted as a single text string.

Component code

duck_duck_go_search_run.py
404: Not Found

This component provides an Exa Search toolkit for search and content retrieval.

Parameters

Inputs
Name Display Name Info

metaphor_api_key

Exa Search API Key

API key for Exa Search, entered as a password.

use_autoprompt

Use Autoprompt

Whether to use the autoprompt feature. (default: true)

search_num_results

Search Number of Results

Number of results to return for search. (default: 5)

similar_num_results

Similar Number of Results

Number of similar results to return. (default: 5)

Outputs
Name Display Name Info

tools

Tools

List of search tools provided by the toolkit.

Component code

exa_search.py
404: Not Found

Glean Search API

This component allows you to call the Glean Search API.

Parameters

Inputs
Name Type Description

glean_api_url

String

URL of the Glean API

glean_access_token

SecretString

Access token for Glean API authentication

query

String

Search query input

page_size

Integer

Number of results per page (default: 10)

request_options

Dict

Additional options for the API request (optional)

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Glean Search tool for use in LangChain

Component code

glean_search_api.py
404: Not Found

Google search API

This component allows you to call the Google Search API.

Parameters

Inputs
Name Type Description

google_api_key

SecretString

Google API key for authentication

google_cse_id

SecretString

Google Custom Search Engine ID

input_value

String

Search query input

k

Integer

Number of search results to return

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Google Search tool for use in LangChain

Component code

google_search_api.py
404: Not Found

Google serper API

This component allows you to call the Serper.dev Google Search API.

Parameters

Inputs
Name Type Description

serper_api_key

SecretString

API key for Serper.dev authentication

input_value

String

Search query input

k

Integer

Number of search results to return

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Google Serper search tool for use in LangChain

Component code

google_serper_api.py
404: Not Found

MCP server

This component connects to a Model Context Protocol (MCP) server and exposes the MCP server’s tools as tools.

To use the MCP server component with an agent component, follow these steps:

  1. Add the MCP server component to your workflow.

  2. In the MCP server component, in the MCP Command field, enter the command to start your MCP server. uvx is included with DataStax Langflow. npx server commands are not available in DataStax Langflow. For example, to start a Fetch server, the command is:

    uvx mcp-server-fetch
  3. Click refresh to get the server’s list of Tools.

  4. In the Tool 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’s documentation.

  5. In the MCP server component, enable Tool mode. Connect the MCP server component’s Toolset port to an Agent component’s Tools port. The flow looks similar to this:

    MCP component connect to an agent
  6. Open the Playground. Ask the agent to summarize recent tech news. The agent calls the MCP server function fetch and returns the summary. This confirms the MCP server is connected, and its tools are being used in Langflow.

SSE mode is not available in DataStax Langflow. If you want to use SSE mode, use Langflow OSS.

MCP Tools (stdio)

This component is deprecated as of Langflow version 1.3. Instead, use the MCP server component.

MCP Tools (SSE)

This component is deprecated as of Langflow version 1.3. Instead, use the MCP server component.

Python code structured tool

This component creates a structured tool from Python code using a dataclass.

The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions.

Parameters

Inputs
Name Type Description

tool_code

String

Python code for the tool’s dataclass

tool_name

String

Name of the tool

tool_description

String

Description of the tool

return_direct

Boolean

Whether to return the function output directly

tool_function

String

Selected function for the tool

global_variables

Dict

Global variables or data for the tool

Outputs
Name Type Description

result_tool

Tool

Structured tool created from the Python code

Component code

python_code_structured_tool.py
404: Not Found

Python REPL Tool

This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code.

Parameters

Inputs
Name Type Description

name

String

The name of the tool (default: "python_repl")

description

String

A description of the tool’s functionality

global_imports

List[String]

List of modules to import globally (default: ["math"])

Outputs
Name Type Description

tool

Tool

Python REPL tool for use in LangChain

Component code

python_repl.py
404: Not Found

Retriever Tool

This component creates a tool for interacting with a retriever in LangChain.

Parameters

Inputs
Name Type Description

retriever

BaseRetriever

The retriever to interact with

name

String

The name of the tool

description

String

A description of the tool’s functionality

Outputs
Name Type Description

tool

Tool

Retriever tool for use in LangChain

Component code

retriever.py
404: Not Found

SearXNG Search Tool

This component creates a tool for searching using SearXNG, a metasearch engine.

Parameters

Inputs
Name Type Description

url

String

The URL of the SearXNG instance

max_results

Integer

Maximum number of results to return

categories

List[String]

Categories to search in

language

String

Language for the search results

Outputs
Name Type Description

result_tool

Tool

SearXNG search tool for use in LangChain

Component code

searxng.py
404: Not Found

Search API

This component is in Legacy, which means it is no longer in active development as of Langflow version 1.3.

This component calls the searchapi.io API. It can be used to search the web for information.

For more information, see the SearchAPI documentation.

Parameters

Inputs
Name Display Name Info

engine

Engine

The search engine to use (default: "google")

api_key

SearchAPI API Key

The API key for authenticating with SearchAPI

input_value

Input

The search query or input for the API call

search_params

Search parameters

Additional parameters for customizing the search

Outputs
Name Display Name Info

data

Search Results

List of Data objects containing search results

tool

Search API Tool

A Tool object for use in LangChain workflows

Component code

search_api.py
404: Not Found

Serp Search API

This component creates a tool for searching using the Serp API.

Parameters

Inputs
Name Type Description

serpapi_api_key

SecretString

API key for Serp API authentication

input_value

String

Search query input

search_params

Dict

Additional search parameters (optional)

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Serp API search tool for use in LangChain

Component code

serp_api.py
404: Not Found

Tavily search API

This component creates a tool for performing web searches using the Tavily API.

Parameters

Inputs
Name Type Description Required Default

api_key

SecretString

Tavily API Key

Yes

-

query

String

Search query

Yes

-

search_depth

Enum

Depth of search (BASIC/ADVANCED)

No

BASIC

topic

Enum

Search category (GENERAL/NEWS)

No

GENERAL

max_results

Integer

Maximum number of results

No

5

include_images

Boolean

Include related images

No

False

include_answer

Boolean

Include short answer

No

False

Outputs
Name Type Description

results

List[Data]

List of search results

tool

Tool

Tavily search tool for use in LangChain

Component code

tavily_search.py
404: Not Found

Wikidata

This component is in Legacy, which means it is no longer in active development as of Langflow version 1.3.

This component performs a search using the Wikidata API.

Parameters

Inputs
Name Display Name Info

query

Query

The text query for similarity search on Wikidata.

Outputs
Name Display Name Info

data

Data

The search results from Wikidata API as a list of Data objects.

text

Message

The search results formatted as a text message.

Component code

wikidata.py
404: Not Found

Wikipedia API

This component is in Legacy, which means it is no longer in active development as of Langflow version 1.3.

This component creates a tool for searching and retrieving information from Wikipedia.

Parameters

Inputs
Name Type Description

input_value

String

Search query input

lang

String

Language code for Wikipedia (default: "en")

k

Integer

Number of results to return

load_all_available_meta

Boolean

Whether to load all available metadata (advanced)

doc_content_chars_max

Integer

Maximum number of characters for document content (advanced)

Outputs
Name Type Description

results

List[Data]

List of Wikipedia search results

tool

Tool

Wikipedia search tool for use in LangChain

Component code

wikipedia_api.py
404: Not Found

Wolfram Alpha API

This component creates a tool for querying the Wolfram Alpha API.

Parameters

Inputs
Name Type Description

input_value

String

Query input for Wolfram Alpha

app_id

SecretString

Wolfram Alpha API App ID

Outputs
Name Type Description

results

List[Data]

List containing the Wolfram Alpha API response

tool

Tool

Wolfram Alpha API tool for use in LangChain

Component code

wolfram_alpha_api.py
404: Not Found

Yahoo Finance News Tool

This component creates a tool for retrieving news from Yahoo Finance.

Parameters

This component does not have any input parameters.

Outputs
Name Type Description

tool

Tool

Yahoo Finance News tool for use in LangChain

Component code

yahoo.py
404: Not Found

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com