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

Work with tools

Last update:
May 18, 2026
Learn how to discover and invoke tools exposed by an MCP server using a ColdFusion client.
Tools are the primary way your client triggers actions on the server side (for example, fetch data, update records, or transform documents).
You can list available tools and invoke them with structured arguments.
  1. List available tools using listTools().
    ADDITIONAL INFORMATION:

<cfscript>

    tools = mcpClient.listTools();
    writeDump(tools);

</cfscript>
                    
  1. Each tool record typically includes:
    • name – The tool’s identifier.
    • description – A human-readable explanation.
    • inputSchema – A JSON-schema-like structure describing required and optional parameters.
  2. Call a tool using callTool(toolName, params).
    ADDITIONAL INFORMATION:

<cfscript>

    toolName   = "get_weather";
    toolParams = { location = "New York" };

    result = mcpClient.callTool(toolName, toolParams);
    writeDump(result);

</cfscript>
                    
  1. The result contains structured output returned by the MCP server. If execution fails, the response includes an isError flag.
Result
You can now discover and execute server-side tools through your MCP client.

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