aiq.tool.mcp.mcp_tool#
Attributes#
Classes#
Function which connects to a Model Context Protocol (MCP) server and wraps the selected tool as an AgentIQ function. |
Functions#
|
Generate an AgentIQ Function that wraps a tool provided by the MCP server. |
Module Contents#
- logger#
- class MCPToolConfig(/, **data: Any)#
Bases:
aiq.data_models.function.FunctionBaseConfig
Function which connects to a Model Context Protocol (MCP) server and wraps the selected tool as an AgentIQ function.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- url: pydantic.HttpUrl = None#
- async mcp_tool(config: MCPToolConfig, builder: aiq.builder.builder.Builder)#
Generate an AgentIQ Function that wraps a tool provided by the MCP server.