@edicarlos.lds/businessmap-mcp
Version:
Model Context Protocol server for BusinessMap (Kanbanize) integration
30 lines • 758 B
JavaScript
/**
* Standard error handler for tool responses
*/
export function createErrorResponse(error, operation) {
return {
content: [
{
type: 'text',
text: `Error ${operation}: ${error instanceof Error ? error.message : 'Unknown error'}`,
},
],
isError: true,
};
}
/**
* Standard success handler for tool responses
*/
export function createSuccessResponse(data, message) {
return {
content: [
{
type: 'text',
text: message
? `${message}\n${JSON.stringify(data, null, 2)}`
: JSON.stringify(data, null, 2),
},
],
};
}
//# sourceMappingURL=base-tool.js.map