@cnbcool/mcp-server
Version:
CNB MCP Server. A comprehensive MCP server that provides seamless integration to the CNB's API(https://cnb.cool), offering a wide range of tools for repository management, pipelines operations and collaboration features
26 lines (25 loc) • 629 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatTextToolResult = formatTextToolResult;
exports.formatToolError = formatToolError;
function formatTextToolResult(text, toolName) {
return {
content: [
{
type: 'text',
text
}
]
};
}
function formatToolError(error, toolName) {
return {
content: [
{
type: 'text',
text: `Error ${toolName}:\n${error instanceof Error ? error.message : String(error)}`
}
],
isError: true
};
}