LoadMcpToolsOptions: {
    additionalToolNamePrefix?: string;
    outputHandling?: OutputHandling;
    prefixToolNameWithServerName?: boolean;
    throwOnLoadError?: boolean;
    useStandardContentBlocks?: boolean;
}

Type declaration

  • OptionaladditionalToolNamePrefix?: string

    An additional prefix to add to the tool name. Will be added at the very beginning of the tool name, separated by a double underscore.

    For example, if additionalToolNamePrefix is "mcp", and prefixToolNameWithServerName is true, the tool name "my-tool" provided by server "my-server" will become "mcp__my-server__my-tool".

    Similarly, if additionalToolNamePrefix is mcp and prefixToolNameWithServerName is false, the tool name would be "mcp__my-tool".

    ""
    
  • OptionaloutputHandling?: OutputHandling

    Defines where to place each tool output type in the LangChain ToolMessage.

    {
    * "text": "content",
    * "image": "content",
    * "audio": "content",
    * "resource": "artifact"
    * }
  • OptionalprefixToolNameWithServerName?: boolean

    If true, the tool name will be prefixed with the server name followed by a double underscore. This is useful if you want to avoid tool name collisions across servers.

    false
    
  • OptionalthrowOnLoadError?: boolean

    If true, throw an error if a tool fails to load.

    true
    
  • OptionaluseStandardContentBlocks?: boolean

    If true, the tool will use LangChain's standard multimodal content blocks for tools that output image or audio content, and embedded resources will be converted to StandardFileBlock objects. When false, all artifacts are left in their MCP format, but embedded resources will be converted to StandardFileBlock objects if outputHandling causes embedded resources to be treated as content, as otherwise ChatModel providers will not be able to interpret them.

    false