getTools

open suspend override fun getTools(readonlyContext: ReadonlyContext? = null): List<BaseTool>

Discovers tools advertised by the MCP server.

When a headerProvider is configured it is invoked for readonlyContext before listing tools, and again before each later tool call.

Throws

if discovery fails, including when the header provider or a ToolFilter.Predicate throws IllegalArgumentException.