@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
22 lines (21 loc) • 470 B
JavaScript
export function formatTextToolResult(text, toolName) {
return {
content: [
{
type: 'text',
text
}
]
};
}
export function formatToolError(error, toolName) {
return {
content: [
{
type: 'text',
text: `Error ${toolName}:\n${error instanceof Error ? error.message : String(error)}`
}
],
isError: true
};
}