Interface IMcpLlmApplication<Model>

Application of LLM function call from MCP document.

IMcpLlmApplication is an interface representing a collection of LLM function calling schemas composed from the MCP (Model Context Protocol) document. It contains failed functions, and adjusted options during the IMcpLlmApplication construction.

About each function of MCP server, there can be errors during the composition, if the target model does not support the function's IMcpLlmFunction.parameters type. For example, Google Gemini model does not support union type, so that the function containing the union type would be placed into the errors list instead of functions.

Also, each function has its own IMcpLlmFunction.validate function for correcting AI agent's mistakes, and this is the reason why @samchon/openapi recommends not to use the mcp_servers property of LLM API directly, but to use the function calling feature instead.

Jeongho Nam - https://github.com/samchon

Byeongjin Oh - https://github.com/sunrabbit123

interface IMcpLlmApplication<Model extends Model> {
    errors: IMcpLlmApplication.IError[];
    functions: IMcpLlmFunction<Model>[];
    model: Model;
    options: IMcpLlmApplication.IOptions<Model>;
}

Type Parameters

Properties

List of errors occurred during the composition.

functions: IMcpLlmFunction<Model>[]

List of function metadata.

List of function metadata that can be used for the LLM function call.

model: Model

Model of the target LLM.

Configuration for the application.