Add MCP tool catalog functionality and validation
- Implement AnyCatalog method in MCPController to list MCP tools with detailed information. - Introduce MCPToolCatalogResponse struct for tool catalog responses. - Create ToolCatalogService to handle tool listing and validation of tool codes. - Enhance skill definition validation to include tool code validation against the catalog.
This commit is contained in:
@@ -65,6 +65,16 @@ func BuildMCPToolInfoResponses(items []mcps.ToolInfo) []MCPToolInfoResponse {
|
||||
return ret
|
||||
}
|
||||
|
||||
type MCPToolCatalogResponse struct {
|
||||
ToolCode string `json:"toolCode"`
|
||||
ServerCode string `json:"serverCode"`
|
||||
ToolName string `json:"toolName"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
InputSchema any `json:"inputSchema"`
|
||||
OutputSchema any `json:"outputSchema,omitempty"`
|
||||
}
|
||||
|
||||
type MCPToolResultContentResponse struct {
|
||||
Type string `json:"type"`
|
||||
Text string `json:"text,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user