Skip to main content
Glama

Spec Workflow MCP

logger.ts1.67 kB
import * as vscode from 'vscode'; export class Logger { private outputChannel: vscode.OutputChannel; constructor(outputChannel: vscode.OutputChannel) { this.outputChannel = outputChannel; } private formatMessage(level: string, message: string, data?: any): string { const timestamp = new Date().toISOString(); let formatted = `[${timestamp}] ${level}: ${message}`; if (data !== undefined) { if (typeof data === 'object') { formatted += `\n${JSON.stringify(data, null, 2)}`; } else { formatted += ` ${data}`; } } return formatted; } log(message: string, data?: any) { const formatted = this.formatMessage('INFO', message, data); this.outputChannel.appendLine(formatted); } error(message: string, data?: any) { const formatted = this.formatMessage('ERROR', message, data); this.outputChannel.appendLine(formatted); } warn(message: string, data?: any) { const formatted = this.formatMessage('WARN', message, data); this.outputChannel.appendLine(formatted); } debug(message: string, data?: any) { const formatted = this.formatMessage('DEBUG', message, data); this.outputChannel.appendLine(formatted); } separator(title?: string) { const line = '='.repeat(60); if (title) { const padding = Math.max(0, 60 - title.length - 4); const leftPad = Math.floor(padding / 2); const rightPad = padding - leftPad; this.outputChannel.appendLine(`${'='.repeat(leftPad)} ${title} ${'='.repeat(rightPad)}`); } else { this.outputChannel.appendLine(line); } } show() { this.outputChannel.show(); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pimzino/spec-workflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server