Skip to content

LangChain4j & Model Context Protocol (MCP) Integration

SyncBoot integrates LangChain4j as its enterprise AI framework and exposes Model Context Protocol (MCP) interfaces to communicate with external orchestrators and AI clients.


MCP Integration Architecture

SyncBoot provides standardized Tools and Resources via HTTP Server-Sent Events (SSE).


Default MCP Tool Registry

Tool NameDescriptionParametersReturn Type
syncboot_read_schemaInspects table structure and column metadatatableName (String)JSON (Columns, Types, Nullability, Comments)
syncboot_execute_queryExecutes authorized domain CRUD queriessql (String), params (Map)Record set (max 100 rows)
syncboot_fetch_server_logsExtracts recent cluster error logslines (Int), level (ERROR)Stack trace text
syncboot_get_table_listRetrieves all registered business domain tablestenantId (String)Array of table names and descriptions

Java Backend Tool Implementation (LangChain4j)

java
@Component
public class SyncBootMcpTools {

    @Autowired
    private SchemaService schemaService;

    @Autowired
    private LogInspectorService logInspectorService;

    @Tool("Retrieves DDL and metadata for specified table.")
    public TableMetaDTO readSchema(
            @P("Physical table name (e.g. TB_ORDER)") String tableName) {
        return schemaService.getTableMetadata(tableName);
    }

    @Tool("Fetches recent server error logs for analysis.")
    public String fetchServerLogs(
            @P("Number of log lines (default 100)") int lines) {
        return logInspectorService.getRecentErrorLogs(lines);
    }
}

Last updated: