Whatever message this page gives is out now! Go check it out!

listTools

Last update:
May 18, 2026
Returns the list of all tools exposed by the connected MCP server for a given MCP client, including each tool's name, description, and input schema.

Description

The listTools function returns the list of all tools exposed by the connected MCP server for a given MCP client. Each tool entry includes metadata such as the tool's name, description, and input schema. This is typically the first method you call after creating an MCP client, to discover what capabilities the server provides.

Returns

An array of structs, where each struct describes a tool.

Category

MCP functions

Syntax

listTools()
Called as an instance method on an MCP client object:
tools = mcpClient.listTools()

History

New in ColdFusion 2025.0.08

Parameters

None

Example

<cfscript>
  transport = {
    "type": "http",
    "url": "https://gitmcp.io/langchain-ai/langgraph"
  }
  mcpClientConfig = {
    "transport": transport,
    "requestTimeout": 30,
    "initializationTimeout": 10
  }
  mcpclient = MCPClient(mcpClientConfig);
  myprompts = mcpClient.listtools()
  toolsArray=myprompts.tools
  writeOutput("<b>List of tools</b>" & "<br>")
  for (p in toolsArray) {
    writeOutput(p.name & "<br>")
  }
</cfscript>

Output

List of tools
fetch_langgraph_documentation
search_langgraph_documentation
search_langgraph_code
fetch_generic_url_content

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page